// ----------------------------------------------------------------
// 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 popupCustom(url, pageTitle, height, width) {
		
	   	var newWindow = window.open(url, pageTitle, 'height=' + height + ', width=' + width + ', toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no');
	   	if (window.focus) {
	   		newWindow.focus()
	   	}
	   	return false;
}

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 = "application.html?h=1";
 }
}
function Navigate(fObj) {
 var number = fObj["Homeowner"].selectedIndex;
 
 if(fObj["Homeowner"].options[number].text == "Homeowner No Mortgage"){
  location.href = "tenant-application.html?h=2";
 }
 
 if(fObj["Homeowner"].options[number].text == "Living With Parents"){
  location.href = "tenant-application.html?h=3";
 }
 
 if(fObj["Homeowner"].options[number].text == "Living With Friends"){
  location.href = "tenant-application.html?h=4";
 }
  if(fObj["Homeowner"].options[number].text == "Living With Relatives"){
  location.href = "tenant-application.html?h=5";
 }
  if(fObj["Homeowner"].options[number].text == "Council Tenant"){
  location.href = "tenant-application.html?h=6";
 }
 if(fObj["Homeowner"].options[number].text == "Private Tenant"){
  location.href = "tenant-application.html?h=7";
 }
 
}
