// ----------------------------------------------------------------
// Author: InterFincial
// Description: Loan Application Forms
// Last edited: 12 Nov 2006 - made domain independent
// -----------------------------------------------------------------
function alert_err() { // shows an alert box on load with error message
	alert("<?php echo($alertmsg)?>");
}
function homeshow() {
	id=document.getElementById("homeextra");
	id.className="homeshow";
}
function homehide() {
	id=document.getElementById("homeextra");
	id.className="homehide";
}
function showMore() {
	id=document.getElementById("moreInfo");
	id.className="showmore";
}
function showLess() {
	id=document.getElementById("moreInfo");
	id.className="showless";
}

function chk_opt(){ // switches between homeowner apps
   if (location.search.length > 0){
	//n = unescape(location.search.substring(1))
	//document["prism-homeowner-form"]["Homeowner"].options[n].selected=true
   }
}
function chk_opt2(){
   if (location.search.length > 0){
	//n = unescape(location.search.substring(1))
	//document["prism-tenant-form"]["Homeowner"].options[n].selected=true
   }
}
function Navigate2(fObj) {
 var number = fObj["Homeowner"].selectedIndex;

 if(fObj["Homeowner"].options[number].text == "Homeowner With Mortgage"){
  location.href = "https://www.allaboutloans.co.uk/compare/loans.html?h=1";
 }
}
function Navigate(fObj) {
 var number = fObj["Homeowner"].selectedIndex;
 
 if(fObj["Homeowner"].options[number].text == "Homeowner No Mortgage"){
  location.href = "https://www.allaboutloans.co.uk/compare/tenant-loans.html?h=2";
 }
 
 if(fObj["Homeowner"].options[number].text == "Living With Parents"){
  location.href = "https://www.allaboutloans.co.uk/compare/tenant-loans.html?h=3";
 }
 
 if(fObj["Homeowner"].options[number].text == "Living With Friends"){
  location.href = "https://www.allaboutloans.co.uk/compare/tenant-loans.html?h=4";
 }
  if(fObj["Homeowner"].options[number].text == "Living With Relatives"){
  location.href = "https://www.allaboutloans.co.uk/compare/tenant-loans.html?h=5";
 }
  if(fObj["Homeowner"].options[number].text == "Council Tenant"){
  location.href = "https://www.allaboutloans.co.uk/compare/tenant-loans.html?h=6";
 }
 if(fObj["Homeowner"].options[number].text == "Private Tenant"){
  location.href = "https://www.allaboutloans.co.uk/compare/tenant-loans.html?h=7";
 }
 
}
