function addBookmark ( intPropertyID ) {

 var myDate = new Date();
 var url = 'scripts/consumerPropertyBookmarkSave.asp?';
 url+='propertyID=' + intPropertyID;
 url+='&cb=' + myDate.toLocaleString();

 var myImage = new Image();
 myImage.src = url;
 alert('Added to Property Shortlist module on left hand side');

}

function removeBookmark ( intPropertyID ) {

 var myDate = new Date();
 var url = 'scripts/consumerPropertyBookmarkSave.asp?';
 url+='a=remove';
 url+='&propertyID=' + intPropertyID;
 url+='&cb=' + myDate.toLocaleString();

 var myImage = new Image();
 myImage.src = url;
 alert('Property bookmark removed from shortlist.');

}

function saveSearch ( intSearchID ) {

 var myDate = new Date();
 var url = 'scripts/consumerPropertySearchSave.asp?searchID=' + intSearchID;
 url+='&cb=' + myDate.toLocaleString();

 var myImage = new Image();
 myImage.src = url;
 alert('Your search has been saved and can be accessed from the customer hompage.');

}

function propAddressSameAsCorrespondenceAddress () {

var objForm = document.forms.cmsForm;

objForm.propAddress1.value = objForm.custAddress1.value;
objForm.propAddress2.value = objForm.custAddress2.value;
objForm.propAddress3.value = objForm.custAddress3.value;
objForm.propTown.value = objForm.custTown.value;
objForm.propCounty.value = objForm.custCounty.value;
objForm.propPostcode.value = objForm.custPostcode.value;

}

function searchSelectTown ( strTown, strCounty ) {

var objForm = document.forms.frmSearch;
var newOption = new Option(strTown, strTown)
objForm.propTown.options[0] = newOption;
objForm.propCounty.value = strCounty;
objForm.submit();

}

function searchSelectCounty ( intSearchID, strCounty ) {

var objForm = document.forms.frmSearch;

strPropMinPrice = objForm.propMinPrice.value;

strPropMaxPrice = objForm.propMaxPrice.value;

window.location.href = 'si.cmsx?itemID=1353&searchID=' + intSearchID + '&propCounty=' + strCounty + '&propMinPrice=' + strPropMinPrice + '&propMaxPrice=' + strPropMaxPrice 
}


function searchSelectPrice ( strName, strPrice ) {

var flgSelected;

document.write ("<SELECT class='frmText' id='" + name + "' name='" + strName + "'>");

document.write ("<OPTION></OPTION>");

for (i=20000; i<50000; i+=5000) 

 { 
 if ( i == strPrice ) { flgSelected="' selected" } else { flgSelected = "'" }
 document.write ("<OPTION value='" + i + flgSelected + ">" + i + "</OPTION>"); 
 }

for (i=50000; i<200000; i+=10000) 

 { 
 if ( i == strPrice ) { flgSelected="' selected" } else { flgSelected = "'" }
 document.write ("<OPTION value='" + i + flgSelected + ">" + i + "</OPTION>"); 
 }

for (i=200000; i<500000; i+=25000) 

 { 
 if ( i == strPrice ) { flgSelected="' selected" } else { flgSelected = "'" }
 document.write ("<OPTION value='" + i + flgSelected + ">" + i + "</OPTION>"); 
 }

for (i=500000; i<700000; i+=50000) 

 { 
 if ( i == strPrice ) { flgSelected="' selected" } else { flgSelected = "'" }
 document.write ("<OPTION value='" + i + flgSelected + ">" + i + "</OPTION>"); 
 }

for (i=700000; i<1000000; i+=100000) 

 { 
 if ( i == strPrice ) { flgSelected="' selected" } else { flgSelected = "'" }
 document.write ("<OPTION value='" + i + flgSelected + ">" + i + "</OPTION>"); 
 }

for (i=1000000; i<2000000; i+=500000) 

 { 
 if ( i == strPrice ) { flgSelected="' selected" } else { flgSelected = "'" }
 document.write ("<OPTION value='" + i + flgSelected + ">" + i + "</OPTION>"); 
 }

for (i=2000000; i<4000000; i+=1000000) 

 { 
 if ( i == strPrice ) { flgSelected="' selected" } else { flgSelected = "'" }
 document.write ("<OPTION value='" + i + flgSelected + ">" + i + "</OPTION>"); 
 }

 document.write ("<OPTION value='4000000'>4000000+</OPTION>")

 document.write ("</SELECT>");

}


function searchSelectRentalPrice ( strName, strPrice ) {

var flgSelected;

document.write ("<SELECT class='frmText' id='" + name + "' name='" + strName + "'>");

document.write ("<OPTION></OPTION>");

for (i=100; i<501; i+=25) 

 { 
 if ( i == strPrice ) { flgSelected="' selected" } else { flgSelected = "'" }
 document.write ("<OPTION value='" + i + flgSelected + ">" + i + "</OPTION>"); 
 }

for (i=550; i<1001; i+=50) 

 { 
 if ( i == strPrice ) { flgSelected="' selected" } else { flgSelected = "'" }
 document.write ("<OPTION value='" + i + flgSelected + ">" + i + "</OPTION>"); 
 }

for (i=1100; i<2000; i+=100) 

 { 
 if ( i == strPrice ) { flgSelected="' selected" } else { flgSelected = "'" }
 document.write ("<OPTION value='" + i + flgSelected + ">" + i + "</OPTION>"); 
 }


 document.write ("<OPTION value=''>2000+</OPTION>")

 document.write ("</SELECT>");

}





