// Show/Hide links to open/close search menu
function toggleVisibility(id, NNtype, IEtype, WC3type) {
    if (document.getElementById) {
        eval("document.getElementById(id).style.visibility = \"" + WC3type + "\"");
    } else {
        if (document.layers) {
            document.layers[id].visibility = NNtype;
        } else {
            if (document.all) {
                eval("document.all." + id + ".style.visibility = \"" + IEtype + "\"");
            }
        }
    }
}

// Delay zindex changing till menu has time to close
function toggleZ(id, z) {setTimeout("toggleZindex('"+id+"', '"+z+"');", 350);}

// Set zindex of sliding menus so that the left submenus will stay above when sliding is closed and sliding will be above left when open
function toggleZindex(id, z) {
	if (document.getElementById) 
	{
        document.getElementById(id).style.zIndex = z;
    } else 
	{
        if (document.layers) 
		{
            document.layers[id].zIndex = z;
        } else 
		{
            if (document.all) 
			{
                eval("document.all." + id + ".style.zIndex = \"" + z + "\"");
            }
        }
    }
}
function getZ(id) {
    return document.getElementById(id).style.zIndex;
}
// Show & hide "select menus"
function showHide(div,top,height){
    obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4;
    if(obj.display=='block')
    {
		 if (navigator.userAgent.toLowerCase().indexOf("msie 6") != -1 ||
			navigator.userAgent.toLowerCase().indexOf("msie 5.23") != -1 ||
			navigator.userAgent.toLowerCase().indexOf("safari") != -1)
			obj.top = document.getElementById(div).offsetTop + 3;
        obj.display='none';
        selectOn = null;
    }
    else
    {
        obj.display='block';
        if (navigator.userAgent.toLowerCase().indexOf("msie 6") != -1 ||
			navigator.userAgent.toLowerCase().indexOf("msie 5.23") != -1 ||
			navigator.userAgent.toLowerCase().indexOf("safari") != -1)
			obj.top = document.getElementById(div).offsetTop - 3;
        //obj.top = top + height;
        setTimeout("selectOn = '"+div+"';",1);
    }
}