//similar to the fuller '..\products\zipzoom\dropdown.js'

var oFrame;
var oName;
var num;
var winW = 0;
var winH = 0;
var timecount = 1000;
var timerOn = false;
var timerID;

// Put all Top Level Layer's Here
function hideAll() {
	doHide("Menu1");
}


/* ***************************************************
	Displays the layer.
	oName is the Name (ID) of the Layer
	offSet is the off-set position from the center.
		(-) moves it to the left
		(+) moves it to the right
* *****************************************************/
function showIt( oName, offSet, oYPos) {

	setDimensions();
	var oRel = true;
	var locW;

	if(document.layers){//ie
		offSet-=80;
	}
	if(document.all){
		offSet-=80;
	}
	if(!document.all && document.getElementById){//ffx
		offSet-=74;
	}
	
	var oXPos = (winW/2)+offSet;
	var theDiv = findObj( oName, oFrame );
	if( !theDiv ) { return; }
	if( theDiv.style ) {
		theDiv = theDiv.style;
	}
	if( typeof( oXPos ) == 'number' ) {
		oXPos = Math.floor(oXPos);
		theDiv.left = oXPos;
	}
	/*if( typeof( oYPos ) == 'number' ) {
		theDiv.top=230;
	}*/theDiv.top=230;
	theDiv.visibility = "visible";
}

// Hides a Layer
function doHide(oName)
{
	var theDiv = findObj( oName, oFrame ); if( !theDiv ) { return; }
	if( theDiv.style ) { theDiv = theDiv.style; }
	theDiv.visibility = "hidden";

}
function startTime() {
    if (timerOn == false) {
           timerID=setTimeout( "hideAll()" , timecount);
           timerOn = true;
    }

}
function stopTime() {
     if (timerOn) {
	        clearTimeout(timerID);
            timerID = null;
            timerOn = false;
     }
}

// Returns the Layer
function findObj( oName, oFrame, oDoc ) {
	if( !oDoc ) {
		if( oFrame ) { oDoc = oFrame.document; }
		else { oDoc = window.document; } }
	if( oDoc[oName] ) { return oDoc[oName]; }
	if( oDoc.all && oDoc.all[oName] ) { return oDoc.all[oName]; }
	if( oDoc.getElementById && oDoc.getElementById(oName) ) { return oDoc.getElementById(oName); }
	for( var x = 0; x < oDoc.forms.length; x++ ) {
		if( oDoc.forms[x][oName] ) { return oDoc.forms[x][oName]; }
	}
	for( var x = 0; x < oDoc.anchors.length; x++ ) {
		if( oDoc.anchors[x].name == oName ) { return oDoc.anchors[x]; }
	}
	for( var x = 0; document.layers && x < oDoc.layers.length; x++ ) {
		var theOb = findObj( oName, null, oDoc.layers[x].document );
		if( theOb ) { return theOb; } }
	if( !oFrame && window[oName] ) { return window[oName]; }
	if( oFrame && oFrame[oName] ) { return oFrame[oName]; }
	for( var x = 0; oFrame && oFrame.frames && x < oFrame.frames.length; x++ ) {
		var theOb = findObj( oName, oFrame.frames[x], oFrame.frames[x].document );
		if( theOb ) { return theOb; }
	}
	return null;
}

// This Calculates the Size of the Browser
function setDimensions()
{
	if (parseInt(navigator.appVersion)>3) {
		if (document.layers) {
			winW = window.innerWidth;
			winH = window.innerHeight;
		} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight )) {
			winW = document.body.offsetWidth;
			winH = document.body.coffsetHeight;
		} else if (document.documentElement && (document.body.clientWidth || document.body.clientHeight )){
			winW = document.body.clientWidth;
			winH = document.body.clientHeight;
		}
	}
}