 
<!--
function checkEnter(e){ //e is event object passed from function invocation
var characterCode;


if(e && e.which){ //if which property of event object is supported (NN4)
e = e;
characterCode = e.which; //character code is contained in NN4's which property
}
else{
e = event
characterCode = e.keyCode; //character code is contained in IE's keyCode property
}


if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
document.forms[0].submit() //submit the form
//alert(characterCode);

}
else{
return false ;
}
}


function validateForm(obj){
	if(document.form1.clientName.value==''){document.form1.clientName.focus();document.form1.clientName.select();document.form1.clientNameError.value='add your name';return false}else{document.form1.clientNameError.value=''}
	if(document.form1.telephone.value==''){document.form1.telephone.focus();document.form1.telephone.select();document.form1.telephoneError.value='add your phone number';return false}else{document.form1.telephoneError.value=''}	
}
function openMap(obj){ 
  window.open(obj,'Map','toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=780,height=400');
}


function fn_goToPage(pageNo){
	document.searchForm.Page.value = pageNo;
	document.searchForm.submit();
}


function getElementById_s(id){
var obj = null;
if(document.getElementById){
/* Prefer the widely supported W3C DOM method, if
available:-
*/
obj = document.getElementById(id);
}else if(document.all){
/* Branch to use document.all on document.all only
browsers. Requires that IDs are unique to the page
and do not coincide with NAME attributes on other
elements:-
*/
obj = document.all[id];
}
/* If no appropriate element retrieval mechanism exists on
this browser this function always returns null:-
*/
return obj;
}

function fn_changeClass(id, class1, class2){
//get the id of the element you wish to change
	identity=document.getElementById(id);
	//check what the current class is and swap it for the alternate class
	if(identity.className==class1){
		className=class2;
	}else{
		className=class1;
	};

	identity.className=className;
	
	
		
}
function fn_changeClass2(id, class1, class2){
//get the id of the element you wish to change
	identity=document.getElementById(id);
	//check what the current class is and swap it for the alternate class
	if(identity.className==class1){
		className=class2;
	}else{
		className=class1;
	};

	identity.className=className;
	

		
}
function validateSubForm(form2){	
	//check for a name value
	
	//check for an email value
	if(document.form2.email.value==''){alert("*please add your email");return false;}
	var re = /^\w+([\.]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
 	if(!(re.test(document.form2.email.value))){alert("*enter a valid email");return false;}
    //check for notes
	document.form2.submit();
    return false;
}

function fn_showChange(id, class1, class2){
//get the id of the element you wish to change
	identity=document.getElementById(id);
	
	//alert(identity);
	//check what the current class is and swap it for the alternate class
	if(identity.className==class1){
		className=class2;
	}else{
		className=class1;
	};

	identity.className=className;
}

function changeChecked(type)
{
	if(type = 'Let'){
		document.quickSearchFormSales.saleType.checked =true ;
		document.quickSearchFormSales.saleType1.checked = false;
	}
	if(type = 'Sale'){
		document.quickSearchForm.letType.checked =false ;
		document.quickSearchForm.letType1.checked = true;
	}
}

function fn_reset(){
	
	    document.quickSearchForm.propertyTypeID.selectedIndex='0';
	    document.quickSearchForm.area.selectedIndex='0';
		document.quickSearchForm.rent.selectedIndex='0';
		document.quickSearchForm.beds.selectedIndex='0';

	}
function fn_resetSales(){
	
	    document.quickSearchFormSales.propertyTypeID.selectedIndex='0';
	    document.quickSearchFormSales.area.selectedIndex='0';
		document.quickSearchFormSales.rent.selectedIndex='0';
		document.quickSearchFormSales.beds.selectedIndex='0';

	}


//-->

