/************************************************************************************************************
* This function is used in the onclick of the a tag to display the external site warning. 
* @param msg - Integer specifying the which message to display.
* @param lk - The a link object
* Usage: <a href="http://wwww.mysite.com" onclick="return displayThirdPartyAlert(1,this);">My Site</a>
**************************************************************************************************************/
function displayThirdPartyAlert(msg,lk){
	var description = lk.innerHTML;
	if(description.indexOf('alt="') != -1){
		var x = description.indexOf('alt="')+5;
		var temp = description.substring(x);
		description = temp.substring(0,temp.indexOf("\""));
	}
	showWarning(lk.href, description, lk.target, msg)
	return false;
}

/************************************************************************************************************
* This function is used in the href of the a tag to display the external site warning. 
* @param lk - The url of the site to be opened
* @param desc - The description of the site to be opened, i.e. the name of the site.
* @param target - Allows for the window to opened in a new window
* @param msg - Integer specifying the which message to display.
* Usage: <a href="javascript:('http://wwww.mysite.com');">My Site</a>
**************************************************************************************************************/
function showWarning(lk, desc, target, msg){
	desc = (desc) ? desc : "Third Party Site";
	target = (target) ? target : "";
	msg = (msg) ? msg : 0;
	
	var messages = new Array(6);
	messages[0] = '<p class="subheader"><strong>Third Party Site Disclaimer</strong></p><p style="font-size: 8pt; font-family: arial;">By accessing the noted link you will be leaving Farmers & Merchants State Bank of Bushnell\'s website and entering a website hosted by another party.  Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of Farmers & Merchants State Bank of Bushnell.  We encourage you to read and evaluate the privacy and security policies on the site you are entering, which may be different than those of Farmers & Merchants State Bank of Bushnell.</p><p style="font-size: 8pt; font-family: arial;">Links to external websites found herein are provided for your information and convenience only.  Farmers & Merchants State Bank has no control over such sites, and is not responsible for the availability of such sites, and does not endorse, and assumes no responsibility or liability for any content, advertising, products or materials on or available from such sites or resources. Farmers & Merchants State Bank assumes no responsibility or liability, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content, goods or services available on or through any such site or resource.  Farmers & Merchants State Bank does not warrant that such sites, content, information, products, or services are free from any claims of copyright, trademark, or other infringement of the rights of third parties.  Farmers & Merchants State Bank does not warrant that such sites, content, information, products, or services are devoid of viruses, worms, Trojan horses, or other items of a destructive nature.  If you find anything inappropriate on any third party site linked herein, please <a href="http://www.bushnellbankhb.com/home/contactus.html" target="_blank">contact us</a>.</p>';
	
	messages[1] = '<p class="subheader"><strong>Third Party Site Disclaimer</strong></p><p style="font-size: 8pt; font-family: arial;">By accessing the noted link you will be leaving Farmers & Merchants State Bank of Bushnell\'s website and entering a website hosted by another party.  Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of Farmers & Merchants State Bank of Bushnell.  We encourage you to read and evaluate the privacy and security policies on the site you are entering, which may be different than those of Farmers & Merchants State Bank of Bushnell.</p><p style="font-size: 8pt; font-family: arial;">Links to external websites found herein are provided for your information and convenience only.  Farmers & Merchants State Bank has no control over such sites, and is not responsible for the availability of such sites, and does not endorse, and assumes no responsibility or liability for any content, advertising, products or materials on or available from such sites or resources. Farmers & Merchants State Bank assumes no responsibility or liability, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content, goods or services available on or through any such site or resource.  Farmers & Merchants State Bank does not warrant that such sites, content, information, products, or services are free from any claims of copyright, trademark, or other infringement of the rights of third parties.  Farmers & Merchants State Bank does not warrant that such sites, content, information, products, or services are devoid of viruses, worms, Trojan horses, or other items of a destructive nature.  If you find anything inappropriate on any third party site linked herein, please <a href="http://www.bushnellbankhb.com/home/contactus.html" target="_blank">contact us</a>.</p>';
	
	messages[2] = '';
	
	messages[3] = '';

	messages[4] = '';
	
	messages[5] = '';

	var content = new Array();
	var index = 0;
	content[index++] = messages[msg];
	content[index++] = '<div align="center" style="font-size: 8pt; font-family: arial;"><a href="'+lk+'" target="'+target+'" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Continue</a>&#160;&#160;<a href="javascript:void(\'0\');" onclick="document.getElementById(\'ex_dis\').style.display = \'none\'">Cancel</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.display = "block";
	scrollTo(0,0);
}


