
var y1 = 20;   // change the # on the left to adjuct the Y co-ordinate
(document.getElementById) ? dom = true : dom = false;

function hideIt() 
{
	if (dom) 
	{
		document.getElementById("floatlayer").style.visibility='hidden';
	}
}

function showIt() 
{
	if (dom) 
	{
		document.getElementById("floatlayer").style.visibility='visible';  
	}
}

function placeIt() 
{

	if (navigator.userAgent.indexOf('Firefox') > -1)
	{
		if (dom && !document.all) 
		{
			document.getElementById("floatlayer").style.top = window.pageYOffset + (window.innerHeight - 130) + 'px';
			document.getElementById("floatlayer").style.left = window.innerWidth - 250 + 'px';
			//document.getElementById("floatlayer").style.top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1)) + "px";
		}

		if (document.all) 
		{
			document.all["floatlayer"].style.top = document.documentElement.scrollTop + window.innerHeight  - 130 + 'px';
			document.all["floatlayer"].style.left = window.innerWidth  - 250 + 'px';
			//document.all["floatlayer"].style.top = document.documentElement.scrollTop + (document.documentElement.clientHeight - (document.documentElement.clientHeight-y1)) + "px";
		}
	}
	else
	{
		if (dom && !document.all) 
		{
			document.getElementById("floatlayer").style.top = document.body.scrollTop + ((screen.availHeight-170) - 130) + 'px';
			document.getElementById("floatlayer").style.left = document.body.clientWidth - 235 + 'px';
			//document.getElementById("floatlayer").style.top = window.pageYOffset + (window.innerHeight - (window.innerHeight-y1)) + "px";
		}

		if (document.all) 
		{
			document.all["floatlayer"].style.top = document.body.scrollTop + ((screen.availHeight - 170)  - 130) + 'px';
			document.all["floatlayer"].style.left = document.body.clientWidth  - 235 + 'px';
			//document.all["floatlayer"].style.top = document.documentElement.scrollTop + (document.documentElement.clientHeight - (document.documentElement.clientHeight-y1)) + "px";

			//document.all["floatlayer"].style.position = 'absolute';
			//document.all["floatlayer"].innerHTML = document.all["floatlayer"].style.top;
			
		}
	}

	window.setTimeout("placeIt()", 10); 
}

