<!--
var fud=$$('div','form');
for(i in fud){
	if(typeof(fud[i]) == "object" && fud[i].className=="follow_up"){
		var fu=fud[i];
		fu.ch=fu.h=get_height(fu);
		fu.locked=0;
		fu.speed=10;
		fu.expand=function(){
			if(this.ch<this.h){
				this.locked=1;
				this.hdif=Math.ceil((this.h-this.ch)/this.speed);
				this.ch+=this.hdif;
				this.style.height=this.ch+"px";
				setTimeout("$('"+this.id+"').expand();",30);
			}else if(this.ch==this.h){
				this.locked=0;
			}
		}
		fu.contract=function(){
			if(this.ch!=0){
				this.locked=1;
				this.hdif=Math.ceil(this.ch/this.speed);
				this.ch-=this.hdif;
				this.style.height=this.ch+"px";
				setTimeout("$('"+this.id+"').contract();",30);
			}else if(this.ch==0){
				this.locked=0;
				hide(this);
			}
		}
		if((fu.id=="follow_up_1" && $('number_of_current_credit_cards').selectedIndex<2)
		|| (fu.id=="follow_up_7" && $('last_missed_payment').selectedIndex<2)
		|| (fu.id=="follow_up_8" && $('number_of_accounts_past_due').selectedIndex<2)
		|| (fu.id=="follow_up_10" && $('negative_financial_events_in_last_10_years').selectedIndex!=1)
		){
			fu.ch=0;
			fu.style.height="0px";
			hide(fu);
		}
	}
}
function follow_up(){
	var i=arguments[0];
	var q=arguments[1];
	var fu=$('follow_up_'+q);
	if((q==10 && i==1) || (i>1 && q<10)){
		show(fu);
		if(fu.locked==0)fu.expand();
	}else{
		if(fu.locked==0){fu.contract();}
	}
}
function calc_form_check()
{
	var f=arguments[0];
	var q1=f.number_of_current_credit_cards;
	var q1a=f.received_first_credit_card;
	var q2=f.received_first_loan;
	var q3=f.number_of_applications_last_year;
	var q4=f.last_opened_account;
	var q5=f.number_of_accounts_with_balance;
	var q6=f.combined_balance;
	var q7=f.last_missed_payment;
	var q7a=f.most_deliquent_account;
	var q8=f.number_of_accounts_past_due;
	var q8a=f.total_past_due_balance;
	var q9=f.total_credit_card_balance_percent;
	var q10=f.negative_financial_events_in_last_10_years;
	var q10a=f.most_recent_negative_financial_event;


	if(q1.selectedIndex==0)
	{
		alert("How many credit cards do you currently have?");
		q1.focus();
		return false;
	}

	if(q1.selectedIndex>1 && q1a.selectedIndex<1)
	{
		alert("How long ago did you receive your first credit card?");
		$('follow_up_1').style.display="block";
		$('follow_up_1').style.height=$('follow_up_1').h+"px";
		q1a.focus();
		return false;
	}

	if(q2.selectedIndex==0)
	{
		alert("How long ago did you receive your first loan?");
		q2.focus();
		return false;
	}

	if(q3.selectedIndex==0)
	{
		alert("How many loans or credit cards have you applied for in the last year?");
		q3.focus();
		return false;
	}

	if(q4.selectedIndex==0)
	{
		alert("How recently have you opened a new loan or credit card?");
		q4.focus();
		return false;
	}

	if(q5.selectedIndex==0)
	{
		alert("How many of your loans/credit cards currently have a balance?");
		q5.focus();
		return false;
	}

	if(q6.selectedIndex==0)
	{
		alert("Besides any mortgage loans, what are your total balances on all other loans and credit cards combined?");
		q6.focus();
		return false;
	}

	if(q7.selectedIndex==0)
	{
		alert("When did you last miss a loan or credit card payment?");
		q7.focus();
		return false;
	}

	if(q7.selectedIndex>1 && q7a.selectedIndex<1)
	{
		alert("What is the most delinquent you have ever been on a loan or credit card payment?");
		$('follow_up_7').style.display="block";
		$('follow_up_7').style.height=$('follow_up_7').h+"px";
		q7a.focus();
		return false;
	}

	if(q8.selectedIndex==0)
	{
		alert("How many of your loans and/or credit cards are currently past due?");
		q8.focus();
		return false;
	}

	if(q8.selectedIndex>1 && q8a.selectedIndex<1)
	{
		alert("What are your total balances on all currently past due accounts?");
		$('follow_up_8').style.display="block";
		$('follow_up_8').style.height=$('follow_up_8').h+"px";
		q8a.focus();
		return false;
	}

	if(q9.selectedIndex==0)
	{
		alert("What percent of your total credit card limits do your credit card balances represent?");
		q9.focus();
		return false;
	}

	if(q10.selectedIndex==0)
	{
		alert("Have you gone through any of the following negative financial events in the last 10 years: bankruptcy, tax lien, foreclosure, repossession, or account referred to collection agency?");
		q10.focus();
		return false;
	}

	if(q10.selectedIndex==1 && q10a.selectedIndex<1)
	{
		alert("How long ago did the most recent negative event occur?");
		$('follow_up_10').style.display="block";
		$('follow_up_10').style.height=$('follow_up_10').h+"px";
		q10a.focus();
		return false;
	}

	if(window.first_flag){
		window.first_flag=0;
		var sels=$$('select');
		for(i in sels){
			if(typeof(sels[i])=='object' && sels[i].style){
				sels[i].style.visibility="hidden";
			}
		}
		cm(1);
		return false;
	}else if(window.no_thanks_flag){
		if(form_check(f)){
			for(i in sels){
				if(typeof(sels[i])=='object' && sels[i].style){
					sels[i].style.visibility="visible";
				}
			}
			return true;
		}else{
			return false;
		}
	}else{
		while($('int_form').childNodes.length){
			$('int_form').removeChild($('int_form').childNodes[0]);
		}
		if(typeof page_loading == "function")page_loading(1);
		return true;
	}
}
function how_to(x){
  var win_=window.open("/pop/"+x+".html","how_to","width=420,height=300,toolbar=no,status=yes,resizable=yes,scrollbars=no,location=no");
  win_.focus();
}
start_top=0;
start_left=0;
function cm(ob) {
	if(ob){
		myWidth=myHeight=scrOfX=scrOfY=0;
		if(typeof(window.innerWidth) == 'number'){
			//Non-IE
			myWidth = window.innerWidth;
			myHeight = window.innerHeight;
		}else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){
			//IE 6+ in 'standards compliant mode'
			myWidth = document.documentElement.clientWidth;
			myHeight = document.documentElement.clientHeight;
		}else if(document.body && (document.body.clientWidth || document.body.clientHeight)){
			//IE 4 compatible
			myWidth = document.body.clientWidth;
			myHeight = document.body.clientHeight;
		}
		if(typeof(window.pageYOffset) == 'number'){
			//Netscape compliant
			scrOfY = window.pageYOffset;
			scrOfX = window.pageXOffset;
		}else if(document.body && (document.body.scrollLeft || document.body.scrollTop)){
			//DOM compliant
			scrOfY = document.body.scrollTop;
			scrOfX = document.body.scrollLeft;
		}else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)){
			//IE6 standards compliant mode
			scrOfY = document.documentElement.scrollTop;
			scrOfX = document.documentElement.scrollLeft;
		}
		scrTop=scrOfY;
		scrOfY=scrOfY*1+myHeight/2;
		scrOfX=myWidth/2;
		leftpos=scrOfX;
		toppos=scrOfY;
		var sm_bg=document.getElementById('int_mask').style;
		var pm=document.getElementById('int_form').style;
		sm_bg.height=get_height('form_step1')+'px';
		sm_bg.display="block";
		pm.display="block";
		//pm_bg.left=pm.left=scrOfX+'px';
		if(!start_top)start_top=toppos;
		if(!start_left)start_left=scrOfX;
		if(start_top!=toppos){
			if(start_top<toppos){
				diff=Math.ceil((toppos-start_top)/20);
				start_top=(start_top+diff)<toppos?start_top+diff:toppos;
			}else{
				diff=Math.ceil((start_top-toppos)/20);
				start_top=(start_top-diff)>toppos?start_top-diff:toppos;//<
			}
			pm.top=start_top+'px';
		}else{
			pm.top=toppos+'px';
		}
		if(start_left!=leftpos){
			if(start_left<leftpos){
				diff=Math.ceil((leftpos-start_left)/20);
				start_left=(start_left+diff)<leftpos?start_left+diff:leftpos;
			}else{
				diff=Math.ceil((start_left-leftpos)/20);
				start_left=(start_left-diff)>leftpos?start_left-diff:leftpos;//<
			}
			pm.left=start_left+'px';
		}else{
			pm.left=leftpos+'px';
		}
		setTimeout("cm(1)",10);
	}else{
		return false;
	}
}
//-->

