<!-- 
var subs_array = new Array("sub1","sub2","sub3","sub4","sub5");// Put the id's of your hidden divs in this array
function displaySubsPhoto(the_sub){
    
    if (newPost.lPhotoChk.checked) {
        document.getElementById('sub2').style.display = "";
    } else {
        document.getElementById('sub2').style.display = "none";
    } 
    
    if (newPost.lMapChk.checked) {
        document.getElementById('sub3').style.display = "";
        if (newPost.lMap[0].checked) {
            document.getElementById('sub4').style.display = "";
            document.getElementById('sub5').style.display = "none";
        } else if (newPost.lMap[1].checked) {
            document.getElementById('sub5').style.display = "";
            document.getElementById('sub4').style.display = "none";
        }
    } else {
        document.getElementById('sub3').style.display = "none";
        document.getElementById('sub4').style.display = "none";
        document.getElementById('sub5').style.display = "none";
    }
    return true;
}

function displaySubsMap(the_sub){
    
    if (newPost.lMapChk.checked) {
        document.getElementById('sub3').style.display = "";
        if (newPost.lMap[0].checked) {
            document.getElementById('sub4').style.display = "";
            document.getElementById('sub5').style.display = "none";
        } else if (newPost.lMap[1].checked) {
            document.getElementById('sub5').style.display = "";
            document.getElementById('sub4').style.display = "none";
        }
    } else {
        document.getElementById('sub3').style.display = "none";
        document.getElementById('sub4').style.display = "none";
        document.getElementById('sub5').style.display = "none";
    }
    return true;
}

function displaySubsPhoneInt(the_sub){
  if (newPost.phoneIntChk.checked) {
        document.getElementById('sub6').style.display = "";
        document.getElementById('sub7').style.display = "";
  } else {
        document.getElementById('sub6').style.display = "none";
        document.getElementById('sub7').style.display = "none";
    }
    return true;
}

function usStates(the_sub){
    
    if (newPost.uStates.checked) {
        document.getElementById('sub96').style.display = "";
        document.getElementById('sub97').style.display = "none";
        document.getElementById('sub98').style.display = "";
        document.getElementById('sub99').style.display = "none";
    }
    newPost.uStates.checked = false
    newPost.cProv.checked = false
    return true;
}

function caProv(the_sub){
    if (newPost.cProv.checked) {
        document.getElementById('sub96').style.display = "none";
        document.getElementById('sub97').style.display = "";
        document.getElementById('sub98').style.display = "none";
        document.getElementById('sub99').style.display = "";
    }
    newPost.cProv.checked = false
    newPost.uStates.checked = false
    return true;
}

