 var type=1;
 function Online() {
      if ( type == 2 )
      {
		 window.location = "https://ExactTMS.mbankonline.com";
      }
      else   
      {
		if (val())
		{
			document.forms[0].action = "https://ibs5.secure-banking.com/cgi-bin/hbproxy.exe/1389a/newlogin";
			document.forms[0].oldlogin.value = "";
			document.forms[0].submit();
		}
      }
 }
 
 function WherePassword() {
      document.forms[0].action = "https://ibs5.secure-banking.com/cgi-bin/hbproxy.exe/1389a/newlogin";
      document.forms[0].v1.value = "";
	  document.forms[0].oldlogin.value = "Old";
	  document.forms[0].submit();
 }
 
 function ItiLink(username) {
		document.forms[0].action = "https://ibs5.secure-banking.com/cgi-bin/hbproxy.exe/1389a/newlogin";
		document.forms[0].v1.value = username;
		document.forms[0].oldlogin.value = "Old";
		document.forms[0].submit();
 }
 

 function enableDisable( index )
 {
	type = index;
	if ( index == 2 )
	{
		document.forms[0].v1.disabled = true;
		document.forms[0].v1.style.background = "#CCCCCC";
		 
	}
	else
	{
		document.forms[0].v1.disabled = false;
		document.forms[0].v1.style.background = "#FFFFFF";
	}
		
 }

function enter(e)
{
  if (navigator.appName == "Netscape") {
      Key = e.which;
   }
   else
      Key = window.event.keyCode;

   if (Key == 13) 
   {
       Online();
   }    
}

function val( )
{ 
      var ret = 1;
      var f = document.forms[0];

      if (f.v1.value.length == 0) {
         alert("Please enter your username.");
         f.v1.focus();
         ret = 0;
      }
      return ret;

}
