/*** Mitracom Javascript ****/
/* hover.js                 */
/*                          */
/* (c) Mitracom 2003-2008   */
/****************************/

window.onload = function()
{
    menu_root = document.getElementById("menubar");
    if (menu_root) menu_rec(menu_root);

    // Focus automatically
    if (document.forms[1]) {
        for (i = 0; i < document.forms[1].elements.length; i++) {
            if (document.forms[1].elements[i].type == 'text') {
                document.forms[1].elements[i].focus();
                break;
            }
        }
    }
}

// menu
function menu_rec(ul) {
    for (var i = 0; i < ul.childNodes.length; i++) {
        li = ul.childNodes[i];
        if (li.nodeName == "LI" && li.childNodes[2] && li.childNodes[2].nodeName == "UL") {
            li.onmouseover = function() {
                this.childNodes[2].className += " over";
            }
            li.onmouseout = function() {
                this.childNodes[2].className = "";
            }
            menu_rec(li.childNodes[2]);
        }
    }
}

// popup voor callme
function callme() {
	window.open("/shop/?action=callme", "Callme", "resizable=no, width=500, height=450");
	return false;
}