function showWarningFrame(lk, desc, target, msg){
	desc = (desc) ? desc : "Third Party Site";
	target = (target) ? target : "";
	msg = (msg) ? msg : 0;
	
	var messages = new Array(6);
	messages[0] = '<p class="subheader"><strong>Third Party Site Disclaimer</strong></p><p style="font-size: 8pt; font-family: arial;">By accessing the noted link you will be leaving Farmers & Merchants State Bank of Bushnell\'s website and entering a website hosted by another party.  Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of Farmers & Merchants State Bank of Bushnell.  We encourage you to read and evaluate the privacy and security policies on the site you are entering, which may be different than those of Farmers & Merchants State Bank of Bushnell.</p><p style="font-size: 8pt; font-family: arial;">Links to external websites found herein are provided for your information and convenience only.  Farmers & Merchants State Bank has no control over such sites, and is not responsible for the availability of such sites, and does not endorse, and assumes no responsibility or liability for any content, advertising, products or materials on or available from such sites or resources. Farmers & Merchants State Bank assumes no responsibility or liability, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content, goods or services available on or through any such site or resource.  Farmers & Merchants State Bank does not warrant that such sites, content, information, products, or services are free from any claims of copyright, trademark, or other infringement of the rights of third parties.  Farmers & Merchants State Bank does not warrant that such sites, content, information, products, or services are devoid of viruses, worms, Trojan horses, or other items of a destructive nature.  If you find anything inappropriate on any third party site linked herein, please <a href="http://www.bushnellbankhb.com/home/contactus.html" target="_blank">contact us</a>.</p>';
	
	messages[1] = '<p class="subheader"><strong>Third Party Site Disclaimer</strong></p><p style="font-size: 8pt; font-family: arial;">By accessing the noted link you will be leaving Farmers & Merchants State Bank of Bushnell\'s website and entering a website hosted by another party.  Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of Farmers & Merchants State Bank of Bushnell.  We encourage you to read and evaluate the privacy and security policies on the site you are entering, which may be different than those of Farmers & Merchants State Bank of Bushnell.</p><p style="font-size: 8pt; font-family: arial;">Links to external websites found herein are provided for your information and convenience only.  Farmers & Merchants State Bank has no control over such sites, and is not responsible for the availability of such sites, and does not endorse, and assumes no responsibility or liability for any content, advertising, products or materials on or available from such sites or resources. Farmers & Merchants State Bank assumes no responsibility or liability, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with the use of or reliance on any such content, goods or services available on or through any such site or resource.  Farmers & Merchants State Bank does not warrant that such sites, content, information, products, or services are free from any claims of copyright, trademark, or other infringement of the rights of third parties.  Farmers & Merchants State Bank does not warrant that such sites, content, information, products, or services are devoid of viruses, worms, Trojan horses, or other items of a destructive nature.  If you find anything inappropriate on any third party site linked herein, please <a href="http://www.bushnellbankhb.com/home/contactus.html" target="_blank">contact us</a>.</p>';
	
	messages[2] = '';
	
	messages[3] = '';

	messages[4] = '';
	
	messages[5] = '';

	var content = new Array();
	var index = 0;
	content[index++] = messages[msg];
	content[index++] = '<div align="center" style="font-size: 8pt; font-family: arial;"><a href="'+lk+'" target="'+target+'" onclick="parent.content.document.getElementById(\'ex_dis\').style.display = \'none\'">Continue</a>&#160;&#160;<a href="javascript:void(\'0\');" onclick="parent.content.document.getElementById(\'ex_dis\').style.display = \'none\'">Cancel</a></div></div>';	
	parent.content.document.getElementById("ex_dis").innerHTML = content.join("");
	parent.content.document.getElementById("ex_dis").style.display = "block";
	scrollTo(0,0);
}


