/* .js for Property Search Page */


<!-- Original:  Kathi O'Shea (Kathi.O'Shea@internet.com) -->
<!-- Web Site:  http://www.web-savant.com/users/kathi/asp -->

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
function moveOver()  
{
var boxLength = document.choiceForm.propdesc.length;
var selectedItem = document.choiceForm.available.selectedIndex;
var selectedText = document.choiceForm.available.options[selectedItem].text;
var selectedValue = document.choiceForm.available.options[selectedItem].value;
var i;
var isNew = true;
if (boxLength != 0) {
for (i = 0; i < boxLength; i++) {
thisitem = document.choiceForm.propdesc.options[i].text;
if (thisitem == selectedText) {
isNew = false;
break;
      }
   }
} 
if (isNew) {
newoption = new Option(selectedText, selectedValue, false, false);
document.choiceForm.propdesc.options[boxLength] = newoption;
}
document.choiceForm.available.selectedIndex=-1;
}
function removeMe() {
var boxLength = document.choiceForm.propdesc.length;
arrSelected = new Array();
var count = 0;
for (i = 0; i < boxLength; i++) {
if (document.choiceForm.propdesc.options[i].selected) {
arrSelected[count] = document.choiceForm.propdesc.options[i].value;
}
count++;
}
var x;
for (i = 0; i < boxLength; i++) {
for (x = 0; x < arrSelected.length; x++) {
if (document.choiceForm.propdesc.options[i].value == arrSelected[x]) {
document.choiceForm.propdesc.options[i] = null;
   }
}
boxLength = document.choiceForm.propdesc.length;
   }
}
function saveMe() {
var strValues = "";
var boxLength = document.choiceForm.propdesc.length;
var count = 0;
if (boxLength != 0) {
for (i = 0; i < boxLength; i++) {
document.choiceForm.propdesc.options[i].selected = true; 
if (count == 0) {
strValues = document.choiceForm.propdesc.options[i].value;
}
else {
strValues = strValues + "," + document.choiceForm.propdesc.options[i].value;
}
count++;
   }
}

}
//  End -->

/* .js below from <head> in original search.php */

	function open_window(url,w,h) {
	       var status_string = "resizable=yes,location=no,status=no,toolbar=no,scrollbars=yes,left=10,top=10,width="+w+",height="+h;
	       open(url, "_blank", status_string);
	}
	function open_window2(url,w,h) {
	       var status_string = "resizable=1,location=no,menubar=1,status=no,toolbar=1,scrollbars=1,left=10,top=10,width="+w+",height="+h;
	       open(url, "_blank", status_string);
	}
	function showlink(url) {
	    opener.location.href = url;
	    window.close();
	}		
  function mailMe(sDom, sUser){
    return("mail"+"to:"+sUser+"@"+sDom.replace(/%23/g,"."));
  }	