<!--
function dropdown_validator()
{
if (form1.typehome.value == "")
{
alert("Please Choose Home Type");
form1.typehome.focus();
return (false);
}

if (form1.minprice.value == "")
{
alert("Please Choose Minimum Price");
form1.minprice.focus();
return (false);
}

if (form1.maxprice.value == "")
{
alert("Please Choose Maximum Price");
form1.maxprice.focus();
return (false);
}

if (form1.beds.value == "")
{
alert("Please Choose Bed Type");
form1.beds.focus();
return (false);
}





if (form1.baths.value == "")
{
alert("Please Choose Bath Type");
form1.baths.focus();
return (false);
}

if(form1.name.value=="")
  {
    alert("Please Enter Your Name");
    form1.name.focus();
    return false; 
   }
   
   
   //FOR CHECKING NULL VALUES IN EMAIL FIELD
  
  if((!form1.email.value) || (form1.email.value==""))
  {
    alert("Your email id has to be entered");
    form1.email.focus();
    return false;
  }  

  //FOR CHECKING VALIDITY OF E-MAIL ADDRESS

  var email=form1.email.value;
  var email1="";var index2=-1;
  var index1=email.indexOf("@");
  if(index1!=-1)
  email1=email.substring(index1+1);
  if((email1.length)!=0)
  index2=email.indexOf(".");
  if(index1==-1 || index2==-1)
  {
    alert("Enter Valid Email address");
    form1.email.value="";
    form1.email.focus();
    return false;
  }
  email2=email.substring(index2+1)
	if(email2=="")
	  {
	   alert("Enter valid email address");
 	   form1.email.focus()
	   return false;
	  }

return (true);
}

<!--
function contact_form_validator()
{
if (document.contact_form1.Name.value == "")
{
alert("Please enter your Name");
document.contact_form1.Name.focus();
return false;
}

   //FOR CHECKING NULL VALUES IN EMAIL FIELD
  
  if((!document.contact_form1.Email.value) || (document.contact_form1.Email.value==""))
  {
    alert("Your Email needs to be entered");
    document.contact_form1.Email.focus();
    return false;
  }  


  //FOR CHECKING VALIDITY OF E-MAIL ADDRESS

  var email=document.contact_form1.Email.value;
  var email1="";var index2=-1;
  var index1=email.indexOf("@");
  if(index1!=-1)
  email1=email.substring(index1+1);
  if((email1.length)!=0)
  index2=email.indexOf(".");
  if(index1==-1 || index2==-1)
  {
    alert("Enter Valid Email address");
    document.contact_form1.Email.value="";
    document.contact_form1.Email.focus();
    return false;
  }
  email2=email.substring(index2+1)
	if(email2=="")
	  {
	   alert("Enter valid email address");
 	   document.contact_form1.Email.focus()
	   return false;
	  }

	if (document.contact_form1.Comments.value == "")
	{
	alert("Please enter your Comments");
	document.contact_form1.Comments.focus();
	return (false);
	}
return (true);
}

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

var interval = 2.5; // delay between rotating images (in seconds)
var random_display = 1; // 0 = no, 1 = yes
interval *= 2000;

var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem("images/home1.jpg");
image_list[image_index++] = new imageItem("images/home2.jpg");
image_list[image_index++] = new imageItem("images/home3.jpg");
image_list[image_index++] = new imageItem("images/home4.jpg");
image_list[image_index++] = new imageItem("images/index_29.gif");
var number_of_image = image_list.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}
function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}
function getNextImage() {
if (random_display) {
image_index = generate(0, number_of_image-1);
}
else {
image_index = (image_index+1) % number_of_image;
}
var new_image = get_ImageItemLocation(image_list[image_index]);
return(new_image);
}
function rotateImage(place) {
var new_image = getNextImage();
document[place].src = new_image;
var recur_call = "rotateImage('"+place+"')";
setTimeout(recur_call, interval);
}

function call_all() {
rotateImage('rImage');
}
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=400,height=250,left = 376,top = 357');");
}