function firstEval() {
    str1=/\@/g;

    if (newPost.uid.value=="") {
        alert("You must choose a 4 to 16 alpha-numeric User ID.");
        newPost.uid.focus();
        newPost.uid.select();
        return false;
    }
    if (newPost.uid.value.length < 4) {
        alert("Your User ID must be at least 4 alpha-numeric characters long.\nPlease try again.");
        newPost.uid.value="";
        newPost.uid.focus();
        newPost.uid.select();
        return false;
    }
    if (newPost.uid.value.match(" ") != null) {
        alert("Your User ID can not contain spaces.\nPlease try again.");
        newPost.uid.value="";
        newPost.uid.focus();
        newPost.uid.select();
        return false;
    }
    if (newPost.pwd.value=="") {
        alert("You must choose a 4 to 16 alpha-numeric Password.");
        newPost.pwd.focus();
        newPost.pwd.select();
        return false;
   }
    if (newPost.pwd2.value=="") {
        alert("You must re-enter your 4 to 16 alpha-numeric Password for verification purposes.");
        newPost.pwd2.focus();
        newPost.pwd2.select();
        return false;
   }
    if (newPost.pwd2.value != newPost.pwd.value) {
        alert("You Passwords must match.\nPlease re-enter them.");
        newPost.pwd.value="";
        newPost.pwd2.value="";
        newPost.pwd.focus();
        newPost.pwd.select();
        return false;
   }
    if (newPost.pwd.value.length < 4) {
        alert("Your Passwords must be at least 4 alpha-numeric characters long, for security reasons.\nPlease try again.");
        newPost.pwd.value="";
        newPost.pwd2.value="";
        newPost.pwd.focus();
        newPost.pwd.select();
        return false;
   }
   if (newPost.contactName.value=="") {
       alert("Please enter the Contact Name for this rental listing.");
       newPost.contactName.focus();
       newPost.contactName.select();
       return false;
   }
   if (newPost.contactName.value.length < 2) {
       alert("Please enter a valid Contact Name for this rental listing.");
       newPost.contactName.focus();
       newPost.contactName.select();
       return false;
   }
   if (newPost.email.value=="" || newPost.email.value.length < 5 || newPost.email.value.match(str1) == null) {
       alert("Please enter a valid Contact Email Address for this rental listing.");
       newPost.email.focus();
       newPost.email.select();
       return false;
   }
   if (newPost.phone0.value.length < 3) {
       alert("Please enter a valid Phone Number Area Code for this rental listing.");
       newPost.phone0.focus();
       newPost.phone0.select();
       return false;
   }
   if (newPost.phone1.value.length < 3) {
       alert("Please enter a valid Phone Number for this rental listing.");
       newPost.phone1.focus();
       newPost.phone1.select();
       return false;
   } 
   if (newPost.phone2.value.length < 4) {
       alert("Please enter a valid Phone Number for this rental listing.");
       newPost.phone2.focus();
       newPost.phone2.select();
       return false;
   }

  var numOnly=/\D+/g;

  var p0=newPost.phone0.value;
  if (numOnly.test(p0)) {
    alert("Your Phone Number Area Code Should Contain Numbers Only.");
    newPost.phone0.focus();
    newPost.phone0.select();
    return false;
  }
  var p1=newPost.phone1.value;
  if (numOnly.test(p1)) {
    alert("Your Phone Number Should Contain Numbers Only.");
    newPost.phone1.focus();
    newPost.phone1.select();
    return false;
  }
  var p2=newPost.phone2.value;
  if (numOnly.test(p2)) {
    alert("Your Phone Number Should Contain Numbers Only.");
    newPost.phone2.focus();
    newPost.phone2.select();
    return false;
  }
  var p3=newPost.phone3.value;
  if (numOnly.test(p3)) {
    alert("Your Phone Number Extension Should Contain Numbers Only.");
    newPost.phone3.focus();
    newPost.phone3.select();
    return false;
  }

  var p0=newPost.phoneInt0.value;
  if (numOnly.test(p0)) {
    alert("Your International Country Code Phone Number Should Contain Numbers Only.");
    newPost.phoneInt0.focus();
    newPost.phoneInt0.select();
    return false;
  }
  var p1=newPost.phoneInt1.value;
  if (numOnly.test(p1)) {
    alert("Your International Phone Number Should Contain Numbers Only.");
    newPost.phoneInt1.focus();
    newPost.phoneInt1.select();
    return false;
  }
  var p2=newPost.phoneInt2.value;
  if (numOnly.test(p2)) {
    alert("Your Internationa Phone Number Extension Should Contain Numbers Only.");
    newPost.phoneInt2.focus();
    newPost.phoneInt2.select();
    return false;
  }

   if (newPost.lCat.value=="") {
       alert("Please select the category for your rental listing.");
       newPost.lCat.focus();
       return false;
   }
   newPost.submitBtn.disabled = true;
   return true;
}
 
function secondEval() {
	var numOnly=/\D+/g;

   	if (newPost.lRent0.value=="" || numOnly.test(newPost.lRent0.value)) {
   	    alert("Please enter the Monthly Rent dollars.\nNumbers only.");
   	    newPost.lRent0.focus();
   	    newPost.lRent0.select();
   	    return false;
   	}
   	if (newPost.lRent0.value < 11) {
   	    alert("Please enter a valid Monthly Rent in dollars.");
   	    newPost.lRent0.focus();
   	    newPost.lRent0.select();
   	    return false;
   	}
   	if (newPost.lRent1.value=="" || numOnly.test(newPost.lRent1.value)) {
   	    alert("Please enter the Monthly Rent cents.\nNumbers only.");
   	    newPost.lRent1.focus();
   	    newPost.lRent1.select();
   	    return false;
   	}
   	if (newPost.lAddress.value=="") {
   	    alert("Please enter the Rental Property Address.");
   	    newPost.lAddress.focus();
   	    newPost.lAddress.select();
   	    return false;
  	}
   	if (newPost.lCity.value=="") {
       	alert("Please enter the Rental Property City.");
       	newPost.lCity.focus();
       	newPost.lCity.select();
    	return false;
   	}
   	if (newPost.lState.value=="") {
       	alert("Please select the Rental Property State.");
       	newPost.lState.focus();
    	return false;
   	}
   	if (newPost.lZip.value=="" || numOnly.test(newPost.lZip.value)) {
       	alert("Please enter the Rental Property Zip Code.\nNumbers only.");
       	newPost.lZip.focus();
       	newPost.lZip.select();
    	return false;
   	}
   	if (newPost.lBeds.value=="") {
       	alert("Please select the number of Bedrooms for the Rental Property.");
       	newPost.lBeds.focus();
    	return false;
   	}
   	if (newPost.lBaths.value=="") {
       	alert("Please select the number of Bathrooms for the Rental Property.");
       	newPost.lBaths.focus();
    	return false;
   	}
   	if (newPost.lGarage.value=="") {
       	alert("Please select the number of Garage's' for the Rental Property.");
       	newPost.lGarage.focus();
    	return false;
   	}
   	if (newPost.lPets.value=="") {
       	alert("Please make a selection from the 'Pets' selection box, for the Rental Property.");
       	newPost.lPets.focus();
    	return false;
   	}
   	if (newPost.lHeadline.value=="") {
       	alert("Please enter a Headline for the Rental Property.");
       	newPost.lHeadline.focus();
       	newPost.lHeadline.select();
    	return false;
   	}
   	var noGoWords = new Array ("www","http","dot com", "dot net", "dick", "pussy", "ass", "asshole", "tits", "breast", "bastard",
   							  "bullshit")
   							  
	for (var j in noGoWords) {
		if (newPost.lHeadline.value.match(noGoWords[j]) != null) {
	       alert ("The string, or word:<b> " + noGoWords[j] + "</b> is not allowed in the headline.")
	       newPost.lHeadline.focus();
	       newPost.lHeadline.select();
	       return false;
       	}
	}
    newPost.submitBtn.disabled = true;
   	return true;
}


