function passHref(id)
{
}


function changeMainImage(id){
var showImage = "http://www.bgpropertyzone.com/displaythumbs.asp?picID="+id+"";
document.getElementById("MainPicture").src = showImage;
var theimage = id;
passHref(id);
}


function addBookmark(title,url) {
var title = document.title;
var url = document.location;

if (window.sidebar) { 
window.sidebar.addPanel(title, url,""); 
} else if( document.all ) {
window.external.AddFavorite( url, title);
} else if( window.opera && window.print ) {
return true;
}
}

function sendThisPage(){

window.location="http://www.bgpropertyzone.com/inner.asp?sendmail=yes&page="+window.location;
return true;

}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function searchNow(){
if (((document.getElementById("refID").value)!="") && ((document.getElementById("refID").value)!="ref #")){
window.location="http://www.bgpropertyzone.com/search/?ref="+document.getElementById("refID").value+"";
return true;
}
var priceFROM_value
if ((document.getElementById("priceFrom").value)!=""){
priceFROM_value = document.getElementById("priceFrom").value;
if (priceFROM_value == "price min"){ priceFROM_value="";}
}
var priceTO_value
if ((document.getElementById("priceTo").value)!=""){
priceTO_value = document.getElementById("priceTo").value;
if (priceTO_value == "price max"){ priceTO_value="";}
}
var location_value
if ((document.getElementById("location").value)!=""){
location_value = document.getElementById("location").value;
if (location_value == "0"){ location_value="";}
}
var type_value
if ((document.getElementById("typeS").value)!=""){
type_value = document.getElementById("typeS").value;
if (type_value == "0"){ type_value="";}
}

window.location="http://www.bgpropertyzone.com/search/?priceFROMSearch="+priceFROM_value+"&priceTOSearch="+priceTO_value+"&areaSearch="+location_value+"&typeSearch="+type_value+"";
}

function checkForm(idField){
if (idField=="priceFrom"){
document.getElementById("priceFrom").value=''; 
return true;
}
if (idField=="priceTo"){
document.getElementById("priceTo").value=''; 
return true;
}
if (idField=="refID"){
document.getElementById("refID").value=''; 
return true;
}

}


function checkFormBlur(idField){
if (idField=="priceFrom"){
if(document.getElementById("priceFrom").value==""){
document.getElementById("priceFrom").value='price min'; 
return true;}
}

if (idField=="priceTo"){
if(document.getElementById("priceTo").value==""){
document.getElementById("priceTo").value='price max'; 
return true;}
}


if (idField=="refID"){
if(document.getElementById("refID").value==""){
document.getElementById("refID").value='ref #'; 
return true;}
}
}

function sendToMeEmailForm(){
document.getElementById("toName").value= document.getElementById("fromName").value; 
document.getElementById("toEMail").value= document.getElementById("fromEmail").value; 
document.getElementById("form1").submit();
	
}