// JavaScript Document
var x=true;
function validate1()	
{
x=true;

	if (document.logincheck.username.value =="" && x==true)
		
		{
		x=false;
		alert("Please fill in the username."); 
		document.logincheck.username.focus();
		return false ;
		}

	else if (document.logincheck.password.value =="" && x==true)
		
		{
		x=false;
		alert("Please fill in the password."); 
		document.logincheck.password.focus();
		return false ;
		}
		
	else if( x==true)
	
	{

		document.logincheck.action="login_check.asp";
		document.logincheck.submit();
	}
	
	else 
	{
		return false ;
	}
}

function validate2()	
{
x=true;

	if (document.passwordque.answer.value =="" && x==true)
		
		{
		x=false;
		alert("Please fill in your answer."); 
		document.passwordque.answer.focus();
		return false ;
		}
		
	else if( x==true)
	
	{

		document.passwordque.action="forgotpwmail.asp";
		document.passwordque.submit();
	}
	
	else 
	{
		return false ;
	}
}

function validate3()	
{
x=true;

	if (document.theForm.property_type.selectedIndex == 0)
		
		{
		x=false;
		alert("Please Select the Property Type."); 
		document.theForm.property_type.focus();
		return false ;
		}

	else
		document.theForm.action="propertydetail.asp";
		//document.theForm.submit();
		return true;
}
function validate4(a)	
{
x = true;
prp = "";
aname = a;
//aname="";
	if (document.theForm.property_type.selectedIndex == 0)
		
		{
		x=false;
		alert("Please Select the Property Type."); 
		document.theForm.property_type.focus();
		return false ;
		}

	else if (x ==true)
	{
		//alert("it goes here");
		prp = "&cat="+ aname+ "&submit=Submit";
		//document.theForm.prpty1.value = document.theForm.property_type.value;
		//prpty3 = document.theForm.prpty1.value
		prpty3 = document.theForm.property_type.value;
		//alert(prp + " - " + prpty3 + " - " + aname);
		prp2 = "propertydetail.asp?property_type=" + prpty3 + prp;
		//alert (prp2)
		document.theForm.action=prp2;
		document.theForm.submit();
		return false;
	}
}
