function getElementHeight(Elem) {
	var op5 = (navigator.userAgent.indexOf("Opera 5")!=-1)||(navigator.userAgent.indexOf("Opera/5")!=-1);
	if (document.layers) {
		var elem = getObjNN4(document, Elem);
		return elem.clip.height;
	}else{
		if (op5) 	yPos = Elem.style.pixelHeight;
		else 		yPos = Elem.offsetHeight;
		return yPos;
	}
}
function getElementWidth(Elem) { 
	var op5 = (navigator.userAgent.indexOf("Opera 5")!=-1)||(navigator.userAgent.indexOf("Opera/5")!=-1);
	if (document.layers) {
		var elem = getObjNN4(document, Elem);
		return elem.clip.width;
	}else{
		if (op5) 	xPos = Elem.style.pixelWidth;
		else 		xPos = Elem.offsetWidth;
		return xPos;
	}
}
function hideSubMenu(tag){
	var getChildren = tag.childNodes
	for(var i=0;i<getChildren.length;i++){
		if(typeof getChildren[i].className!='undefined'){
		  if(getChildren[i].className.search('subLinks')!=-1){
			  getChildren[i].style.display='none'
		  }
		}
	}
}
function showSubMenu(tag){
	var getChildren = tag.childNodes;
	var width = tag.value;

	for(var i=0;i<getChildren.length;i++){
		if(typeof getChildren[i].className !='undefined'){
		  if(getChildren[i].className.search('subLinks')!=-1){
			  getChildren[i].style.display='block';
	          getChildren[i].style.left=width+'px';
			  getChildren[i].style.minWidth= getElementWidth(getChildren[i].parentNode) + 10 +'px';
			  getChildren[i].onmouseover = function()
			  {
			  	this.style.display='block';
			  }
		  }
		}
	 }
}
window.onload = function(){
//	var menu = (document.all)?document.all.menulinks.childNodes: document.getElementById('menulinks').childNodes;
	var menu = document.getElementById('menulinks').childNodes;
	
//	alert(menu.valueOf);
	var left = 0;
	for(var i=0;i<menu.length;i++){
		if(typeof menu[i].className != 'undefined'){
		
			if(menu[i].className.search('super') > -1){
				if(left == 0) menu[i].className = ('super first');
				//else if(left > 600) menu[i].className = ('super last')
				//no good in IE
				//menu[i].style.width = function(){ getElementWidth(this)};
				if (left <= 0)
					left = 1;
				menu[i].value = left-1;
				menu[i].onmouseover = function(){ showSubMenu(this)}
				menu[i].onmouseout = function(){ hideSubMenu(this)}
				left+=getElementWidth(menu[i]);
			}
		}
	}
}