url_root = "http://www.get2bed.co.uk/";
l = new Image();
l.src = url_root + "images/gif/load.gif";
c = new Image();
c.src = url_root + "images/png/cart.png";
a = new Image();
a.src = url_root + "images/png/arrow_right.png";
var GB_ANIMATION = true;

function tog_filter(tog)
{
		document.location.href = ('duvets.php?sid=<?php echo $subid; ?>&tog='+tog);
}
   	
function popup(){
	$(document).ready(function()
	{
	 GB_show(100,250);
	 move_it();
      return false;
			
	});
}

window.onscroll = move_it;

function isIE()
{
	var nav=navigator.appVersion;
	var arr = nav.split(';');
	if(arr[1].replace(/^\s+|\s+$/g, '')=="MSIE") return true;
}


function move_it() 
{
	var arr = new Array("GB_overlay","GB_window");
		for(i=0;i<arr.length;i++)
		{
		var obj =document.getElementById(arr[i]);
		if(obj!= null) 
			curr = arr[i];
		if(obj!= null)
		{ 
      if( typeof( window.innerWidth ) == 'number' ) { //Non-IE
        x = parseInt(window.innerWidth/2);
        y = parseInt(window.innerHeight/2);
      } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode'
        x = parseInt((document.documentElement.clientWidth-16)/2);
        y = parseInt((document.documentElement.clientHeight)/2);
      } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible
        x = parseInt(document.body.clientWidth/2);
        y = parseInt(document.body.clientHeight/2);
      }
  		var yy = parseInt(document.getElementById(curr).clientHeight/2);
  		var xx = parseInt(document.getElementById(curr).clientWidth/2);	
  		x = x-xx;
  		y = y-yy+document.documentElement.scrollTop;
  		
  		document.getElementById(curr).style.top = eval("'"+ y + "px'");
  		document.getElementById(curr).style.left = eval("'"+ x + "px'");
		}
		}
}
