<!--
function ValidateListing() {
  FixThis = "";

  if (document.listing.u_email.value.length > 0) {
    i   = document.listing.u_email.value.indexOf("@");
    j   = document.listing.u_email.value.indexOf(".",i);
    k   = document.listing.u_email.value.indexOf(",");
    kk  = document.listing.u_email.value.indexOf(" ");
    jj  = document.listing.u_email.value.lastIndexOf(".")+1;
    len = document.listing.u_email.value.length;

    if ((i > 0) && (j > (i+1)) && (k == -1) && (kk == -1) && (len-jj >= 2) && (len-jj <= 3)) {
    } else {
      FixThis = FixThis + "* [" + document.listing.u_email.value + "] is an invalid e-mail address\n";
    }
  } else {
    FixThis = FixThis + "* You haven't entered your email address\n";
  }

  if (document.listing.password.value == "") {
    FixThis = FixThis + "* You haven't entered your password\n"; }

  if (document.listing.confirmpassword.value !== document.listing.password.value) {
    FixThis = FixThis + "* You haven't confirmed your password\n"; }

  if (document.listing.u_name.value == "") {
    FixThis = FixThis + "* You haven't entered the name on your credit card\n"; }

  if (document.listing.u_address.value == "") {
    FixThis = FixThis + "* You haven't entered your billing address\n"; }

  if (document.listing.u_city.value == "") {
    FixThis = FixThis + "* You haven't entered your billing city\n"; }

  if (document.listing.u_state.value.length < 2) {
    FixThis = FixThis + "* You haven't entered a billing state, province or region\n"; }

  if (document.listing.u_zip.value.length < 5) {
    FixThis = FixThis + "* You haven't entered a billing zip or postal code\n"; }

  if (document.listing.u_country.value == "") {
    FixThis = FixThis + "* You haven't entered your billing country\n"; }

  if (document.listing.u_phonew.value.length < 10) {
    FixThis = FixThis + "* You haven't entered a daytime phone #\n"; }

  if (document.listing.u_phoneh.value.length < 10) {
    FixThis = FixThis + "* You haven't entered an evening phone #\n"; }

  if (document.listing.title.value == "") {
    FixThis = FixThis + "* You haven't entered an ad title\n"; }

  if (document.listing.style.value == "") {
    FixThis = FixThis + "* You haven't entered the rental type\n"; }

  if (document.listing.description_short.value == "") {
    FixThis = FixThis + "* You haven't entered a short property description\n"; }

  if (document.listing.location.value == "") {
    FixThis = FixThis + "* You haven't entered the property's location\n"; }

  if (document.listing.zip.value.length < 5) {
    FixThis = FixThis + "* You haven't entered the property zip/postal code\n"; }

  if (document.listing.bedrooms.value == 0) {
    FixThis = FixThis + "* You haven't indiciated the number of bedrooms\n"; }

  if (document.listing.sleeps.value == 0) {
    FixThis = FixThis + "* You haven't indiciated the number of people your property can sleep      \n"; }

  if (document.listing.bath.value == 0) {
    FixThis = FixThis + "* You haven't indiciated the number of bathrooms\n"; }

  if (document.listing.Rate_Weekly.value == "") {
    FixThis = FixThis + "* You haven't entered a minimum weekly rate\n"; }

  if (document.listing.description_long.value.length < 10) {
    FixThis = FixThis + "* You haven't entered the property description\n"; }

  if (document.listing.amenities.value.length < 4) {
    FixThis = FixThis + "* You haven't entered the property amenities\n"; }

  if (document.listing.activities.value.length < 4) {
    FixThis = FixThis + "* You haven't entered the nearby activities\n"; }

  if (FixThis > "") {
    alert("Please correct the following problems before submitting your property:\n\n" + FixThis)
    return false }
}
// -->