// Javascript Document

/* Settings for showMortgageWarning() below */
var mortgage_links = [	{ name: "Mortgage Application – LaSalle Office", url: "http://mclancy-myhtnblo.mortgagewebcenter.com" },
						{ name: "Mortgage Application – Joliet Office", url: "http://sbutler-myhtnblo.mortgagewebcenter.com" }
					 ];
var mortgage_args = { links: mortgage_links, dividing_spaces: 6 };

function showWarning(url){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<b><font color ="#611674" size="2">FROM HOMETOWN NATIONAL BANK</font></b><br><br>From time to time, we provide links to other websites for the use of our visitors. These sites have been compiled from both internal and external sources. By clicking on the "Click Here" button below, you will be leaving our website. Although we have reviewed the websites prior to creating the link, we are not responsible for the content of the sites. Information on linked website pages may become dated or change without notice, and we do not represent or warrant the information contained on these linked pages are complete or accurate. We suggest that you always verify information obtained from linked websites before you act upon such information. Please note: The privacy policy of Hometown National Bank does not apply to the web site you are visiting. We recommend you review that web site\'s privacy policy.<br><br>This page link is provided solely for you convenience. We are NOT responsible for the accuracy and completeness of information, typographical errors or errors for omission. We do not assume any liability as a result of the use or misuse of the information. By your use of this information, you recognize and agree to hold us, our employees, agents, successors, and/or assignees harmless from any liability as a result of your using this information, materials, products, or services listed at these website links. <br>';

	content[index++] = '<br>';
	content[index++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="window.open(\''+url+'\');document.getElementById(\'ex_dis\').style.visibility = \'hidden\'"><font size ="2">Click here to continue</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'"><font size ="2">Cancel</font></a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0, 0);
}
function showMortgageWarning( ){
	//content creation
	var links = mortgage_args.links;
	var dividing_spaces = mortgage_args.dividing_spaces;
	var content = new Array();
        var index = 0;
	content[index++] = '<b><font color ="#611674" size="2">FROM HOMETOWN NATIONAL BANK</font></b><br><br>From time to time, we provide links to other websites for the use of our visitors. These sites have been compiled from both internal and external sources. By clicking on the "Click Here" button below, you will be leaving our website. Although we have reviewed the websites prior to creating the link, we are not responsible for the content of the sites. Information on linked website pages may become dated or change without notice, and we do not represent or warrant the information contained on these linked pages are complete or accurate. We suggest that you always verify information obtained from linked websites before you act upon such information. Please note: The privacy policy of Hometown National Bank does not apply to the web site you are visiting. We recommend you review that web site\'s privacy policy.<br><br>This page link is provided solely for you convenience. We are NOT responsible for the accuracy and completeness of information, typographical errors or errors for omission. We do not assume any liability as a result of the use or misuse of the information. By your use of this information, you recognize and agree to hold us, our employees, agents, successors, and/or assignees harmless from any liability as a result of your using this information, materials, products, or services listed at these website links. <br>';

	var new_links = []
	for(link_index in links) {
		link = links[link_index];
		new_links.push('<a href="javascript:void(\'0\');" onclick="window.open(\''+link.url+'\');document.getElementById(\'ex_dis\').style.visibility = \'hidden\'"><font size ="2">'+link.name+'</font></a>')
	}
	content[index++] = '<br>';
	content[index++] = '<div align="center">';
	var spacing = "";
	for(var i = 0; i < dividing_spaces; i++) {
		spacing += "&nbsp;";
	}
	content[index++] = new_links.join(spacing);
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0, 0);
}

function showEmailWarning(email_form){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<b><font color ="#611674" size="2">FROM HOMETOWN NATIONAL BANK</font></b><br><br>Hometown National Bank website is a secure site, but we ask that you refrain from including personal information such as; Social Security numbers or account numbers in your E-mail. If you need to contact the bank about a specific account please give us your name, daytime phone number and a brief description and one of our customer service representatives will give you a call as soon as possible. <br>';

	content[index++] = '<br>';
	content[index++] = '<div align="center"><a href="'+email_form+'" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'"><font size ="2">Click here to continue</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'"><font size ="2">Cancel</font></a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0, 0);
}



document.write('<div id="ex_dis" style="background-color: #FBF8EC; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000; position:absolute; left:100px; top:100px; margin:5% 5%; border: thin solid #06424D; padding: 15px; visibility: hidden;z-index: 100; width:650px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=#005B3F,offX=4,offY=4,positive=true); "></div>');

//////////////////////////////////////////////
function showCrditCardLinks(){
	//content creation
	var content = new Array();
        var index = 0;
	content[index++] = '<a href = "javascript:showWarning(\'https://online.elancard.com/customizedPricing/elan/home.do?locationId=3246\');">Click here to learn more and/or to apply for a Visa Consumer or a Visa Business Credit Card.</a><br> <br><a href = "javascript:showWarning(\'https://www.myaccountaccess.com/elanCard/login.do?theme=elan2&loc=3246\');">For existing Customer/Members, please click here to access your account.</a>  <br>';

	content[index++] = '<br>';
	content[index++] = '<div align="center"><a href="javascript:void(\'\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'"><font size ="2">Close</font></a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0, 0);

}
document.write('<div id="ex_dis" style="background-color: #FBF8EC; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000; position:absolute; left:100px; top:100px; margin:5% 5%; border: thin solid #06424D; padding: 15px; visibility: hidden;z-index: 100; width:350px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=#005B3F,offX=4,offY=4,positive=true); "></div>');


function showWarning2(url){
	//content3 creation
	var content3 = new Array();
        var index3 = 0;
	content3[index3++] = '<b><font color ="#611674" size="2">Warning!</font></b><br><br>Hometown National Bank does not control the content of or approve any  website that is linked through this browser. Search results are not  filtered or screened by the bank or any of its agents, representatives,  or service providers. Users who search the internet using this browser  do so at their own risk and are responsible for the results. The  community link features are being provided by an outside source - Hometown National Bank is not responsible for the content. <br>';

	content3[index3++] = '<br>';
	content3[index3++] = '<div align="center"><a href="javascript:void(\'0\');" onclick="window.open(\''+url+'\');document.getElementById(\'ex_dis\').style.visibility = \'hidden\'"><font size ="2">Click here to continue</font></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.visibility = \'hidden\'"><font size ="2">Cancel</font></a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content3.join("");
	document.getElementById("ex_dis").style.visibility = "visible";
	scrollTo(0, 0);

}
document.write('<div id="ex_dis" style="background-color: #FBF8EC; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000; position:absolute; left:100px; top:100px; margin:5% 5%; border: thin solid #06424D; padding: 15px; visibility: hidden;z-index3: 100; width:650px; FILTER: progid:DXImageTransform.Microsoft.dropShadow( Color=#005B3F,offX=4,offY=4,positive=true); "></div>');

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}