// Script to control DHTML menu// Copyright 2001 Micah Bly<!--//var submenu_activate = null;var submenu_timeout = null;var bird_timeout = null;var active_menu = 0;// variables to control bird vertical alignmentvar bird_calc = 0;var bird_start = new Array(52,118,161);var height = new Array(21,15,15);// amount of space required by each submenuvar nummenus = new Array(0,5,3);var vmargin = 8;var topline = 74;function itemOn(pos,mtype) {    clearTimeout(bird_timeout);	if (mtype>0 && active_menu==mtype) clearTimeout(submenu_timeout);	else clearTimeout(submenu_activate);	bird_calc = bird_start[0] + (pos*height[0]);	    // Turn on the bird, move to correct location	if (document.layers) {		document.layers.thebird.top = bird_calc;			document.layers.thebird.visibility = "show";	}	else if (document.all) {		document.all.thebird.style.top = bird_calc;		document.all.thebird.style.visibility = "visible";	}	else if (document.getElementById) {		document.getElementById('thebird').style.top = bird_calc;		document.getElementById('thebird').style.visibility = "visible";	}    // is it associated with a submenu?  	if (mtype>0) {   // Yes, open submenu and slide rest downwards		submenu_activate = window.setTimeout('openSub('+pos+','+mtype+');',750);	}	else active_menu = 0;}function openSub(pos,mtype) {	active_menu = mtype;	var vbase = topline + height[mtype]*nummenus[mtype] + vmargin;  	var subname = 'submenu'+mtype;	// show menu	if (document.layers) document.layers[subname].visibility = "show";	else if (document.all) document.all(subname).style.visibility = "visible";	else if (document.getElementById) document.getElementById(''+subname+'').style.visibility = "visible";					// slide everything else down	for(var i = pos+1; i < 9; i++) {        var mid = "menu"+i;        var toptemp = vbase + (height[0] * (i-1));        if (document.layers) document.layers[mid].top = toptemp;        else if (document.all) document.all(mid).style.top = toptemp;		else if (document.getElementById) document.getElementById(''+mid+'').style.top = toptemp;					}}function itemOff(pos,mtype) {	// Turn off the bird	bird_timeout = window.setTimeout('hideBird();',125);	// was a submenu on?	if (mtype>0) {		submenu_timeout = window.setTimeout('hideSub('+mtype+');',125);	}}function subOn(pos,mtype) {	clearTimeout(submenu_activate);    clearTimeout(submenu_timeout);    clearTimeout(bird_timeout);	bird_calc = bird_start[mtype] + (pos*height[mtype]);	active_menu = mtype;    // Turn on the bird, move to correct location	// For Netscape	if (document.layers) {		document.layers.thebird.top = bird_calc;			document.layers.thebird.visibility = "show";	}	else if (document.all) {		document.all.thebird.style.top = bird_calc;		document.all.thebird.style.visibility = "visible";	}	else if (document.getElementById) {		document.getElementById('thebird').style.top = bird_calc;		document.getElementById('thebird').style.visibility = "visible";	}}function subOff(pos,mtype) {	// Turn off the bird	bird_timeout = window.setTimeout('hideBird();',125);	// turn off the submenus as we leave	submenu_timeout = window.setTimeout('hideSub('+mtype+');',125);}function hideSub(id) {  	var subname = 'submenu'+id;	// hide menu	if (document.layers) document.layers[subname].visibility = "hide";	else if (document.all) document.all(subname).style.visibility = "hidden";	else if (document.getElementById) document.getElementById(''+subname+'').style.visibility = "hidden";					// slide everything back up	if (id==1) var k=3;	else var k=5;	for(var i = k+1; i < 9; i++) {        var mid = "menu"+i;        var toptemp = topline + (height[0] * (i-1));        if (document.layers) document.layers[mid].top = toptemp;        else if (document.all) document.all(mid).style.top = toptemp;		else if (document.getElementById) document.getElementById(''+mid+'').style.top = toptemp;					}}function hideBird(){	if (document.layers) document.layers.thebird.visibility = "hide"	else if (document.all) document.all.thebird.style.visibility = "hidden"  	else if (document.getElementById) document.getElementById('thebird').style.visibility = "hidden";				}// reloads window on resize, if browser=Netscapeif (document.layers){	window.onResize = reloadIt;}// Does actual reloading for netscapefunction reloadIt() {  document.location = document.location;}// -->