//These are the javascript functions used
//for the pop-up menus and the pop-up
//windows that are part of the While in Farmville
//link collection. DO NOT alter any of the scripting
//in this file.

var timerID = null;
var listCount = 0;


//this function shows the pop-up menus

function showMenu(boxName,x,y) {
	clearTimeout(timerID);
	if (document.layers) {
		styleObj = eval('document.' + boxName);
		styleObj.top = y;
		styleObj.left = x;
	} else if (navigator.userAgent.indexOf("Opera") != -1) {
		styleObj = eval('document.all.' + boxName);
		styleObj.style.pixelTop = y-25;
		styleObj.style.pixelLeft = x;
	} else if (document.all && !document.getElementById) {
		styleObj = eval('document.all.' + boxName);
		styleObj.style.pixelTop = y;
		styleObj.style.pixelLeft = x;
	} else if (document.getElementById) {
		obj = document.getElementById(boxName);
		obj.style.top = y + "px";
		obj.style.left = x + "px";
	}
}

function hideIt(menuName) {
	funcVar = "showMenu('" + menuName + "',-350,1450)";
	timerID = setTimeout(funcVar,800);
}

function hideAll() {
	showMenu('furniture',-250,300);
	showMenu('flooring',-250,300);
	showMenu('visitus',-250,300);
	showMenu('delivery',-250,300);
	showMenu('links',-250,300);
}


function openWind(url,width,height)
	{
		newWind = window.open(url,"newWind","width="+width+", height="+height+", scrollbars=yes, left=0, top=0");
		newWind.focus();
	}

