function menuInit() {  // makes dropdown menus transparent for IE
	/*if (ie)
		{
		var i=1;
		while (eval("typeof topmenu"+i+"=='object'")){
			eval('topmenu'+i+'.css.filter="alpha(opacity=95)"');
			i++;
		}
	}
	document.onmousemove=getMouseX;
	if(ns)document.captureEvents(Event.MOUSEMOVE)
	*/
	// now select a menu item (fron query string)

	if(ns4)
	{
		if (document.topBitDiv) selectedMenuNum=document.topBitDiv.selectedMenuNum
	}

	if(selectedMenuNum)
	{
		changeBackground(selectedMenuNum);
	}
	
}

var curX;
var topNavElm;

function getMouseX(e){
	curX=parseInt(ns ? e.pageX : event.clientX);
	if(topNavElm){
		var i=1;
		while (eval("typeof topmenu"+i+"=='object'")){
			var curObj=eval("topmenu"+i);
			if(curObj.css.visibility=="inherit"){
				curObj.easeTo(curX-25,null,1,30);
			}
			i++;
		}
	}
}

function hideDetector() {
	upperdetector.hide();
	lowerdetector.hide();
	var i=1;
	while ((eval("typeof topmenu"+i+"=='object'"))&&('topmenu'+i+'.css.visibility=="inherit"')){
		eval("topmenu"+i+".fadeOut()");
		i++;
	}
}

divObject.prototype.fadeOut=divObjectFade;

function divObjectFade(){
	if(ie5&&!isMac){
		this.css.filter='blendTrans(duration=0.15)';
		this.ref.filters[0].apply();
		this.hide();
		this.ref.filters[0].play();
	}
	else this.hide();
}



function moveDropdown(navNo,e){
	eval('topmenu'+navNo+'.easeTo(curX-20,null,1,50)');
}

function changeBackground(navNo) {
	if (ie){
		var i=1;
		while(typeof document.images["navcolour" + navNo + i]=="object"){
		 	document.images["navcolour" + navNo + i].src = menuActive.src;
			i++;
		}
	
	}
	if (ns){
		var i=1;
		while(eval("typeof navcolour" + navNo + i+"Img==\"object\"")){
		 	eval("navcolour" + navNo + i+"Img.ref.src = menuActive.src");
			i++;
		}
	
	}
	if (!ie4)
		{
			topNavElm=navNo;
		}
}

function undoBackground(navNo) {
	if (ie){
		var i=1;
		while(typeof document.images["navcolour" + navNo + i]=="object"){
		 	document.images["navcolour" + navNo + i].src = menuInactive.src;
			i++;
		}
	}
	if (ns){
		var i=1;
		while(eval("typeof navcolour" + navNo + i+"Img==\"object\"")){
		 	eval("navcolour" + navNo + i+"Img.ref.src = menuInactive.src");
			i++;
		}
	
	}

	topNavElm=false;
}


// generic rollover code
function imgOn(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "on.src");
        }
}

function imgOff(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "off.src");
        }
}

//----------------------------------------------------------------------------------------------
function colourOn(whichcell) {
	if (ie)
	{
		whichcell.className='tableOn'
	}
}
//----------------------------------------------------------------------------------------------
function colourOff(whichcell) {
	if (ie)
		{
			whichcell.className='tableOff'
		}
}
//---------------------------------------------------------------------------------------------
function openWin(filename, winname, width, height) {
	if(!winname) winname = ""
	if(!width) width = 500
	if(!height) height = 600
	return window.open(filename, winname, "width="+width+",height="+height+",scrollbars=yes,resizable=yes")
}
//---------------------------------------------------------------------------------------------
//do nothing function - use on links to get onclick in netscape
function z(){}

// new topmenu code

