function confirm_adult() {
  var answer = confirm("Disclaimer: You must be at least 18 years of age to view these domain listings. There is no adult content, however adult language is incorporated into these domains names. eNet Advertising is only marketing these sites for sale and they are not owned by eNet Advertising.")
  if (answer){
    window.location = "http://www.enetsites.com/cat/Adult";
  }
}

function validate_form(thisform) {

  with(thisform) {
    if(offer_price.value=='Make Offer' || offer_price.length==0) {
      alert('Please input a valid offer');
      return false;
    }
    if(offer_lname.value=='') {
      alert('Please input a valid last name');
      return false;
    } 
    if(offer_fname.value=='') {
      alert('Please input a valid first name');
      return false;
    } 
    if(echeck(offer_email.value)==false || offer_email.value=='') {
      alert('Please input a valid email address.');
      return false;
    }
    if(offer_addrcity.value=='') {
      alert('Please input a city.');
      return false;

    }
  }
  return true;
}

function validate_appr(thisform) {

  with(thisform) {
    if(appr_domain.value=='') {
      alert('Please input a valid domain');
      return false;
    }
    if(appr_lname.value=='') {
      alert('Please input a valid last name');
      return false;
    } 
    if(appr_fname.value=='') {
      alert('Please input a valid first name');
      return false;
    } 
    if(echeck(appr_email.value)==false || appr_email.value=='') {
      alert('Please input a valid email address.');
      return false;
    }
    if(apppr_addrcity.value=='') {
      alert('Please input a city.');
      return false;

    }
  }
  return true;
}

function validate_sell(thisform) {

  with(thisform) {
    if(sell_domain.value=='') {
      alert('Please input a valid domain');
      return false;
    }
    if(sell_price.value=='') {
      alert('Please input a valid asking price.');
      return false;
    }
    if(sell_lname.value=='') {
      alert('Please input a valid last name');
      return false;
    } 
    if(sell_fname.value=='') {
      alert('Please input a valid first name');
      return false;
    } 
    if(echeck(sell_email.value)==false || sell_email.value=='') {
      alert('Please input a valid email address.');
      return false;
    }
    if(apppr_addrcity.value=='') {
      alert('Please input a city.');
      return false;

    }
  }
  return true;
}




function echeck(str) {
  var at="@"
  var dot="."
  var lat=str.indexOf(at)
  var lstr=str.length
  var ldot=str.indexOf(dot)
  if (str.indexOf(at)==-1){
    return false
  }
  if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
    return false
  }
  if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
    return false
  }
  if (str.indexOf(at,(lat+1))!=-1){
    return false
  }
  if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
    return false
  }
  if (str.indexOf(dot,(lat+2))==-1){
    return false
  }
  if (str.indexOf(" ")!=-1){
    return false
  }
  return true					
}


