function commentWindow() {
	window.open("/commentdisclaimer.php","mywindow","menubar=0,resizable=1,width=600,height=400,scrollbars=1");
}
function toggleTabs() {
	toggleTab('tab1');
	toggleTab('tab2');
	toggleDiv('grid1');
	toggleDiv('grid2');


}
function toggleTab(id) {
	if($(id).className == "tabsel") {
		$(id).className = "tab";
	}
	else {
		$(id).className = "tabsel";
	}
}
function toggleDiv(id) {
	if($(id).style.display=="none") {
		$(id).style.display="";
	}
	else {
		$(id).style.display="none";
	}
}
function mortgageForm() {
	type = $('SearchPurpose').value;
	selected = $('SearchLoanType').value;
	if(type=='home_equity') {
		$('SearchLoanType').options.length = 0;
		$('SearchLoanType').options[0] = new Option('15 Year','15_year');
		$('SearchLoanType').options[1] = new Option('10 Year','10_year');
		$('SearchLoanType').options[2] = new Option('Home Equity Line of Credit','heloc');
	}
	else {
		$('SearchLoanType').options.length = 0;
		$('SearchLoanType').options[0] = new Option('30 Year Fixed','30_year_fixed');
		$('SearchLoanType').options[1] = new Option('15 Year Fixed','15_year_fixed');
		$('SearchLoanType').options[2] = new Option('40 Year Fixed','40_year_fixed');
		$('SearchLoanType').options[3] = new Option('20 Year Fixed','20_year_fixed');
		$('SearchLoanType').options[4] = new Option('30 Year FHA','30_year_fha');		
		$('SearchLoanType').options[5] = new Option('1 Year ARM','1_year_arm');
		$('SearchLoanType').options[6] = new Option('3/1 Year ARM','3/1_year_arm');
		$('SearchLoanType').options[7] = new Option('5/1 Year ARM','5/1_year_arm');
		$('SearchLoanType').options[8] = new Option('7/1 Year ARM','7/1_year_arm');
		$('SearchLoanType').options[9] = new Option('10/1 Year ARM','10/1_year_arm');
		$('SearchLoanType').options[10] = new Option('3/1 Year ARM Interest Only','3/1_year_arm_interest_only');
		$('SearchLoanType').options[11] = new Option('5/1 Year ARM Interest Only','5/1_year_arm_interest_only');
		$('SearchLoanType').options[12] = new Option('7/1 Year ARM','7/1_year_arm_interest_only');
	}
	$('SearchLoanType').value = selected;
}
function subTrack(form_id,trackme) {
	pageTracker._trackPageview(trackme);
	$(form_id).submit();
}
function goToPage(url) {
	document.location = url;
}

