<!--

var logonWin;
function ebank_per_popup() {
	if(!logonWin || logonWin.closed) {
	} else {			
		var flag = confirm("Are you sure to close your existing e-banking browser and logon again?");
		if(flag) {
			logonWin.close();				
		} else {
			return;
		}
	} 
  logonWin=window.open("https://www.hangseng.com/logon/eng/pib/logon.asp?srvc=sts&business=N","EBankTopFrame","width=800,height=450,top=0,left=0,status=1,scrollbars=1,toolbar=0,location=0,menubar=0,resizable=1");
}

function ebank_per_reg() {
  window.open("https://e-banking.hangseng.com/1/2/newuserregistration?regLanguage=en","EBankTopFrame","width=790,height=440,top=0,left=0,status=1,scrollbars=1,toolbar=0,location=0,menubar=0,resizable=1");
}

function ebank_bus_popup() {
	if(!logonWin || logonWin.closed) {
	} else {			
		var flag = confirm("Are you sure to close your existing e-banking browser and logon again?");
		if(flag) {
			logonWin.close();				
		} else {
			return;
		}
	} 
  logonWin=window.open(" https://ebusiness.hangseng.com/1/2/b2g.launching?lang=en&EorderInfo=NORMALODER&__targetLocale=en","EBankTopFrame","width=800,height=450,top=0,left=0,status=1,scrollbars=1,toolbar=0,location=0,menubar=0,resizable=1");
}

function ebank_bus_reg() {
  bib_logonreg("bib_register","eng");
}

function logon() {
	
	var rb = document.getElementsByName('ebk_radiobutton');
	if (rb[1].checked) {
			ebank_bus_popup();
		} else {
			ebank_per_popup();
		}
}

function register() {
	
	var rb = document.getElementsByName('ebk_radiobutton');
		if (rb[1].checked) {
			ebank_bus_reg();
		} else {
			ebank_per_reg();
		}
}

function knowmore() {
	
	var rb = document.getElementsByName('ebk_radiobutton');
		if (rb[1].checked) {
			var p='/hsb/eng/onl/hsebib/index.html';
			top.location.href=p;
		} else {
			var p='/hsb/eng/onl/hsebs/index.html';
			top.location.href=p;
		}
}

function ebklogon(){
	html="";

	html+='<table width="206" border="0" cellspacing="0" cellpadding="1">';
	html+='    <tr>';
	html+='        <td bgcolor="ededed"><table width="180" height="110" border="0" align="center" cellpadding="0" cellspacing="0">';
	html+='            <tr>';
	html+='                <td><div align="center"><img src="/einvc/eng/com/images/logo.gif" alt="e-Banking" width="124" height="33" hspace="2" vspace="2"></div></td>';
	html+='            </tr>';
	html+='            <tr>';
	html+='                <td><table width="129" border="0" align="center" cellpadding="0" cellspacing="0">';
	html+='                    <tr>';
	html+='                        <td><input type="radio" name="ebk_radiobutton" value="radiobutton" checked></td>';
	html+='                        <td width="115"><img src="/einvc/eng/com/images/personal.gif" alt="Personal e-Banking" width="122" height="13"></td>';
	html+='                    </tr>';
	html+='                    <tr>';
	html+='                        <td><input type="radio" name="ebk_radiobutton" value="radiobutton"></td>';
	html+='                        <td><img src="/einvc/eng/com/images/business.gif" alt="Business e-Banking" width="112" height="13" align="absmiddle"></td>';
	html+='                    </tr>';
	html+='                    </table></td>';
	html+='            </tr>';
	html+='            <tr>';
	html+='                <td height="35"><table width="141" border="0" align="center" cellpadding="0" cellspacing="0">';
	html+='                     <tr>';
	html+='                         <td width="65"><a href="JavaScript:logon()"><img src="/einvc/eng/com/images/logon.gif" alt="Logon" width="55" height="19" hspace="5" vspace="3" border="0"></a></td>';
	html+='                         <td width="118"><table width="100%" border="0" cellspacing="0" cellpadding="0">';
	html+='                             <tr>';
	html+='                                 <td height="15"><a href="JavaScript:register()"><img src="/einvc/eng/com/images/register.gif" alt="Register Now" width="69" height="10" border="0"></a></td>';
	html+='                             </tr>';
	html+='                             <tr>';
	html+='                                 <td><a href="JavaScript:knowmore()"><img src="/einvc/eng/com/images/know.gif" alt="Know More" width="69" height="10" border="0"></a></td>';
	html+='                             </tr>';
	html+='                             </table>                          </td>';
	html+='                     </tr>';
	html+='                     </table></td>';
	html+='            </tr>';
	html+='        </table>';
	html+='        </td>';
	html+='    </tr>';
	html+='    <tr>';
	html+='        <td height="1"><img src="/einvc/eng/com/images/spacer.gif" width="1" height="1"></td>';
	html+='    </tr>';
	html+='</table>';
	
	document.write(html);
}
//-->