
<!--// format the Search price field on the propsearch form

////load iamges and swap
	
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  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];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

////////

//////////// check contact us form////////////////////////////////////

function CheckContact(){

			var tmpValid = "0"
			
			
			//donor info
			if (isWhitespace(document.form1.FirstName.value))
				{
				alert("Please enter your First Name")
				document.form1.FirstName.focus();
				tmpValid++
				}
				
			else if  (isWhitespace(document.form1.LastName.value))
				{
				alert("Please enter your Last Name")
				document.form1.LastName.focus();
				tmpValid++
				}
				
			//else if (!(isEmail(document.form1.email.value)))
			else if ((!(isEmail(document.form1.emailaddress.value))))
				{
				alert("Please enter a valid Email Address")
				document.form1.emailaddress.focus();
				tmpValid++
				}
				
			else if  (isWhitespace(document.form1.details.value))
				{
				alert("Please enter your Comments before sending")
				
				tmpValid++
				}
				
				
			
			if (tmpValid == "0") {
				return (true);
			}
			else {
				return (false)
				}
		}




//////////// check Support form////////////////////////////////////

function CheckSupport(){

			var tmpValid = "0"
			
			
			//donor info
			if (isWhitespace(document.form1.FirstName.value))
				{
				alert("Please enter your First Name")
				document.form1.FirstName.focus();
				tmpValid++
				}
				
			else if  (isWhitespace(document.form1.LastName.value))
				{
				alert("Please enter your Last Name")
				document.form1.LastName.focus();
				tmpValid++
				}
				
			else if  (isWhitespace(document.form1.lag.value))
				{
				alert("Please enter your MLS ID")
				document.form1.lag.focus();
				tmpValid++
				}
				
						
			else if (document.form1.box1.selectedIndex <= 0)
				{
				alert("Please enter select a program")
				
				tmpValid++
				}
				
			else if (document.form1.box2.selectedIndex < 0)
				{
				alert("Please enter select a Problem area")
				
				tmpValid++
				}
			
			else if ((!(isEmail(document.form1.emailaddress.value))))
				{
				alert("Please enter a valid Email Address")
				document.form1.emailaddress.focus();
				tmpValid++
				}
				
			else if  (isWhitespace(document.form1.details.value))
				{
				alert("Please enter your Comments before sending")
				
				tmpValid++
				}
				
				
			
			if (tmpValid == "0") {
				return (true);
			}
			else {
				return (false)
				}
		}

//////////// check order form////////////////////////////////////

function checkShowPoint(){

			var tmpValid = "0"
			
			
			
			if (isWhitespace(document.form1.FirstName.value))
				{
				alert("Please enter your First Name")
				document.form1.FirstName.focus();
				tmpValid++
				}
				
			else if  (isWhitespace(document.form1.LastName.value))
				{
				alert("Please enter your Last Name")
				document.form1.LastName.focus();
				tmpValid++
				}
				
			else if  (isWhitespace(document.form1.company.value))
				{
				alert("Please enter your Company Name")
				document.form1.company.focus();
				tmpValid++
				}
			
			else if  (isWhitespace(document.form1.Address1.value))
				{
				alert("Please enter your Address")
				document.form1.Address1.focus();
				tmpValid++
				}
			
			else if  (isWhitespace(document.form1.City.value))
				{
				alert("Please enter your City")
				document.form1.City.focus();
				tmpValid++
				}
			
			else if (document.form1.state.selectedIndex <= 0)
				{
				alert("Please select your state")
				//document.form1.City.focus();
				tmpValid++
				}
			
			else if  (isWhitespace(document.form1.Zip.value))
				{
				alert("Please enter your Zip")
				document.form1.Zip.focus();
				tmpValid++
				}
			
			else if  (isWhitespace(document.form1.OfficePhone.value))
				{
				alert("Please your offfice Phone Number")
				document.form1.OfficePhone.focus();
				tmpValid++
				}
			
			else if ((!(isEmail(document.form1.Email.value))))
				{
				alert("Please enter a valid Email Address")
				document.form1.Email.focus();
				tmpValid++
				}
			
			else if (document.form1.MLS.selectedIndex <= 0)
				{
				alert("Please select your MLS ")
				//document.form1.City.focus();
				tmpValid++
				}
			
			else if  (isWhitespace(document.form1.LO.value))
				{
				alert("Please your MLS Office ID")
				document.form1.LO.focus();
				tmpValid++
				}
				
			else if  (isWhitespace(document.form1.LAG.value))
				{
				alert("Please your MLS Agent ID")
				document.form1.LAG.focus();
				tmpValid++
				}
			
			else if  (isWhitespace(document.form1.AgentCount.value))
				{
				alert("Please the number of agents")
				document.form1.AgentCount.focus();
				tmpValid++
				}
			
			else if  (isWhitespace(document.form1.BillFirstName.value))
				{
				alert("Please enter your Billing First Name")
				document.form1.BillFirstName.focus();
				tmpValid++
				}
			
			else if  (isWhitespace(document.form1.BillLastName.value))
				{
				alert("Please enter your Billing Last Name")
				document.form1.BillLastName.focus();
				tmpValid++
				}	
			
			else if  (isWhitespace(document.form1.BillAddress1.value))
				{
				alert("Please enter your Billing Address")
				document.form1.BillAddress1.focus();
				tmpValid++
				}
			
			else if  (isWhitespace(document.form1.BillCity.value))
				{
				alert("Please enter your Billing City")
				document.form1.BillCity.focus();
				tmpValid++
				}	
			
			else if (document.form1.Billstate.selectedIndex <= 0)
				{
				alert("Please enter your Billing State")
				//document.form1.BillCity.focus();
				tmpValid++
				}
			
			else if  (isWhitespace(document.form1.BillZip.value))
				{
				alert("Please enter your Billing Zip Code")
				document.form1.BillZip.focus();
				tmpValid++
				}
			
			else if (document.form1.Ctype.selectedIndex <= 0)
				{
				alert("Please Select your Credit Card Type")
				//document.form1.BillCity.focus();
				tmpValid++
				}
			
			else if  (isWhitespace(document.form1.CC.value))
				{
				alert("Please enter your Credit Card Number")
				document.form1.CC.focus();
				tmpValid++
				}
			
			else if (document.form1.expmonth.selectedIndex <= 0)
				{
				alert("Please Select your Credit Card Experation Date")
				//document.form1.BillCity.focus();
				tmpValid++
				}
			
			else if (document.form1.expyear.selectedIndex <= 0)
				{
				alert("Please Select your Credit Card Experation Year")
				//document.form1.BillCity.focus();
				tmpValid++
				}			
						
			//else if (document.form1.TOS.checked !=1)
			//	{
			//	alert("You must agree to the terms of use before you can proceed")
				//document.form1.BillCity.focus();
			//	tmpValid++
			//	}	
							
			
			if (tmpValid == "0") {
				document.getElementById('SubmitOrder').disabled = true
				return (true);
			}
			else {
				return (false)
				}
		}

///////////////// fill in billing info from account info ship address to bill address on orders.asp

	function LoadBilling() {
		document.form1.BillFirstName.value = document.form1.FirstName.value 
		document.form1.BillLastName.value = document.form1.LastName.value
		document.form1.BillAddress1.value = document.form1.Address1.value
		document.form1.BillAddress2.value = document.form1.Address2.value
		document.form1.BillCity.value = document.form1.City.value
		document.form1.BillZip.value = document.form1.Zip.value
		//document.form1.billingZip.value = document.form1.Zip.value
	}



//-->



	