var overcheck = false;
var xrole = "";

function showmenu(){
	xref = GetObjectRef("divRoles");
	if (xref){
		//Position menu
		xref0 = GetObjectRef("imgRoles");
		
		iLeft = getAbsPos(xref0,"Left");
		iTop = getAbsPos(xref0,"Top");
		
		xref.style.left = iLeft;
		xref.style.top = iTop;
		
		xref.style.visibility = "visible";
	}
}

function hidemenu(){
	if (!overcheck){
		xref0 = GetObjectRef("divRoles");
		if (xref0){
			xref0.style.visibility = "hidden";
		}
	}
}

function getAbsPos(elt,which) {
	iPos = 0;
	while (elt != null) {
		iPos += elt["offset" + which];
		elt = elt.offsetParent;
	}
	return iPos;
}

function gorole(xrole0){
	xrole = xrole0
	setTimeout('navrole()',250);
}


function gotorole(){
	xref0 = GetObjectRef("xrole00");
	if (xref0){
		xrole = xref0.value;
		setTimeout('navrole()',250);
	}
}

function navrole(){
	switch (xrole.toUpperCase()){
		case "CEO":
			document.location.href = "CEO_solutions.asp";
			break;
		case "CMO":
			document.location.href = "CMO_solutions.asp";
			break;
		case "CFO":
			document.location.href = "CFO_solutions.asp";
			break;
		case "CPO":
			document.location.href = "CPO_solutions.asp";
			break;
		case "CSO":
			document.location.href = "CSO_solutions.asp";
			break;
		default:
			document.location.href = "solutions.asp";
			break;
	}
}
