var menuTimer =null;
function showmenu(obj1,obj2,state,location,floattype,aspect,pixels){
	var btn=document.getElementById(obj1);
	var obj=document.getElementById(obj2);
	var h=btn.offsetHeight;
	var w=btn.offsetWidth;
	var x=btn.offsetLeft;
	var y=btn.offsetTop;

	if(typeof(floattype) == "undefined"){
		floattype = "effect";
	}
	if(floattype == "effect"){
		obj.onmouseover =function(){
			showmenu(obj1,obj2,'show',location);
		}
		obj.onmouseout =function(){
			showmenu(obj1,obj2,'hide',location);
		}
	}
	while(btn=btn.offsetParent){y+=btn.offsetTop;x+=btn.offsetLeft;}

	var hh=obj.offsetHeight;
	var ww=obj.offsetWidth;
	var xx=obj.offsetLeft;//style.left;
	var yy=obj.offsetTop;//style.top;
	var obj2state=state.toLowerCase();
	var obj2location=location.toLowerCase();

	var showx,showy;

	if(obj2location=="left" || obj2location=="l" || obj2location=="top" || obj2location=="t" || obj2location=="u" || obj2location=="b" || obj2location=="r" || obj2location=="up" || obj2location=="right" || obj2location=="bottom"){
		if(obj2location=="left" || obj2location=="l"){showx=x-ww;showy=y;}
		if(obj2location=="top" || obj2location=="t" || obj2location=="u"){showx=x;showy=y-hh;}
		if(obj2location=="right" || obj2location=="r"){showx=x+w;showy=y;}
		if(obj2location=="bottom" || obj2location=="b"){showx=x;showy=y+h;}
	}else{
		showx=xx;showy=yy;
	}
	if(typeof(aspect) != "undefined"){
		if(aspect == 'right'){
			var browser = getOs();
			pixels = pixels + 10;
			showx = showx + pixels;
		}
	}
	obj.style.left=showx+"px";
	obj.style.top=showy+"px";
	if(state =="hide" && floattype == "effect"){
		menuTimer =setTimeout("hiddenmenu('"+ obj2 +"')", 500);
	} else if(floattype == "effect") {
		clearTimeout(menuTimer);
		obj.style.visibility ="visible";
	} else {
		obj.style.visibility ="visible";
	}
}
function hiddenmenu(psObjId){
	document.getElementById(psObjId).style.visibility ="hidden";
}
function getOs()
{
	var OsObject = "";
	if(navigator.userAgent.indexOf("MSIE")>0) {
		return "MSIE";
	}
	if(isFirefox=navigator.userAgent.indexOf("Firefox")>0){
		return "Firefox";
	}
	if(isSafari=navigator.userAgent.indexOf("Safari")>0) {
		return "Safari";
	}
	if(isCamino=navigator.userAgent.indexOf("Camino")>0){
		return "Camino";
	}
	if(isMozilla=navigator.userAgent.indexOf("Gecko")>0){
		return "Gecko";
	}
}