/**
 * $().rollovers();
 */
jQuery.fn.rollovers = function(){
	return this.each(function(){
		jQuery('img,input[@type="image"]',this).filter('[@src*="_off."]').each(function(){
			el = this;
			// using Image objects for both so IE will preload correctly.
			el.overObj = new Image();
			el.outObj = new Image();
			el.outObj.src = el.src;
			el.overObj.src = el.src.replace(/_off\.([a-z]{3,4})$/i,"_on.$1");
		})
		.hover(
			function(e){ // mouseover
				this.src = this.overObj.src;
			},
			function(e){ // mouseout
				this.src = this.outObj.src;
			}
		);
	});
};

jQuery(function(){
	jQuery('.rollover').rollovers();
});


// Some convenience functions 

function openPDF(page)
{
bWindow = window.open(''+page,'newWin');
	bWindow = null;
	return;
}


function openWin(url,name,width,height,options)
{
var n = name;
var w = width;
var h = height;
var o = options;
n = (n==null)?"_blank":n;
w = (isNaN(w) || w==null)?700:w;
h = (isNaN(h) || h==null)?600:h;
o = (o==null)?"toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1":(o.indexOf(",")!=0)?","+o:o;

var posX = Math.ceil((parseInt(screen.width) - w) / 2);
var posY = Math.ceil((parseInt(screen.height) - h) / 2);
aWindow = window.open(url,n,"width=" + w + ",height=" + h + ",left=" + posX + ",top=" + posY + o);
}

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;
}

function showWarning(lk, desc, target, msg)
{
	desc = (desc) ? desc : "Third Party Site";
	target = (target) ? target : "_blank";
	msg = (msg) ? msg : 0;
	
	var messages = new Array(6);
	messages[0] = '<h2>Third Party Site Disclaimer</h2><br>You are leaving Holladay Bank And Trust\'s website. Links that may be accessed via this link are for the convenience of informational purposes only. Any products and services accessed through this link are not provided or guaranteed by Holladay Bank And Trust. The site you are about to visit may have a privacy policy that is different than Holladay Bank And Trust\'s. Please review their privacy policy. Holladay Bank And Trust does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[1] = '<h2>Third Party Site Disclaimer</h2><br>You are leaving Holladay Bank And Trust\'s website. Links that may be accessed via this link are for the convenience of informational purposes only. Any products and services accessed through this link are not provided or guaranteed by Holladay Bank And Trust. The site you are about to visit may have a privacy policy that is different than Holladay Bank And Trust\'s. Please review their privacy policy. Holladay Bank And Trust does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[2] = '<h2>Third Party Site Disclaimer</h2><br>You are leaving Holladay Bank And Trust\'s website. Links that may be accessed via this link are for the convenience of informational purposes only. Any products and services accessed through this link are not provided or guaranteed by Holladay Bank And Trust. The site you are about to visit may have a privacy policy that is different than Holladay Bank And Trust\'s. Please review their privacy policy. Holladay Bank And Trust does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[3] = '<h2>Third Party Site Disclaimer</h2><br>You are leaving Holladay Bank And Trust\'s website. Links that may be accessed via this link are for the convenience of informational purposes only. Any products and services accessed through this link are not provided or guaranteed by Holladay Bank And Trust. The site you are about to visit may have a privacy policy that is different than Holladay Bank And Trust\'s. Please review their privacy policy. Holladay Bank And Trust does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[4] = '<h2>Third Party Site Disclaimer</h2><br>You are leaving Holladay Bank And Trust\'s website. Links that may be accessed via this link are for the convenience of informational purposes only. Any products and services accessed through this link are not provided or guaranteed by Holladay Bank And Trust. The site you are about to visit may have a privacy policy that is different than Holladay Bank And Trust\'s. Please review their privacy policy. Holladay Bank And Trust does not endorse the content contained in these sites, nor the organizations publishing those sites, and hereby disclaims any responsibility for such content.';
	
	messages[5] = '<h2>Non-Secure Email Disclaimer</h2><br/>As a convenience to you and to provide additional means of communications between you and Holladay Bank And Trust, you can use electronic mail (e-mail) to contact the bank regarding general inquiries and general access and maintenance issues. However communication via e-mail is not considered secure, and you agree that you will not use e-mail to transmit sensitive and/or confidential information such as account numbers, user IDs, or PINs, or to request or authorize any financial transaction.';

	var content = new Array();
	var index = 0;
	content[index++] = messages[msg];
	content[index++] = '<br /><br /><br />';
	content[index++] = '<div align="center"><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\'">Decline</a></div></div>';	
	document.getElementById("ex_dis").innerHTML = content.join("");
	document.getElementById("ex_dis").style.display = "block";
	scrollTo(0,0);
}


document.write('<div id="ex_dis" style="background-color: #ffffff; font-family: Arial, Helvetica, sans-serif; font-size: 8pt; font-weight: normal; color: #000000; text-align: left; position:absolute; top:125px; left:300px; border: thin solid #1A448E; padding: 15px; display: none; z-index: 3000; width:350px;">blank</div>');
