//  <![CDATA[
  	
//DHTML show and hide functions 

var vislayer = '';
var timeoutid;
var menuhtml;
var menuname;

var ns = (document.layers)? true:false;
var ie = (document.all)? true:false;
var ns6 = (navigator.appName == 'Netscape' && parseInt(navigator.appVersion) >= 5 && parseInt(navigator.appVersion) < 6);

function donothing(){};

function init(){


	if (ns) {
	   window.onResize = reloadIt;
	}
	
	function reloadIt() {
		document.location = document.location;
	}
}

function show(me){
	if (vislayer != me && vislayer != ""){
		hide(vislayer);
	} else if (vislayer == me) {
		clearTimeout(timeoutid);
		timeoutid = "";
	}
	
	vislayer = me; //set current visible layer

	if (ie){    //ie
		document.all[me].style.visibility = "visible";
	} else if (ns6) {
	    document.getElementById(me).style.visibility = "visible";
	} else{    //netscape
		document.layers[me].visibility = "show";
	}
}

function hide(me){
	if (!timeoutid) {
		timeoutid = setTimeout('hide(\'' + me + '\')', 500)
	} else {
		vislayer = ""; //un-set current visible layer
		clearTimeout(timeoutid);
		timeoutid = "";	
		if (ie){    //ie
			document.all[me].style.visibility = "hidden";
		} else if (ns6) {			
		    document.getElementById(me).style.visibility = "hidden";
		} else{    //netscape
			document.layers[me].visibility = "hide";
		}
	}
}

function highlight(which,color) {
	if (document.all || document.getElementById) {
		which.style.backgroundColor=color;
	}
}


function createmenu(mymenuname,tot) {
	if (ns6 || ie) {
		menuhtml = "<table cellspacing=0 cellpadding=0 border=0 bgcolor=\"#FFFFFF\" width=\"150\" style=\"border: 1px solid #CCCCCC;\">\n";		
                menuhtml += "<td bgcolor=#0066ff height=20 >";
                menuhtml += "<font face=tahoma size = 2 color=white>" + tot + "</font>" ;
                menuhtml += "</td>\n";
	} else {
		menuhtml = "<table cellspacing=0 cellpadding=1 border=0 bgcolor=\"#003184\">\n";
		
                menuhtml += "<tr><td>\n";
		menuhtml += "<table cellspacing=0 cellpadding=4 border=0 bgcolor=\"#ffffff\" width=\"150\">\n";
	
                menuhtml += "<td bgcolor=#FFFFFF height=20>";
                menuhtml += "<font face=tahoma color=white size=2 >" + tot + "</font>" ;
                menuhtml += "</td>\n";
        }
	menuname = mymenuname;
}

function menu() {

	if (ns6 || ie) {
		menuhtml += "</tr>\n";
		menuhtml += "</table>";
	} else {
		menuhtml += "</table>\n";
		menuhtml += "</td></tr>\n";
		menuhtml += "</table>\n";
	}

	return(menuhtml);
}

function addmenuitem(text, href, target) {
	if (!target) {
		target = "_parent"
	}
	
	if (!href) {
		href = ""
	}
	
	if (ns6 || ie) {
		menuhtml += "<tr onclick=\"location.href='" + href + "'\" onMouseover=\"show('" + menuname + "'); highlight(this,'#00ccff')\" onMouseout=\"hide('" + menuname + "'); highlight(this,'#FFFFFF')\">";
		if (ie) {
			menuhtml += "<td nowrap style=\"padding: 3px; cursor: hand;\"><font color=navy face=tahoma size=2>" + text + "</font></td>";		
		} else {
			menuhtml += "<td nowrap style=\"padding: 3px; cursor: pointer;\"><font color=navy face=tahoma size=2>" + text + "</font></td>";	
		}
		menuhtml += "</tr>\n";
	} else {
		menuhtml += "<tr onMouseover=\"show('" + menuname + "');\" onMouseout=\"hide('" + menuname + "');\">";	
		menuhtml += "<td nowrap><a href=\"" + href + "\" onMouseover=\"show('" + menuname + "')\" onMouseout=\"hide('" + menuname + "')\" class=\"menu\" target=\"" + target + "\">" + text + "</a></td>";	
		menuhtml += "</tr>\n";		
	}

}



 // ]]>
