<!--

function display_secureform(pagename){ myWindow = window.open(pagename, "Secure_Server", "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=yes,copyhistory=0,width=500,height=375") }
function display_printform(pagename){ myWindow = window.open(pagename, "Secure_Server", "toolbar=1,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=yes,copyhistory=0,width=640,height=420") }


var isTruthInLending = false;
var isHELOC = false;
var home_loan = false;

function validator(theForm){
	// alert if the rate link has not clicked
	if (!isTruthInLending)
	{
		alert("You must click and read the Important Terms of our HELOC link.");
		return false;
	}
	
	if (!isHELOC)
	{
		alert("You must click and read the Consumer Handbook on Home Equity Lines of Credit.");
		return false;
	}
	return true;
}

function validator2(theForm){
	// alert if the rate link has not clicked
	if (!home_loan)
	{
		alert("You must click and read the Buying Your Home information.");
		return false;
	}
	return true;
}

function mandatory_clicks(){
	if (document.getElementById('heloc_form')){
		document.getElementById('heloc_form').innerHTML = "<form action='http://mccuhomeloan.lendingstation.com/default.aspx' method='post' onsubmit='return validator(this)' target='_blank'><ul><li><a href='/external/uploads_tiny/files/80_Important_terms.pdf' target='_blank' onClick='return isTruthInLending = true;'>Important Terms of our Home Equity Line of Credit</a></li><li><a href='/external/uploads_tiny/files/6392W_07.pdf' target='_blank' onClick='return isHELOC = true;'>When Your Home Is On The Line: What You Should Know About Home Equity Lines Of Credit</a></li></ul><p align='center'><input type='submit' value='Submit'></p></form>";
	}
	
	if (document.getElementById('home_loan_form')){
		document.getElementById('home_loan_form').innerHTML = "<form action='http://mccuhomeloan.lendingstation.com/default.aspx' method='post' onsubmit='return validator2(this)' target='_blank'><ul><li><a href='/external/uploads_tiny/files/8440W_07.pdf' target='_blank' onClick='return home_loan = true;'>Buying Your Home</a></li></ul><p align='center'><input type='submit' value='I agree.'></p></center></form>";
	}
}


	function submitform()
	{
	  document.searchForm.submit();
	}
	
	function submitLocator() {
		
		if( check_zip() ){ 
			
			document.locator.submit();
			
		}
		
	}
	
	function check_zip(){
		
		if(document.getElementById('zipcode').value == ''){
			
			alert('Please enter a ZIP Code.')
			
			return false;
			
		}else{
			
			
			return true;
			
		}
		
		
	}
	
	

var gAutoPrint = true; // Tells whether to automatically call the print function

function printSpecial()
{
if (document.getElementById != null)
{
var html = '<HTML>\n<HEAD>\n';

if (document.getElementsByTagName != null)
{
var headTags = document.getElementsByTagName("head");
if (headTags.length > 0)
html += headTags[0].innerHTML;
}

html += '\n<style>body{background-image:none;background-color:#ffffff;}#printReady{}#main_content{width:600px;height:auto;margin-auto;}.prestyled_table td{border:1px solid #999999;}</style>\n</HE>\n<BODY>\n';

var printReadyElem = document.getElementById("printReady");

if (printReadyElem != null)
{
html += printReadyElem.innerHTML;
}
else
{
alert("Could not find the printReady function");
return;
}

html += '\n</BO>\n</HT>';

var printWin = window.open("","printSpecial");
printWin.document.open();
printWin.document.write(html);
printWin.document.close();
if (gAutoPrint)
printWin.print();
}
else
{
alert("The print-ready feature is not supported by your browser.");
}
}




//-->