///////////////////////////////////////////////////////////////////////
//ds.js Menu code 005 and other Standard functions 
//tc@digitalsnake.co.uk
//Aug 2001
///////////////////////
//History
//
///////////////////////////////////////////////////////////////////////


//Menu code 005
//Certain bugs still need to be fixed relating to Netscape not resetting the menu reliably
<!--
function 
Up(){
	//Define the menu objects for refrence
	if(parseInt(navigator.appVersion) > 3){
	
	set = 1;
	
		if (navigator.appName == "Netscape"){
			var layerRef="window.document.";
			var styleSwitch="";
		}else{
			var layerRef="document.all.";
			var styleSwitch=".style";
		}

		//Define menu 0
		menustate[0] = "hidden";
		menubak[0] = eval(layerRef+'menubak0'+styleSwitch);
		menuselect[0] = eval(layerRef+'menuselect0'+styleSwitch);
		
		//Define menu 1
		menustate[1] = "hidden";
		menubak[1] = eval(layerRef+'menubak1'+styleSwitch);
		menuselect[1] = eval(layerRef+'menuselect1'+styleSwitch);
		
		//Define menu 2
		menustate[2] = "hidden";
		menubak[2] = eval(layerRef+'menubak2'+styleSwitch);
		menuselect[2] = eval(layerRef+'menuselect2'+styleSwitch);
	}
}

function openMenu(menuID){
	//Open a menu
	if (menustate[menuID] == "hidden" && set){
		menubak[menuID].visibility = "visible";
		menubak[menuID].zindex = "200";
		menuselect[menuID].visibility = "visible";
		menuselect[menuID].zindex = "250";
		
		menustate[menuID] = "visible";
	}
}

function ieKillMenu(){
	//If the mouse is sill over the window and not over a menuselection close
	if (window.event.toElement && window.event.toElement.className != "menuSelection"){
		resetMenus();
	}		
}

function nnKillMenu(){
	//If the menus have been set up clear them
	if (set){
		resetMenus();
	}		
}

function resetMenus(){
	//close all menus
	if (set){
		imgSwap('menubar', 'menuBar');
	
		for (i=0; i<menubak.length; i++){
			if (menustate[i] == 'visible'){
				if (menuselect[i]){
					menuselect[i].visibility = 'hidden';
					menuselect[i].zindex = '150';			//close select
				}
				menustate[i] = 'hidden';
				menubak[i].visibility = 'hidden';
				menubak[i].zindex = '100';		
			}
		}	
	}
}


//Std functions
function imgLayerSwap(imgID,imgName,divID){
	//Swap a pair of images
	if(parseInt(navigator.appVersion) > 3){
		if (navigator.appName == "Netscape"){
			eval("window.document."+divID+".document['"+imgID+"'].src = "+imgName+".src");
		}else{
			document[imgID].src = eval(imgName + '.src');
		}
	}
}

function imgSwap(imgID,imgName) {
	//Swap a pair of images
	if(parseInt(navigator.appVersion) > 3){
		if (navigator.appName == "Netscape"){
			document.images[imgID].src = eval(imgName + '.src');
		}else{
			document[imgID].src = eval(imgName + '.src');
		}
	}
}

function funky() {
	if (parseInt(navigator.appVersion) > 3 && navigator.appName != "Netscape"){
		src = event.toElement;
		src.oldcol = src.style.color;
		src.style.color = 'red';
	}
}

function normal() {
	if (parseInt(navigator.appVersion) > 3 && navigator.appName != "Netscape"){
		src=event.fromElement;
		src.style.color = src.oldcol;
	}
}

function click() {
	if (event.button==2) {
		alert("TAO SPORTS LTD\n(R) Registered Trade Mark \n\n(C)Copyright 2000 - 2004. All rights reserved.");
	}
}
//-->