// JavaScript Document

function makeVisible(ele) {
	ele=(typeof ele == "string")?document.getElementById(ele) : ele;
	ele.style.visibility='visible';	
}

function makeHide(ele) {
	ele=(typeof ele == "string")?document.getElementById(ele) : ele;
	ele.style.visibility='hidden';	
}

function showDrop(ele) {
	var other, ele2,tmp, flag;
	other=(ele == "PORT") ? "FOL": "PORT"; 

	ele =(typeof other  == "string")?document.getElementById(ele) : ele;
	ele2 =(typeof other  == "string")? document.getElementById(other) : other;

	tmp=ele.getAttribute('class');
	if (tmp != null) { flag = false; } else { flag = true; }	
	if (flag) {
		tmp = ele.getAttribute("className");
		if (tmp.indexOf('dropDown') != -1)
		{
			ele.className='stub';
		} else { 
			ele.className='dropDown';
			ele2.className='stub';
		}
	} else {
		if (tmp.indexOf('dropDown') != -1)
		{	
			ele.setAttribute("class", "stub");
		} else { 
			ele.setAttribute("class", "dropDown");
			ele2.setAttribute("class", "stub");
		}
	}
}

function change2GIF(ele,gif) {
	ele=(typeof ele == "string")?document.getElementById(ele) : ele;
	ele.setAttribute('src',gif);
}


function isIExplore() {
	var isIE = navigator.appName == 'Microsoft Internet Explorer' ? 1 : 0;
	var i, j, navRoot, node, node2;
	var makeRoll = function() { 
			for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
				if (node.nodeName=="LI") {
				node.onmouseover=function() {
				this.className+=" over";
					}
				node.onmouseout=function() {
				this.className=this.className.replace(" over", "");
					}
				}
			}
	}
	var startList = function() {
		if (document.all&&document.getElementById) {
			navRoot = document.getElementById("FOL");
			makeRoll();
			navRoot = document.getElementById("PORT");
			makeRoll();
		}
	}
	// better than meet
	if (isIE) {
	startList();
	}
}
