var curMenu
var curMain
var nav = new Array()
var clearCurrent = true
var clearReset

function prepBrowser() {
	if (document.images) {
		nav[1] = new mnuDropDown("main_prod", "images/radio_on.gif", "images/radio_off.gif", 'dropdown1');
		nav[2] = new mnuDropDown("main_sup", "images/ultra_on.gif", "images/ultra_off.gif", 'dropdown2');
		nav[3] = new mnuDropDown("main_down", "images/breast_on.gif", "images/breast_off.gif", 'dropdown3')
		nav[4] = new mnuDropDown("main_serv", "images/ct_on.gif", "images/ct_off.gif", 'dropdown4');
		nav[5] = new mnuDropDown("main_corp", "images/ostio_on.gif", "images/ostio_off.gif", 'dropdown5');
		nav[6] = new mnuDropDown("main_ord", "images/mri_on.gif", "images/mri_off.gif", 'dropdown6');
	//	nav[7] = new mnuDropDown("main_home", "home_on.gif", "home_off.gif", '');
	//	nav[8] = new mnuDropDown("main_search", "search_on.gif", "search_off.gif", '');
	//	nav[9] = new mnuDropDown("main_cart", "cart_on.gif", "cart_off.gif", '');
	}
}

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()',200)
	}
}

function onPoint() {
	clearCurrent = false
}

function offPoint() {
	clrDrop()
}

function clrDrop() {
	clearCurrent = true;
	setTimeout('clrTimer()',200)
}

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'
	}
}

