function openContact(id,type){
	
window.open("pop_contact.asp?intPropertyID="+id+"&sPageName="+type,"_blank","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=420, height=300")
}
<!--
function checkEnter1(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
}
//alert(characterCode);

if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
//document.form.submit() //submit the form
//alert(characterCode);
checkPrices('saleSearchForm1');return false;
//checkPrices();return false;

}
else{
return true ;
}

}
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
}
//alert(characterCode);

if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
//document.form.submit() //submit the form
//alert(characterCode);
//checkPrices('saleSearchForm1');return false;
checkPrices0();return false;

}
else{
return true ;
}

}
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.intPage.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_changeSmallButton(imageID){
  
    var imageCat = ["bathroom","bedroom","diningRoom","exterior","garden","lounge","kitchen","parking"]
	
	
	for (i = 0 ;i<= 7;i++){
           for (j =1 ;j<=10 ;j++){
			  if (document.getElementById(imageCat[i]+j)){
		     	document.getElementById(imageCat[i]+j).src='../images/generic/smallButtonGray.gif'; 
                     }    
				//alert(imageCat[i]+j);
				}
			
		}
	
    
	document.getElementById(imageID).src='../images/generic/smallButtonGreen.gif';
	
 
  }  
function bedsSearch(imageID,no){
	
  var imageCat = ["bed","beds","bedlet","bedslet"]
	//alert(imageID);
	
	for (i = 0 ;i<= 3;i++){
           for (j =1 ;j<=4 ;j++){
			  if (getElementById_s(j+imageCat[i])){
		     	getElementById_s(j+imageCat[i]).src='../images/bed_green.jpg'; 
                     }    
				//alert(imageCat[i]+j);
				}
			
		}
	
    
	getElementById_s(imageID).src='../images/bed_pink.jpg';
	document.saleSearchForm.beds.value=no;
	//document.letSearchForm.beds.value="";
	//document.saleSearchForm.submit();
	
	}
function lbedsSearch(imageID,no){
	
var imageCat = ["bed","beds","bedlet","bedslet"]
	
	
	for (i = 0 ;i<= 3;i++){
           for (j =1 ;j<=4 ;j++){
			  if (document.getElementById(j+imageCat[i])){
		     	document.getElementById(j+imageCat[i]).src='../images/bed_green.jpg'; 
                     }    
				//alert(imageCat[i]+j);
				}
			
		}
	
    
	document.getElementById(imageID).src='../images/bed_pink.jpg';
	document.letSearchForm.beds.value=no;
	document.saleSearchForm.beds.value="";
	//alert(document.letSearchForm.beds.value);
	//document.saleSearchForm.submit();
	
	}
function swapImgRestore() { 
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function swapImage() { 
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function findObj(n, d) { 
  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=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function bookmarked(){
alert("You have been registered and the property has been bookmarked.")
}

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 checkPrices(form){
	var form;
	
	//dform=document.form;
	//alert(dform);
	//document.get
	maxPrice=document.getElementById('MaxPrice').value;
	minPrice =document.getElementById('MinPrice').value;
	if (maxPrice == ""){
		maxPrice =0;
	}
	if (minPrice ==""){
		minPrice =0;
	}
	if (isNaN(minPrice) ){
		alert('Please ensure that the Minimum Price is a number'+minPrice);return false;
	
	}
	else if(isNaN(maxPrice)) {
		alert('Please ensure that the Maximum Price is a number');return false;
	}
	else if (parseInt(maxPrice) < parseInt(minPrice)){
		alert('Please ensure that the Maximum Price is greater than the Minimum Price');return false;
	}
	else{
		document.getElementById('MaxPrice').value =maxPrice;
		document.getElementById('MinPrice').value =minPrice;
		document.saleSearchForm1.submit();
	}
}

function checkPrices0(){
	var dform;
	
	//dform=document.form;
	//alert(dform);
	//document.get
	maxPrice=document.getElementById('MaxPrice').value;
	minPrice =document.getElementById('MinPrice').value;
	if (maxPrice == ""){
		maxPrice =0;
	}
	if (minPrice ==""){
		minPrice =0;
	}
	if (isNaN(minPrice) ){
		alert('Please ensure that the Minimum Price is a number'+minPrice);return false;
	
	}
	else if(isNaN(maxPrice)) {
		alert('Please ensure that the Maximum Price is a number');return false;
	}
	else if (parseInt(maxPrice) < parseInt(minPrice)){
		alert('Please ensure that the Maximum Price is greater than the Minimum Price');return false;
	}
	else{
		document.getElementById('MaxPrice').value =maxPrice;
		document.getElementById('MinPrice').value =minPrice;
		document.saleSearchForm.submit();
	}
}

function checkPricesAdvS(adform){

	maxPrice=document.getElementById('MaxPriceAdv').value;
	minPrice =document.getElementById('MinPriceAdv').value;
	if (maxPrice == ""){
		maxPrice =0;
	}
	if (minPrice ==""){
		minPrice =0;
	}
	if (isNaN(minPrice) ){
		alert('Please ensure that the Minimum Price is a number'+minPrice);return false;
	
	}
	else if(isNaN(maxPrice)) {
		alert('Please ensure that the Maxmum Price is a number');return false;
	}
	else if (parseInt(maxPrice) < parseInt(minPrice)){
		alert('Please ensure that the Maxmum Price is greater than the Minimum Price');return false;
	}
	else{
		document.getElementById('MaxPriceAdv').value =maxPrice;
		document.getElementById('MinPriceAdv').value =minPrice;
		document.adform.submit();
	}
}
function changeChecked(type)
{
	if(type = 'Quick'){
		document.saleSearchForm.MethodMulti.checked = false
		document.saleSearchForm.MethodQuick.checked = true
	}
	if(type = 'Multi'){
		document.saleSearchForm1.MethodMulti.checked = true
		document.saleSearchForm1.MethodQuick.checked = false
	}
}
//-->

