// initilization
var isIE = (document.all) ? 1:0;
var isNS4 = (document.layers) ? 1:0;
var isNS6 = (navigator.userAgent.indexOf("Netscape6") != -1) ? 1:0;
var isMac = (navigator.userAgent.indexOf("Mac") != -1) ? 1:0;


//changes gifs for onclick or onmouseover
function changegif(img_name,img_src) {
   	document[img_name].src=img_src;
}


//shows or hides menu defined in <div> tags
function menu(tabname,display) {

    if (display) {
        if (isNS6) {
                document.getElementById(tabname).style.visibility="visible";
        }
//doesnt work: error says this has no properties
//        else if (isNS4) { //doesnt work: error says this has no properties
//                document.layers[tabname].visibility="show";
//        }
        else if (isNS4) { 
		return;
        }
        else {
                document.all[tabname].style.visibility="visible";
        }
   }
   else {
        if (isNS6) {
                document.getElementById(tabname).style.visibility="hidden";
        }
//doesnt work: error says this has no properties
//        else if (isNS4) { //doesnt work: error says this has no properties
//                document.layers[tabname].visibility="hide";
//        }
        else if (isNS4) { 
		return;
        }
        else {
                document.all[tabname].style.visibility="hidden";
        }
   }
}


// a temporary solution for NS4  
// this js file is not able to display the menus correctly 
function htmlwrite(what) {
	if (isNS4) {
		document.write(what);
	}
	else {
		return;
	}
}
