/* GLOBAL VARS */
var objDivLastShown; // used for to switch off last shown divs
var objFindDiv; // right background layer

/* simple dom constructor */
function getRef(id) {
	return (document.getElementById ? document.getElementById(id) : document.all[id]); 
}

/* initialize variables and objects */
function homeInit() {
	objFindDiv = getRef("findTop");
	objDivLastShown = null; 
}


/* display the selected tire locator div */
function homeFindDiv(id) {

	var objTheDiv = getRef(id);
		
	// turn off the last shown div if exists
	if (objDivLastShown != null) {
		objDivLastShown.style.visibility = "hidden";
	}
	objDivLastShown = objTheDiv; // div to hide on next pass		
	
	objFindDiv.style.visibility = "visible";
	objTheDiv.style.visibility = "visible";
}


/* hide the currently displayed tire locator div */
function slideOff() {
	objDivLastShown.style.visibility = "hidden";
	objFindDiv.style.visibility = "hidden";
}


/* load the specified iframe with the specified source */
function loadTireFrame(theIframe, thePage) {
	var theFrame = getRef(theIframe);
	theFrame.src = thePage;
}