/* Added scripts */

function email_disclaimer(mailto_address){
  message  = "Notice: Because there is a small risk that information transmitted\n";
  message += "via Internet email could fall into the wrong hands, we suggest that\n";
  message += "confidential information, such as account numbers or social security\n";
  message += "numbers, not be transmitted via email. Instead, please contact us\n";
  message += "directly at your nearest bank branch. Thank you.";
  
  alert(message);
  window.open('mailto:' + mailto_address);
}

function insurance_disclaimer(mailto_address){
  message  = "Notice: Because there is a small risk that information transmitted\n";
  message += "via Internet email could fall into the wrong hands, we suggest that\n";
  message += "confidential information, such as account numbers or social security\n";
  message += "numbers, not be transmitted via email. Instead, please contact us\n";
  message += "directly at United Bank Insurance Agency. Thank you.";
  
  alert(message);
  window.open('mailto:' + mailto_address);
}

var BANK_NAME = "United Bank";
function external_disclaimer(goHere){
  message  = BANK_NAME + " has no control over information at any site hyperlinked\n";
  message += "to from this Site. " + BANK_NAME + " makes no representation concerning\n";
  message += "and is not responsible for the quality, content, nature, or reliability\n";
  message += "of any hyperlinked site and is providing this hyperlink to you only as a\n";
  message += "convenience. The inclusion of any hyperlink does not imply any endorsement,\n";
  message += "investigation, verification or monitoring by " + BANK_NAME + " of any\n";
  message += "information in any hyperlinked site. In no event shall " + BANK_NAME+ "\n";
  message += "be responsible for your use of a hyperlinked site.";

  if (confirm(message)){
	window.open(goHere, '_blank');
	}
}

function modelesswin(url,mwidth,mheight){
if (document.all&&window.print) //if ie5
eval('window.showModelessDialog(url,"","help:0;resizable:1;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
else
eval('window.open(url,"cip","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
}

function changeColor(id, color) { 
	element = document.getElementById(id); 
	element.style.backgroundColor = color; 
} 


/* Online Banking scripts */

/**************************************************************
*  Enter the bank's routing number                            *
*   and the fully-qualified host name for the online banking  *
**************************************************************/
var sRoutingNumber = "072408805";
var sHost = "secure.unitedbankofmichigan.com";
var bHost = "ecorp.unitedbankofmichigan.com";
/**************************************************************
* That's all                                                  *
**************************************************************/
 
   
function doLoginRefresh()
{
    if(document.Remote.loginTo[1].checked == true)
    {
		document.Remote.nmUID.value = document.Remote.AccessID.value;
		document.Remote.nmRTN.value = '072408805';
		document.Remote.action = 'https://ecorp.unitedbankofmichigan.com/EBC_EBC1961/EBC1961.asp?WCI=Process&WCE=RemoteLogon&IRL=T&nmRTN=';
		if (document.Remote.AccessID.value != "")
		{
		setTimeout('document.Remote.reset()', 200);
		document.Remote.loginTo.value='ecom';
		return true;
		}
	else
		{
		alert("\n Please Enter a valid Access ID.  Thank you!"); 
		return false;
		}	
 	}
   
   if(document.Remote.loginTo[0].checked == true)
    {
       document.Remote.action = 'https://secure.unitedbankofmichigan.com/PBI_PBI1961/pbi1961.asp?WCI=RemoteLogin&amp;Rt=072408805&amp;LogonBy=Connect3&PRMACCESS=Account';
		if (document.Remote.AccessID.value != "")
		{
		setTimeout('document.Remote.reset()', 200);
		return true;
		}
	else
		{
		alert("\n Please Enter a valid Access ID.  Thank you!\n\n\t"); 
		return false;
		}	
 	}
}

/* Dreamweaver scripts */

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}
