<!-- begin
function validateFreeSetupForm(thisform) {
   var invalid = " "; // Invalid character is a space
   var minLength = 4; // Minimum length
   var pw1 = thisform.usrPswd1.value;
   var pw2 = thisform.usrPswd2.value;
   var alphanum = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
   thisform.usrID.value.toLowerCase();

   //Babysite ID Validations
   if (thisform.usrID.value == '') {
      thisform.usrID.focus();
      alert('Please enter a Babysite ID.');
      return false;
   }
   if (thisform.usrID.value.length < minLength) {
      thisform.usrID.select();
      thisform.usrID.focus();
      alert('Your Babysite ID must be at least ' + minLength + ' characters long.  Please try again.');
      return false;
   }
   for (var i=0;i < thisform.usrID.value.length;i++){
      temp=thisform.usrID.value.substring(i,i+1)
      if (alphanum.indexOf(temp)==-1){
         thisform.usrID.select();
         thisform.usrID.focus();
         alert('Invalid Babysite ID, must be alphanumeric with no spaces.  Please try again.');
         return false;
      }
   }

   //Password Validations
   if (pw1 == '' || pw2 == '') {
      thisform.usrPswd1.select();
      thisform.usrPswd1.focus();
      alert('Please enter your password twice.');
      return false;
   }
   if (pw1 != pw2) {
      thisform.usrPswd1.select();
      thisform.usrPswd1.focus();
      alert('You did not enter the same new password twice. Please re-enter your password.');
      return false;
   }
   if (pw1.length < minLength) {
      thisform.usrPswd1.select();
      thisform.usrPswd1.focus();
      alert('Your password must be at least ' + minLength + ' characters long.  Please try again.');
      return false;
   }
   if (pw1.indexOf(invalid) > -1) {
      thisform.usrPswd1.select();
      thisform.usrPswd1.focus();
      alert('Sorry, spaces are not allowed.');
      return false;
   }
   //Email Validation
   if (!validateEmail2(thisform.usrEmail.value)) {
      thisform.usrEmail.select();
      thisform.usrEmail.focus();
      return false;
   }
   //Parent Validations
   if ((thisform.usrMomFirst.value == "" || thisform.usrMomLast.value == "") && (thisform.usrDadFirst.value == "" || thisform.usrDadLast.value == "")) {
      thisform.usrMomFirst.focus();
      alert("You must specify the Mother's or Father's full name.");
      return false;
   }
   //Country Validation
   if (thisform.usrCountry.value == "") {
      thisform.usrCountry.focus();
      alert("You must specify the Country.");
      return false;
   }
   //Baby First Name
   if (thisform.usrBabyFirst.value == "") {
      thisform.usrBabyFirst.focus();
      alert("You must specify the Baby's First Name.");
      return false;
   }
   if (thisform.usrBabyLast.value == "") {
      thisform.usrBabyLast.focus();
      alert("You must specify the the Baby's Last Name");
      return false;
   }
   if (thisform.usrBabyDOB.value == "") {
      thisform.usrBabyDOB.focus();
      alert("You must specify the Baby's Due Date or Birthdate.");
      return false;
   }
   if (checkDate('Calendar1') == 1) {
      thisform.usrBabyDOB.focus();
      alert("Please enter a valid Baby's Due Date or Birthdate.");
      return false;
   }
   //Accept Terms Validation
   if (thisform.termsResponse.checked == false) {
      thisform.termsResponse.focus();
      alert("You must ACCEPT the End User License Agreement and Privacy Policy before creating a Babysite Membership.");
      return false;
   }
   //Verification Code
   if (thisform.usrKeyValue.value == "") {
      thisform.usrKeyValue.focus();
      alert("You must re-enter the Verification Code.  Please try again.");
      return false;
   }
   return true;
}

