/********For Player Development************/
var reloadTo = '';
function go(url1,url2) {
	reloadTo = url1;
    setTimeout('location.href = reloadTo',700); // 1.3 second delay
    window.open(url2);
    //return false;
}

/******Turn Off Bubbling*******************/	
/*function turnOffBubbling(e)
{
	if (!e) var e = window.event;
	e.cancelBubble = true;
	if (e.stopPropagation) e.stopPropagation();
}*/
  
/******Selects active navigation button********/

function selectActiveNavButton(strActiveNavButton,strAction,objEvent){

	//turnOffBubbling(objEvent);
	var imgDir = "pix/newassets/menu/";
	var navImg, navImgID, navName;
	var activateNavButton = strActiveNavButton;
	var action = "";
	
	if(strAction == "1"){
		action = "_mo";
	} 
	else if (strAction == "2") {
		action = "_on";
	} 
	else if (strAction == "3") {
		action = "_off";
	}
	else {
		action = "_off";
	}
	
	//Set Image
	navName = activateNavButton;
	navImgID = navName + "_img";
	//navImg = document.getElementById(navImgID);
	navImgDir = imgDir + navName + action+ ".gif";
	//navImg.src = navImgDir;
	stringExpression = "document.getElementById(" + "'" + navImgID + "'" + ").src = " + "'" + navImgDir + "'";
	//alert(stringExpression);
	setTimeout(stringExpression,0);
}

/******Selects sub navigation button********/
function selectActivateSubNavButton(strActiveTopNav, strSubNav, strAction, strActiveSubNav, objEvent)
{
	
	//turnOffBubbling(objEvent);
	//Turn on active top nav button.
	if(strActiveSubNav == "" || !(strActiveSubNav.indexOf(strActiveTopNav) > -1)){
		selectActiveNavButton(strActiveTopNav,strAction,objEvent);
	} 
	//Turn on sub nav button.
	selectActiveNavButton(strSubNav,strAction,objEvent);
	
}

/******Selects active sub navigation menu********/
function selectActivateSubNavs(strActiveSubNav,strSubNavArray){
	var browserName=navigator.appName;
	var activateSubNav = strActiveSubNav;
	var subNavList = strSubNavArray.split("|");
	var subNav, subNavName;
	for(i=0;i<subNavList.length;i++){
		
		subNavName = subNavList[i]
		
		if(subNavName != activateSubNav){
			//subNav = document.getElementById(subNavName);
			stringExpression = "document.getElementById(" + "'" + subNavName + "'" + ").className = " + "'menuNormal'";
			//subNav.className = "menuNormal";
			setTimeout(stringExpression,0);
		}
		else {
			//subNav = document.getElementById(subNavName);
			
			if (browserName=="Microsoft Internet Explorer")
			{
				stringExpression = "document.getElementById(" + "'" + subNavName + "'" + ").className = " + "'menuHover2'";
				setTimeout(stringExpression,0);
				//subNav.className = "menuHover2";
			}
			else 
			{
				stringExpression = "document.getElementById(" + "'" + subNavName + "'" + ").className = " + "'menuHover'";
				setTimeout(stringExpression,0);
				//subNav.className = "menuHover";
			}
		}
		
	}
}

function getposOffset(overlay, offsettype){
	var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
	var parentEl=overlay.offsetParent;
	while (parentEl!=null){
	totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
	parentEl=parentEl.offsetParent;
	}
	if (offsettype=="top")
	{
	totaloffset=totaloffset+25;
	}
	if (offsettype=="left")
	{
	totaloffset=totaloffset-250;
	}
	return totaloffset;
}

function overlay(curobj, subobj){
	if (document.getElementById)
	{
		if(document.getElementById(subobj).style.display == "none")
		{
			var subobj=document.getElementById(subobj);
			//subobj.style.left=getposOffset(curobj, "left")+"px"
			//subobj.style.top=getposOffset(curobj, "top")+"px"
			subobj.style.display="block";
		}
		else if(document.getElementById(subobj).style.display == "block") 
		{
			document.getElementById(subobj).style.display="none";
		}
	}
}

function overlayclose(subobj){
	
}