var bValid = false;
var sMessage = "";
var objWin = null;
var sCurrent = "regionA";
function showRegion(sRegion){

	if(sCurrent != null){
		hideRegion(sCurrent);
	}
	if(sCurrent==sRegion){
		hideRegion(sRegion);
		sCurrent = null;
	}
	else{
		var oR = document.getElementById(sRegion);
		if(oR!=null){
			oR.style.display = "block";
			oR.style.visibility = "visible";
		}
		sCurrent = sRegion;
	}
	return false;
}
function hideRegion(sRegion){
	var oR = document.getElementById(sRegion);
	if(oR!=null){
		oR.style.display = "none";
		oR.style.visibility = "hidden";
	}
}
function launchPage(sPage){
	winCheck();
	var sURL;
	var iLeft = (screen.width / 2) - (480 / 2);
	var iTop = (screen.height / 2) - (620 / 2);
	var sParams = "width=480,height=620,left=" + iLeft + ",top=" + iTop;
	sURL = "assets/static/" + sPage;
	objWin = window.open(sURL, "LeisureTime", sParams);
}
function winCheck(){
	if(objWin != null){
		objWin.close();
	}
}
function closeWindow(){
	if(window.opener.objWin!=null){
		window.opener.objWin.close();
		window.opener.objWin = null;
	}
	else{
		window.close();
	}
}
function hoverOver(objRow){
	objRow.style.fontWeight = "bold";
}
function hoverOut(objRow){
	objRow.style.fontWeight = "normal";
}
function showMsg(lngID){
	alert(sLang[lngID]);
}
function launchWindow(sURL){
	winCheck();
	objWin = window.open(sURL, 'USA');
	objWin.focus();
	
}

function launchNewWindow(page, width, height){
	winCheck();
	var iLeft = (screen.width / 2) - (480 / 2);
	var iTop = (screen.height / 2) - (620 / 2);	
	var args = "width=" + width + ",height=" + height + ",left=" + iLeft + ",top=" + iTop;
	objWin = window.open(page, 'NewWindow', args);
	objWin.focus();
}