
	function CheckNumeric(field)
	{ var checkOK = "0123456789";
	  var allValid = true;
	  var decPoints = 0;
	  var allNum = "";
	  fldvalue=field.value
	  for (i = 0;  i < fldvalue.length;  i++)
	  { ch = fldvalue.charAt(i);
	    for (j = 0;  j < checkOK.length;  j++) 
			if (ch == checkOK.charAt(j)) break;
		if (j == checkOK.length)
		{	allValid = false;
			break;
		}
		allNum += ch;
	  }	
	  if (!allValid)
	  { alert("Please enter only numbers in this field.");
	  	field.value = "";
		field.focus();
	    return (false);
	  }
	  return(true);
	}

	function MM_preloadImages() {
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	
	MM_preloadImages('../images/Rlogo.gif','../images/top_photo_1.gif','../images/top_photo_2.gif','../images/top_background.jpg','../images/top_glvar.gif','../images/side_propertysearch.jpg','../images/side_itechnology.jpg','../images/side_whatisarealtor.jpg','../images/side_whyuse.jpg','../images/side_becomearealtor.jpg','../images/box_background.jpg','../images/action2.gif');
	
	icon1_off = new Image();
	icon1_off.src = "../images/icon_1.gif";
	icon2_off = new Image();
	icon2_off.src = "../images/icon_2.gif";
	icon3_off = new Image();
	icon3_off.src = "../images/icon_3.gif";
	icon4_off = new Image();
	icon4_off.src = "../images/icon_4.gif";
	iconContact_off = new Image();
	iconContact_off.src = "../images/quickNavContact.gif";
	iconLogin_off = new Image();
	iconLogin_off.src = "../images/quickNavLogin.gif";
	iconLogout_off = new Image();
	iconLogout_off.src = "../images/quickNavLogout.gif";
	iconESNR_off = new Image();
	iconESNR_off.src = "../images/quickNavESNR.gif";
	
	icon1_on = new Image();
	icon1_on.src = "../images/icon_1b.gif";
	icon2_on = new Image();
	icon2_on.src = "../images/icon_2b.gif";
	icon3_on = new Image();
	icon3_on.src = "../images/icon_3b.gif";
	icon4_on = new Image();
	icon4_on.src = "../images/icon_4b.gif";
	iconContact_on = new Image();
	iconContact_on.src = "../images/quickNavContactOver.gif";
	iconLogin_on = new Image();
	iconLogin_on.src = "../images/quickNavLoginOver.gif";
	iconLogout_on = new Image();
	iconLogout_on.src = "../images/quickNavLogoutOver.gif";
	iconESNR_on = new Image();
	iconESNR_on.src = "../images/quickNavESNROver.gif";
	
	temp_on = new Image();
	temp_on.src = "../images/active.gif";

	function showAction(){
		CheckSubType();
		img_On('temp');
		setTimeout('document.SearchForm.submit();',100);
	}
	
	function CheckSubType(){
		if (document.SearchForm.PropertyType.options[document.SearchForm.PropertyType.selectedIndex].value != "RES") {
			document.SearchForm.PropertySubType.value = "" ;
		}
	}
	
	function img_On(imgName) {
	imgOn = eval(imgName + "_on.src");
	document [imgName].src = imgOn;

	}
	
	function img_Off(imgName) {
	imgOff = eval(imgName + "_off.src");
	document [imgName].src = imgOff;
	}
	
	function quicknav(){
		var page = document.nav.page[document.nav.page.selectedIndex].value
		this.location.href = page;
	}
	function setVisibility(id)
	{
		if((document.getElementById(id).style.display) == "none")
		{
			document.getElementById(id).style.display='inline'
		}
		else
		{
			document.getElementById(id).style.display='none'
		}
	}

   function hideContent(d) 
   {
        if(d.length < 1) { return; }
            document.getElementById(d).style.display = "none";
   }

   function showContent(d) 
   {
        if(d.length < 1) { return; }
          document.getElementById(d).style.visibility = "visible";
   }