	function changename(title) {
		var aptName2 = document.getElementById("aptName");
		aptName2.value = title;
	}

	function change(existingImage) {
		value = existingImage.options[existingImage.selectedIndex].value;
		if (value != '')
			if (document.images)
				document.images['aptImage'].src = value;
	}

	function setloc(area) {
		var search2 = document.getElementById("search1");

		if (search2.qarea.options[area].selected) {
			search2.qarea.options[area].selected = false
		} else {
			search2.qarea.options[area].selected = true
		}
	}

	function checkAll(theForm, cName) {
		for (i=0,n=theForm.elements.length;i<n;i++)
			if (theForm.elements[i].className.indexOf(cName) !=-1)
				if (theForm.elements[i].checked == true) {
					theForm.elements[i].checked = false;
				} else {
					theForm.elements[i].checked = true;
				}
	}

	function MM_openBrWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}


function formhandler(form){

		var downtown_properties2 = document.getElementById("downtown_properties");

var URL = downtown_properties2.site.options[downtown_properties2.site.selectedIndex].value;
window.location.href = URL;
//alert("going to.."+URL);
}

function validEmail(f) {

	var email;
	var name;
	name=f.firstName.value;
	email=f.email.value;
//

	if (name=="") {
	alert("Please tell us your first name.");
	return false;
	}
	
        <!--Simon Dang 3-2001-->
        invalidChars = " /:,;"

        for (i=0; i<invalidChars.length; i++) {
        // does it contain any invalid characters?
            badChar = invalidChars.charAt(i)
            if (email.indexOf(badChar,0) > -1) {
		   alert("Sorry, please enter a valid email address.");
                     return false
             }
         }
         atPos = email.indexOf("@",1) // there must be one "@" symbol
         if (atPos == -1) {
			alert("Sorry, please enter a valid email address.");
                return false
         }
         if (email.indexOf("@",atPos+1) != -1) { // and only one "@" symbol
			alert("Sorry, please enter a valid email address.");
                   return false
          }
         periodPos = email.indexOf(".",atPos)
         if (periodPos == -1) {   // and at least one "." after the "@"
		alert("Sorry, please enter a valid email address.");
            return false
         }
         if (periodPos+3 > email.length) {// must be at least 2 characters
		alert("Sorry, please enter a valid email address.");
                return false
          }

          return true
      }

	


	function openNewWin(url) {
			//alert("going to.."+url);
			cvWindow=window.open(url,'FourthRing','toolbar=no,location=no,scrollbars=no,resizable=no,width=455,height=338,screenX=10,screenY=20');
			cvWindow.focus();
	}


// function to restrict any non-numeric key pressing
function nn_Key()
{
if ((event.keyCode<48) || (event.keyCode>57))
event.keyCode = 0;
}

// function to restrict numeric
function pp_Key(evt)
{

    evt = (evt) ? evt : event;

	if (evt.keyCode==32)
	{
		return true;
	}
	
	var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : 
        ((evt.which) ? evt.which : 0));
	
	if (charCode > 31 && (charCode < 65 || charCode > 90) && 
        (charCode < 97 || charCode > 122)) 
	{
	  event.keyCode=0;	
	}
}



 function ValidateCityState(){
 	if(document.CITYSTATE.city.value == "" || document.CITYSTATE.state.value == "")
	{
 		alert("City and State are required.");
 		return false;
 	}
	else
	{
		return true;
	}
 }
