var sSSLPort = ""
var sDomainName = "www.eafutures.com.hk"
var sContextPath = "bea"
var sProtocol = "https"

function openLogin(strlang){
	var xx = (screen.availWidth - 975)/2;
	var redirectURL = "logon.do";
	var option1 = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=auto,resizable=1,width=800,height=600,top=0,left="+xx;
		
	var locale = "";
	if (strlang == ("CHS")){
		locale = "zh_CN";
	}else if(strlang == ("ENG")){
		locale = "en_US";
	}else{
		locale = "zh_TW";
	}
	
	redirectURL = sProtocol + '://' + sDomainName + (sSSLPort==""?sSSLPort:"") + '/' + sContextPath + '/logon.do?locale=' + locale;
	
	window.open(redirectURL, "BEAFTRADE" , option1);
}