<!--

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

function indexCalculate()
{
	var bg_length = document.getElementById("left-container").offsetHeight;
	
	document.getElementById("main-container").style.height = (bg_length + 600 )+ "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 - 235)+ "px"; 
	document.getElementById("footer-container1").className='there'; 
	document.getElementById("footer-container").className='there'; 
}

function splashCalculate()
{
	var bg_length = document.getElementById("left-container").offsetHeight;
	document.getElementById("main-container").style.height = (bg_length + 475 )+ "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-container1").className='there'; 
	document.getElementById("footer-container").className='there'; 
	
}

function calculateForm()                  
{            
	var ques_height = window.document.getElementById("ques1-padding").offsetHeight;
	var img_hg = window.document.getElementById("main2_agent").offsetHeight;
	var newheight=img_hg+ques_height;
	
	if((ques_height  + img_hg) > 200)
	{
		window.document.getElementById("formtxt-container2").style.height = (ques_height  + img_hg-150) + "px" ;
	}
	
	var total_height = ques_height + img_hg;            
	var hdr_height = 140;
	if (navigator.appVersion.indexOf("MSIE")!=-1) {
		window.document.getElementById("frm-bottomborder").style.top =  (total_height + hdr_height)+ "px";
		window.document.getElementById("form-bkgrd").style.height = total_height + "px";
		window.document.getElementById("frm-leftborder").style.height =  (ques_height  + img_hg)+ "px";
		window.document.getElementById("frm-rightborder").style.height =  (ques_height  + img_hg + 2)+ "px";
	}else {
		window.document.getElementById("frm-bottomborder").style.top =  (total_height + hdr_height-8)+ "px";
		window.document.getElementById("form-bkgrd").style.height = (total_height-8) + "px";
		window.document.getElementById("frm-leftborder").style.height =  (ques_height  + img_hg-8)+ "px";
		window.document.getElementById("frm-rightborder").style.height =  (ques_height  + img_hg -8)+ "px";
	}
	if(total_height < 300)
	{
		total_height = 330;
	}
	window.document.getElementById("main-container").style.height =(total_height +  hdr_height + 360)  + "px";
	var main_hg = document.getElementById("main-container").offsetHeight;	
	window.document.getElementById("footer-container").style.top = (main_hg - 54)+ "px"; 
	document.getElementById("footer-container1").style.top = (main_hg - 180)+ "px";
	document.getElementById("footer-container1").className='there'; 
	document.getElementById("footer-container").className='there'; 
	
}

function calculateForm_lenders()                  
{            
	
	var ques_height = window.document.getElementById("ques1-padding").offsetHeight;
	if((ques_height  ) > 200)
	{
		window.document.getElementById("formtxt-container2").style.height = (ques_height  + - 200) + "px" ;
	}
	
	var total_height = ques_height ;            
	var hdr_height = 140;
	window.document.getElementById("frm-bottomborder").style.top =  (total_height + hdr_height)+ "px";
	window.document.getElementById("frm-rightborder").style.height =  (ques_height   + 2)+ "px";
	window.document.getElementById("frm-leftborder").style.height =  (ques_height)+ "px";
	window.document.getElementById("form-bkgrd").style.height = total_height + "px";
	if(total_height < 300)
	{
		total_height = 330;
	}
	window.document.getElementById("main-container").style.height =(total_height +  hdr_height + 360)  + "px";
	var main_hg = document.getElementById("main-container").offsetHeight;	
	window.document.getElementById("footer-container").style.top = (main_hg - 54)+ "px"; 
	document.getElementById("footer-container1").style.top = (main_hg - 180)+ "px";
	document.getElementById("footer-container1").className='there'; 
	document.getElementById("footer-container").className='there'; 
	
}

