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;
	lk = (lk.substring(0,1)=="/" && !(lk.substring(0,8)=="/mstinc/"))? contextPath + lk: lk; // for local pages
	
	var messages = new Array(6);
	// Standard 3rd Party Warning
	messages[0] = messages[1] = '<h2>Third Party Site Disclaimer</h2><p>Links to non-Farmers Bank websites are provided solely as pointers to information on topics that may be useful to our users and will not apply to Farmers Bank\'s Privacy Policy. Farmers Bank has no control over the content of such non-Farmers Bank websites. If you choose to link to a website not controlled by Farmers Bank, Farmers Bank makes no warranties, either expressed or implied, concerning the content of such site, including the accuracy, completeness, reliability or suitability thereof for any particular purpose, nor does Farmers Bank warrant that such site or content is free from any claims of copyright, trademark or other infringement of the rights of third parties or that such site or content is devoid of viruses or other contamination. Farmers Bank does not guarantee the authenticity of documents on the Internet. Links to non-Farmers Bank sites do not imply any endorsement of or responsibility for the opinions, ideas, products, information or services offered at such sites, or any representation regarding the content at such sites.</p>';

	var content = new Array();
	var index = 0;
	content[index++] = messages[msg];
	content[index++] = '<div style="margin-top:1em;text-align:center"><a href="'+lk+'"'+(target?' target="'+target+'"':'')+' onclick="$(\'#ex_dis\').hide()">Continue</a>&#160;&#160;<a href="#" onclick="$(\'#ex_dis\').hide();return false;">Decline</a></div>';	
	$("#ex_dis").html(content.join("")).show();
	scrollTo(0,0);
}

function getUrl(){
	var url = document.location.href;
	var urlstart = url.indexOf("newUrl=") + 7;
	var urlToReturn = url.substring(urlstart);
	return urlToReturn;
}
