<!--

function openWin(page, name, details)
	{
		newWin = window.open(page, name, details);
		if (window.focus) { newWin.focus() }
	}

function calcLoamAmt(){
	var cashout = parseFloat(document.form.cashout.value.replace(',',''));
	var mort_amt1a = parseFloat(document.form.mort_amt1a.value.replace(',',''));
	document.form.mort_amt1.value = mort_amt1a + cashout;
	doFormattedNumberField(document.form.mort_amt1,false);
	return true;
}
function formatDynamicNumbers(){
	var fields = new Array("appraised","owe");
	for(x=0;x<fields.length;x++){
		var field = fields[x];
		for (var i = 0; i<document.form.elements.length; i++) {
			if ((document.form.elements[i].name.indexOf(field) > -1)) {
				doFormattedNumberField(document.form.elements[i],false);
			}
		}
	}
	return true;
}

function articleCalculator()
{
		var content_hg = document.getElementById("content").offsetHeight;
		document.getElementById("main-container").style.height = (content_hg + 270 ) + "px";
		
		var main_hg = document.getElementById("main-container").offsetHeight;
		document.getElementById("footer-container").style.top = (main_hg - 54)+ "px";   
		document.getElementById("footer-container").className='there';            

}
function articleMainCalculator()
{
		var content1 = document.getElementById("content1").offsetHeight;
		var content2 = document.getElementById("content2").offsetHeight;		
		document.getElementById("main-container").style.height = (content1 + content2 + 440 ) + "px";
		
		var main_hg = document.getElementById("main-container").offsetHeight;
		document.getElementById("footer-container").style.top = (main_hg - 214)+ "px";   
		document.getElementById("footer-container1").style.top = (main_hg - 340)+ "px";
		document.getElementById("footer-container").className='there';  
		document.getElementById("footer-container1").className='there';  
		    

}
function calculator()
{
		var content_hg = document.getElementById("main-content").offsetHeight;
		document.getElementById("main-container").style.height = (content_hg + 420 ) + "px";
		
		var main_hg = document.getElementById("main-container").offsetHeight;
		document.getElementById("footer-container").style.top = (main_hg - 54)+ "px";
		document.getElementById("footer-container1").style.top = (main_hg - 180)+ "px";  
		document.getElementById("footer-container").className='there';  
		document.getElementById("footer-container1").className='there';  
		        
    
		
		formatDynamicNumbers();      

}
/*
 * Purpose: Set flag to false to prevent popup exit if user clicks on internal link
 */
function setLeavingFlagToFalse() 
{ 
	gbLeaving = false; 
}
/*
 * Purpose: Set gbLeaving flag to false on form submit event
 */
function initForm() 
{

	window.document.form.onsubmit = setLeavingFlagToFalse;
}

function doProcessing()
{
	initForm();
	document.getElementById('submitButton').className = 'thide';
	document.getElementById('processing').className = 'tshow';
}
//-->
