//menu.js

/*var ie5=document.all && !document.fireEvent;
var ie55=document.all && document.fireEvent && !document.createComment;
var ie6=document.all && document.fireEvent && document.createComment;
var ns6=!document.all && document.getElementById;*/

function placeIt(elem,leftPos,topPos) {
document.getElementById(elem).style.left = leftPos + 'px';
document.getElementById(elem).style.top = topPos + 'px';
}

// mouse over (on) and mouseoff(off) color values
var oncolor = "#408DE7";
var offcolor = "#000000";

function changecolor(divname,colorname) {
stopall();
menuObj = document.getElementById(divname).style;
menuObj.backgroundColor = colorname;
}

// show or hide DIV element
function showhide(divname,state) {
divObj = document.getElementById(divname).style;
divObj.visibility = state;
}

// variables that hold the value of the currently active (open) menu
var active_submenu1 = null;

// function closes all active menus and turns back to 'off' state
function closeAllMenus() {
if(active_submenu1 != null) {
  showhide(active_submenu1,'hidden');
  }
}

// the menu close timeout variable
var menu_close_timeout = 0;

// delay in milliseconds until the open menus are closed
var delay = 750;

// function calls the closeallmenus() function after a delay
function closeAll() {
menu_close_timeout = setTimeout('closeAllMenus()',delay);
}

// stop all timeout functions (stops menus from closing)
function stopall() {
clearTimeout(menu_close_timeout);
}

function showSubMenu(submenu1) {
stopall();
closeAllMenus();
if (submenu1 != null) {
  showhide(submenu1,'visible');
  active_submenu1 = submenu1;
  }
}

function initialize () {
	preload();
	placeIt('coinmenu',270,131);
	placeIt('sitemenu',545,131);
}