function goToLink()
{
	var rpUrlPrd = 'https://www.corp.regionalelite.com/rea';
	var rpUrlInt = 'https://www.webint.regionalelite.com/rea';
	var testUrl = getServerUrl();
	var finalUrl;
	if('www.regionalelite.com' == testUrl){
		finalUrl = rpUrlPrd;
	}else{
		finalUrl = rpUrlInt;
	}
	window.open(finalUrl);
}
function getServerUrl()
{
	var wurl = window.location.href;
	var arrayVar=wurl.split("/");
	var reqUrl = arrayVar[2];
	return reqUrl;
}

function showLightBox(id)
{
	var overlay=document.getElementById('overlay');
	var lightbox=document.getElementById(id);
	
	overlay.style.display="block";
	lightbox.style.display="block";	
	setTop(id);

}
function hideLightBox(id)
{
	var overlay=document.getElementById('overlay');
	var lightbox=document.getElementById(id);
	
	overlay.style.display="none";
	lightbox.style.display="none";	

}
function getTop(id)
{
	var bodyHeight=document.documentElement.offsetHeight;
	var elmtHeight=document.getElementById(id).offsetHeight;
	//alert(bodyHeight+"-"+elmtHeight);
	var calculatedTop=((bodyHeight/2)-(elmtHeight/2));
	//alert(calculatedTop);
	return calculatedTop;	
}

function setTop(id)
{
	var top=getTop(id);
	document.getElementById(id).style.top=top+'px';
}

/*--------lightbox-------*/
navHover = function() {
	var lis = document.getElementById("navmenu-h").getElementsByTagName("LI");
	for (var i=0; i<lis.length; i++) {
		lis[i].onmouseover=function() {
			this.className+=" iehover";
		}
		lis[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" iehover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", navHover);
