﻿var iwidth = 130;
var iheight = 80;	
	
function moveBox()	
{
    // check for browser
	if (document.all)
	{   // for IE6/7
	    PosLeft = document.documentElement.scrollLeft || document.body.scrollLeft;	
	    PosTop = document.documentElement.scrollTop || document.body.scrollTop;
	    //WindowSizePrefix="document.documentElement.client";
	    WindowSizePrefix="window.document.body.client";
	}
	else if (document.getElementById)
	{   // for Mozilla/Opera (should handle everything else but IE)
	    PosLeft= window.pageXOffset;
	    PosTop= window.pageYOffset;
	    WindowSizePrefix="inner";
	}
	else if (document.layers)	
	{   // maybe for something else?
	    PosLeft = window.pageXOffset;
	    PosTop = window.pageYOffset;
	    WindowSizePrefix="inner";
	}
	
	var boxElement = document.getElementById("scrollingPriceBox");  
    boxElement.style.top = PosTop + eval(WindowSizePrefix + "Height") - iheight;
	boxElement.style.left = PosLeft + eval(WindowSizePrefix + "Width") - iwidth;
	showL("scrollingPriceBox");
	TimerID = setTimeout("moveBox()",100);
}

function hidemenu()	
{
	hideL("scrollingPriceBox");
	showL("priceBoxLauncher");
	clearTimeout(TimerID);
}

function showmenu()	
{
	hideL("priceBoxLauncher");
	showL("scrollingPriceBox");
	moveBox();
}

function showL(layerName)
{
    document.getElementById(layerName).style.visibility = "visible";
}
 
function hideL(layerName)
{
    document.getElementById(layerName).style.visibility = "hidden";
}

