function showMenu(number) {
 document.getElementById("Menu" + number).style.visibility = "visible";
 document.getElementById("Menu" + number).style.left = detWidth(number);
}

function hideMenu(number,swapNav) {
 document.getElementById("Menu" + number).style.visibility = "hidden";
 if (swapNav){
  swap(number,false);
 }
}

function KeepAlive(number) {
if (this.clear) clearTimeout(this.clear);  
this.clear = null;
}

function timeOut(number,length,swapNav) {
 this.start = new Date();
 this.clear = setTimeout("hideMenu("+number+", "+swapNav+")", length*25);
}

function hover(number,on) {
 var obj = document.getElementById("div" + number).style;
 on?obj.backgroundColor="#CC6633":obj.backgroundColor="#666666";
}

function detWidth(offset) {

var ver=navigator.appVersion;
var agent=navigator.userAgent.toLowerCase();

var mac = (agent.indexOf("mac")>-1);
var ie = (agent.indexOf("msie")>-1);
var opera = (agent.indexOf("opera 5")>-1 || agent.indexOf("opera/5")>-1 || agent.indexOf("opera 6")>-1 || agent.indexOf("opera/6")>-1) && window.opera;

var nsWidth = window.innerWidth;
var ns4=(!this.dom && document.layers)?true:false;
var width;

if (mac && ie) {
 width=window.document.body.offsetWidth;
}
else if (opera) {
 width=window.document.body.offsetWidth;
}
else if (ie) {
 width=window.document.body.offsetWidth-20;
}
else if (ns4 && mac) {
 width=nsWidth-16;
}
else if (ns4) {
 width=nsWidth-16;
}
else {
 width=nsWidth-16;
}
(width<=760)?x=160+offset*120:x=((width-440)/2+(offset*120));
return x;
}