function doAgree() {
   if (newPost.agree.checked) {
      var answer=confirm("By checking this check box 'I agree to the Terms of Service' checkbox,\n You are stating that you have read and agree to the 'Terms of Service' for URents.com.");
   }
   
   if (answer) {
      return true;
   } else {
      newPost.agree.checked=false;
      return false;
   }
}

function removeSubs(the_sub){
   document.getElementById(the_sub).style.display = "none";return
}

function resetForm() {
   for (i=0;i<subs_array.length;i++){
      document.getElementById(subs_array[i]).style.display = "none";
   }
   return true;
}

function validListing() {

   return true;
}


function listPaidEval() {
    str1=/\@/g;
	var numOnly=/\D+/g;
	var billState = newPost.bill_State.value;
	var billProvince = newPost.bill_Province.value;
	if (billState =="" && !newPost.uStates.value.checked) {
	    var flag = "state";
	} else if (billProvince == "" && newPost.cProv.value.checked) {
	    var flag = "province";
	}
	
    if (newPost.bill_FirstName.value=="" || newPost.bill_FirstName.value.length < 2) {
        alert("Please enter your First Name as it appears on your credit card.");
        newPost.bill_FirstName.focus();
        newPost.bill_FirstName.select();
        return false;
    }
    if (newPost.bill_LastName.value=="" || newPost.bill_LastName.value.length < 2) {
        alert("Please enter your Last Name as it appears on your credit card.");
        newPost.bill_LastName.focus();
        newPost.bill_LastName.select();
        return false;
    }
    if (newPost.bill_Street1.value=="" || newPost.bill_Street1.value.length < 3) {
        alert("Please enter your billing Address as it appears on your credit card statement.");
        newPost.bill_Street1.focus();
        newPost.bill_Street1.select();
        return false;
    }
    if (newPost.bill_CityName.value=="" || newPost.bill_CityName.value.length < 3) {
        alert("Please enter your billing City as it appears on your credit card statement.");
        newPost.bill_CityName.focus();
        newPost.bill_CityName.select();
        return false;
    }
    if (flag == "state") {
        alert("Please select your billing State as it appears on your credit card statement.");
        newPost.bill_State.focus();
        return false;
    }   else if (flag == "province") {
        alert("Please select your billing Province as it appears on your credit card statement.");
        newPost.bill_Province.focus();
        return false;    
    }
    
    
    if (newPost.bill_Country.value=="") {
        alert("Please select your billing Country as it appears on your credit card statement.");
        newPost.bill_Country.focus();
        return false;
    }
    var pcNO=newPost.bill_PostalCode.value;
    if (newPost.bill_PostalCode.value=="" || 
    	newPost.bill_PostalCode.value.length < 5 ||
    	numOnly.test(pcNO)) {
        alert("Please enter your billing Postal Code as it appears on your credit card statement.\nNumbers only.");
        newPost.bill_PostalCode.focus();
        newPost.bill_PostalCode.select();
        return false;
    }
    if (newPost.bill_CreditCardType.value=="") {
        alert("Please select the Credit Card Type you wish to use.");
        newPost.bill_CreditCardType.focus();
        return false;
    }
    var ccnNO=newPost.bill_CreditCardNumber.value;
    if (newPost.bill_CreditCardNumber.value=="" || 
        newPost.bill_CreditCardNumber.value.length < 12 ||
        newPost.bill_CreditCardNumber.value.match(" ") != null ||
        numOnly.test(ccnNO)) {
        alert("Please enter your Credit Card Number as it appears on your card.");
        newPost.bill_CreditCardNumber.focus();
        newPost.bill_CreditCardNumber.select();
        return false;
    }
    if (newPost.bill_ExpMonth.value=="") {
        alert("Please select your Credit Card Expiration Month as it appears on your card.");
        newPost.bill_ExpMonth.focus();
        return false;
    }
    if (newPost.bill_ExpYear.value=="") {
        alert("Please select your Credit Card Expiration Year as it appears on your card.");
        newPost.bill_ExpYear.focus();
        return false;
    }
    var cvNO=newPost.bill_cvv2.value;
    if (newPost.bill_cvv2.value=="" || 
    	newPost.bill_cvv2.value.length < 3 ||
    	numOnly.test(cvNO)) {
        alert("Please enter your Credit Card CVV2 number as it appears on the back of your card.");
        newPost.bill_cvv2.focus();
        newPost.bill_cvv2.select();
        return false;
    }    
    newPost.submitBtn.disabled = true;

    return true;
}
//-->