function agentCalculate()  
{
	var sURL = window.document.URL.toString();
		
	var ques_height = document.getElementById("ques1-padding").offsetHeight;
	var img_hg = document.getElementById("main2_agent").offsetHeight;
	var total_height = ques_height + img_hg;
	var hdr_height = 140;
	document.getElementById("frm-bottomborder").style.top =  (total_height + hdr_height)+ "px";
	document.getElementById("frm-rightborder").style.height =  (ques_height  + img_hg + 2)+ "px";
	document.getElementById("frm-leftborder").style.height =  (ques_height  + img_hg)+ "px";
	
	document.getElementById("form-bkgrd").style.height = total_height + "px";
	var left_txthg = document.getElementById("frm-righttxt").offsetHeight;
	if(sURL.indexOf('index') > -1)
		document.getElementById("main-container").style.height =(total_height +  hdr_height + 191)  + "px";
	else
		document.getElementById("main-container").style.height =(total_height +  hdr_height + 100)  + "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 noFormCalculate()  
{
	var sURL = window.document.URL.toString();
	var content_hg = document.getElementById("template-content").offsetHeight;
	document.getElementById("main-container").style.height = (content_hg + 510 ) + "px";
	
	var main_hg = document.getElementById("main-container").offsetHeight;
	document.getElementById("footer-container").style.top = (main_hg - 54)+ "px";    
	if(sURL.indexOf('sorry') == -1  )
	{
			document.getElementById("footer-container1").style.top = (main_hg - 170)+ "px"; 
	}
	document.getElementById("footer-container1").className='there'; 
	document.getElementById("footer-container").className='there'; 
}
function noFormCalculateLender()  
{
	var sURL = window.document.URL.toString();
	var content_hg = document.getElementById("template-content").offsetHeight;
	document.getElementById("main-container").style.height = (content_hg + 210 ) + "px";
	
	var main_hg = document.getElementById("main-container").offsetHeight;
	document.getElementById("footer-container").style.top = (main_hg - 54)+ "px";    
	if(sURL.indexOf('sorry') == -1  )
	{
			document.getElementById("footer-container1").style.top = (main_hg - 170)+ "px"; 
	}
	document.getElementById("footer-container1").className='there'; 
	document.getElementById("footer-container").className='there'; 
}
function noFormCalculateTransition()  
{
	var sURL = window.document.URL.toString();
	var content_hg = document.getElementById("template-content").offsetHeight;
	document.getElementById("main-container").style.height = (content_hg + 510 ) + "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 popupCalcuate()  
{	
	var topbar = document.getElementById("top-row").offsetHeight;
	document.getElementById("bar-container").style.top = (topbar + 1) + "px";
	
	var barcontainer = document.getElementById("bar-container").offsetHeight;
	document.getElementById("line").style.top = (barcontainer + topbar + 2) + "px";
	
	var line = document.getElementById("line").style.height;
	var txt_hg = document.getElementById("txt-container").offsetHeight;
	document.getElementById("content").style.height = txt_hg + 130 + "px";
	var total_hg = topbar + barcontainer + txt_hg;
	document.getElementById("close-window1").style.top = (total_hg + 40 ) + "px"
	document.getElementById("content").style.height = (total_hg + 70 ) + "px";
	
	var cls_win_hg = document.getElementById("close-window1").offsetHeight;
	document.getElementById("background").style.height = (total_hg + 100 ) + "px";
}

function agentprofileCalculate()  
{	
	var topcontent = document.getElementById("agenttop-row").offsetHeight;
	var barcontainer = document.getElementById("bar-container").offsetHeight;
	document.getElementById("content").style.top = (topcontent + 10) + "px";
	var content = document.getElementById("content").offsetHeight;
	var total_height = topcontent + content;
	document.getElementById("agentmain-container").style.height =(total_height + 107)  + "px";	
}

function Congratescalucalte()  
{
	var content_hg = document.getElementById("top-content").offsetHeight;
	document.getElementById("main-container").style.height = (content_hg + 500 ) + "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'; 
	document.getElementById("footer-container").className='there'; 

	var middle_thankyou_ryt_hg = document.getElementById("middle-thankyou-right-ht").offsetHeight;
	document.getElementById("middle-thankyou-right").style.height = (middle_thankyou_ryt_hg - 0) + "px";
}

function onClick(form,city)
{
	window.document.form.BuyerPropertyCity.value = city;                                   
}


function doProcessing(){
	serveExitPop = false;
	document.getElementById('submit-container').className = 'thide';
	document.getElementById('processing').className = 'tshow';
	
}

function doProcessing1(){
	serveExitPop = false;
	document.getElementById('submit-container').className = 'thide';
	document.getElementById('processing-agent').className = 'tshow';
}

function doProcessingmodified(){
    serveExitPop = false;
	document.getElementById('submit-container-modified').className = 'thide';
	document.getElementById('processing-modified').className = 'tshow';
	
}

//-->
