var curMenu
var curMain
var nav = new Array()
var clearCurrent = true
var clearReset

function mnuDropDown(loc, on, off, sub) {
	if (document.images) {
		this.loc = loc;
		this.on = new Image();
		this.off = new Image();
		this.on.src = on;
		this.off.src = off;
		this.sub = sub
	}
}

function on_image(pos) {
	if (document.images && typeof nav[pos] != 'undefined') {
		document.images[nav[pos].loc].src = nav[pos].on.src;
		if (curMenu) {

			document.getElementById(curMenu).style.visibility = 'hidden'
		}
		if (curMain) {
			if (curMain != pos) {
				document.images[nav[curMain].loc].src = nav[curMain].off.src;
				clearCurrent = false
			}
		}
		//if (document.layers || document.all) {
			if (nav[pos].sub != "") {
				document.getElementById(nav[pos].sub).style.visibility = 'visible';
				curMenu = nav[pos].sub;
				clearCurrent = false
			}
		//}
		curMain = pos
	}
}

function off_image(pos) {
	if (document.images) {
		clearCurrent = true;
		setTimeout('clrTimer()',100)
	}
}

function onPoint() {
	clearCurrent = false
}

function offPoint() {
	clrDrop()
}

function clrDrop() {
	clearCurrent = true;
	setTimeout('clrTimer()',100)
}

function clrCur() {
	if (curMenu) {
		document.getElementById(curMenu).style.visibility = 'hidden'
	}
	if (curMain) {
		document.images[nav[curMain].loc].src = nav[curMain].off.src
	}
}

function clrTimer() {
	if (clearCurrent) {
		clrCur()
	}
}

function noClear() {
	if (curMenu) {
		clearCurrent = false
	}
}

function colorMe(src,col)
{
	if (col == 0) {
		src.className = 'clsLite'
	} else {
		src.className = 'clsNorm'
	}
}
function prepBrowser() {
	if (document.images) {
		nav[1] = new mnuDropDown("main_prod", "images/prod_on.gif", "images/prod_off.gif", 'dropdown1');
		nav[2] = new mnuDropDown("main_sup", "images/sup_on.gif", "images/sup_off.gif", 'dropdown2');
		nav[3] = new mnuDropDown("main_down", "images/down_on.gif", "images/down_off.gif", 'dropdown3')
		nav[4] = new mnuDropDown("main_serv", "images/serv_on.gif", "images/serv_off.gif", 'dropdown4');
		nav[5] = new mnuDropDown("main_corp", "images/corp_on.gif", "images/corp_off.gif", 'dropdown5');
		nav[6] = new mnuDropDown("main_ord", "images/ord_on.gif", "images/ord_off.gif", 'dropdown6');
		nav[7] = new mnuDropDown("main_home", "images/home_on.gif", "images/home_off.gif", '');
		nav[8] = new mnuDropDown("main_search", "images/search_on.gif", "images/search_off.gif", '');
	}
}