function validatePremiumAcctForm(thisform) {
   var invalid = " "; // Invalid character is a space
   var minLength = 4; // Minimum length
   var pw1 = thisform.usrPswd1.value;
   var pw2 = thisform.usrPswd2.value;
   var alphanum = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
   thisform.usrID.value.toLowerCase();

   //Babysite ID Validations
   if (thisform.usrID.value == '') {
      thisform.usrID.focus();
      alert('Please enter a Babysite ID.');
      return false;
   }
   if (thisform.usrID.value.length < minLength) {
      thisform.usrID.select();
      thisform.usrID.focus();
      alert('Your Babysite ID must be at least ' + minLength + ' characters long.  Please try again.');
      return false;
   }
   for (var i=0;i < thisform.usrID.value.length;i++){
      temp=thisform.usrID.value.substring(i,i+1)
      if (alphanum.indexOf(temp)==-1){
         thisform.usrID.select();
         thisform.usrID.focus();
         alert('Invalid Babysite ID, must be alphanumeric with no spaces.  Please try again.');
         return false;
      }
   }

   //Password Validations
   if (pw1 == '' || pw2 == '') {
      thisform.usrPswd1.select();
      thisform.usrPswd1.focus();
      alert('Please enter your password twice.');
      return false;
   }
   if (pw1 != pw2) {
      thisform.usrPswd1.select();
      thisform.usrPswd1.focus();
      alert('You did not enter the same new password twice. Please re-enter your password.');
      return false;
   }
   if (pw1.length < minLength) {
      thisform.usrPswd1.select();
      thisform.usrPswd1.focus();
      alert('Your password must be at least ' + minLength + ' characters long.  Please try again.');
      return false;
   }
   if (pw1.indexOf(invalid) > -1) {
      thisform.usrPswd1.select();
      thisform.usrPswd1.focus();
      alert('Sorry, spaces are not allowed.');
      return false;
   }
   //Email Validation
   if (!validateEmail2(thisform.usrEmail.value)) {
      thisform.usrEmail.select();
      thisform.usrEmail.focus();
      return false;
   }
   //Parent Validations
   if ((thisform.usrMomFirst.value == "" || thisform.usrMomLast.value == "") && (thisform.usrDadFirst.value == "" || thisform.usrDadLast.value == "")) {
      thisform.usrMomFirst.focus();
      alert("You must specify the Mother's or Father's full name.");
      return false;
   }
   //Country Validation
   if (thisform.usrCountry.value == "") {
      thisform.usrCountry.focus();
      alert("You must specify the Country.");
      return false;
   }
   //Accept Terms Validation
   if (thisform.termsResponse.checked == false) {
      thisform.termsResponse.focus();
      alert("You must ACCEPT the End User License Agreement and Privacy Policy before creating a Babysite Membership.");
      return false;
   }
   //Verification Code
   if (thisform.usrKeyValue.value == "") {
      thisform.usrKeyValue.focus();
      alert("You must re-enter the Verification Code.  Please try again.");
      return false;
   }
   return true;
}

function validatePremiumSiteForm(thisform) {
   //Baby First Name
   if (thisform.usrBabyFirst.value == "") {
      thisform.usrBabyFirst.focus();
      alert("You must specify the Baby's First Name.");
      return false;
   }
   if (thisform.usrBabyLast.value == "") {
      thisform.usrBabyLast.focus();
      alert("You must specify the the Baby's Last Name");
      return false;
   }
   if (thisform.usrBabyDOB.value == "") {
      thisform.usrBabyDOB.focus();
      alert("You must specify the Baby's Due Date or Birthdate.");
      return false;
   }
   return true;
}

function validateBabysiteID(str) {
   if (str.length==0) { 
      document.getElementById("bidStatus").innerHTML="";
      return;
   }
   if (window.XMLHttpRequest) {
      // code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
   } else {
      // code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   xmlhttp.onreadystatechange=function() {
      if (xmlhttp.readyState==4 && xmlhttp.status==200) {
         document.getElementById("bidStatus").innerHTML=xmlhttp.responseText;
      }
   }
   xmlhttp.open("GET","/admin/checkBabysiteID.asp?q="+str,true);
   xmlhttp.send();
}

-->