/* -----------------------------------------------
   Floating layer - v.1
   (c) 2006 www.haan.net
   contact: jeroen@haan.net
   You may use this script but please leave the credits on top intact.
   Please inform us of any improvements made.
   When usefull we will add your credits.
  ------------------------------------------------ */
/*var x1 = screen.width;
if(x1=='1024'){
    x=10+Math.ceil((x1-976)/2);
}else if(x1=='800'){
   x=115+Math.ceil((x1-976)/2);
}else{
  x=-45+Math.ceil((x1-976)/2);
}*/
/*var x1 = window.innerWidth;
x=(((x1-970)/2)+20);

var screenWidthResulatiuon=screen.width;
alert(screenWidthResulatiuon);*/

var x1 = 0;
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
    x1=myWidth;

  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
    x1=myWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
    x1=myWidth;
  }
if(x1<970){
	x=0+35;	
}else{
	x=Math.ceil((x1-970)/2)+35;
}

function setVisible(obj)
{                      // alert("e");
	obj = document.getElementById(obj);
    obj.style.display = (obj.style.display == 'block') ? 'none' : 'block';
}
function placeIt(obj)
{
  if(y<80)
  {
  return;
  }
   //alert(y);

	obj = document.getElementById(obj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft += x;
	theTop += y;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
	setTimeout("placeIt('layer1')",500);
}
y=-170;
function showIt(obj)
{
  //alert(y);
  y=y+2;
  if(y==82) clearTimeout(t);

	obj = document.getElementById(obj);
	if (document.documentElement)
	{
		theLeft = document.documentElement.scrollLeft;
		theTop = document.documentElement.scrollTop;
	}
	else if (document.body)
	{
		theLeft = document.body.scrollLeft;
		theTop = document.body.scrollTop;
	}
	theLeft += x;
	theTop += y;
	obj.style.left = theLeft + 'px' ;
	obj.style.top = theTop + 'px' ;
	setTimeout("placeIt('layer1')",500);
   if(y==-168) setVisible('layer1');
   //obj.style.opacity = y;
}

//window.onscroll = setTimeout("placeIt('layer1')",500);      //not working in IE

function call()
{
t = setInterval("showIt('layer1')",10);
}

window.load = setTimeout("call()",3000);

