﻿
var ns6=document.getElementById&&!document.all
function ietruebody()
{
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function FloatTopDiv()
{
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	if(!ns)
	{
		startLX = (document.body.clientWidth)/2 - 390 - 104 , startLY = 200;
		
		startRX =0 , startRY = 00;
		startSY=document.body.clientHeight/2-240;
		startSX=startLX;
		
	}
	else
	{
		startLX = (document.body.clientWidth)/2 -390 - 102 , startLY = 200;
		
		startRX = 0 , startRY = 200;
		startSY=document.body.clientHeight/2-240;
		startSX=startLX;
	}
	
	var d = document;
	function ml(id)
	{
		var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		el.sP=function(x,y){this.style.left=x;this.style.top=y;};
		el.x = startRX;
		el.y = startRY;
		return el;
	}
	function m2(id)
	{
		var e2=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		e2.sP=function(x,y){this.style.left=x;this.style.top=y;};
		e2.x = startLX;
		e2.y = startLY;
		return e2;
	}
	window.stayTopLeft=function()
	{
		if (document.documentElement && document.documentElement.scrollTop)
			var pY =  document.documentElement.scrollTop;
		else if (document.body)
			var pY =  document.body.scrollTop;
	    
	    if (screen.height>=768)
	       
	        //startRY1 = screen.height-230;
	       startRY1=ns6 || window.opera? window.innerHeight-divSearch.offsetHeight-5 : ietruebody().clientHeight-divSearch.offsetHeight-0
	    else
	      
	        startRY1 = screen.height-360;
	        
	    startSY=document.body.clientHeight/2-240;
	  
		ftlObj.y += (pY+startRY1-ftlObj.y)/16;//16;
		ftlObj.sP(document.body.clientWidth/2 - 389-1, ftlObj.y);
		//ftlObj.sP(window.opera? window.innerWidth-divSearch.offsetWidth-((screen.width-778)/2) : ietruebody().clientWidth-divSearch.offsetWidth-((screen.width-778)/2-10), ftlObj.y);
		
		setTimeout("stayTopLeft()", 1);
	}
	ftlObj = ml("divSearch");

	stayTopLeft();
}

function ShowAdDiv()
{
	var objdivSearch = document.getElementById("divSearch");

		objdivSearch.style.display = "block";
		
	    FloatTopDiv();

}
ShowAdDiv();
