function checkWholeForm(theForm) {
   var why = "";
	 why += checkDropdown(theForm.category.value, 'category');
     why += checkDropdown(theForm.propertyfor.value, 'propertyfor');
	 why += checkDropdown(theForm.locality.value, 'locality');
	 //why += checkDropdown(theForm.budget.value, 'budget');
	   
     if (why != "") {
       alert(why);
       return false;
    }
	else
	{
		//alert("Well done! Data is Valid");
	}
return true;
}

// valid selector from dropdown list

function checkDropdown(choice, nm) {
	   document.getElementById(nm).style.background="#ffffff";
var error = "";
    if (choice == '')
{
error = "You didn't choose an option from the drop-down ";
	error += nm;
	error += "\n";
	 document.getElementById(nm).style.background="#ffbeaa";
}
	
		
		
	
return error;
}    


