function validateShare(formData, jqForm, options) { 
  var form = jqForm[0]; 
  if (!form.name.value || !form.email.value) { 
    alert('Please enter a value for both Your Name and Your Email'); 
    return false; 
  } else {
   newHtml = '<h2>Share Your Story</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for sharing your story about Garbett Homes.</p>';
    $('#shareFrm').data('frm',$('#shareFrm').html()); 
    $('#shareFrm').html(newHtml); 
  } 
}


function validateAsk(formData, jqForm, options) { 
  var form = jqForm[0]; 
  if (!form.name.value || !form.email.value) { 
    alert('Please enter a value for both Your Name and Your Email'); 
    return false; 
  } else {
   newHtml = '<h2>Ask a Question</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for asking a question about this community. You will receive an answer as soon as possible</p>' +
            '<div style="text-align: right; width: 100%; margin-top: 0px; float: left;"><button id="askAgainBtn" type="button" class="askAgainBtn" onclick="showAskFrm(); return false"></button></div>';
    $('#askFrm').data('frm',$('#askFrm').html()); 
    $('#askFrm').html(newHtml); 
  } 
}

function validateRealtor(formData, jqForm, options) { 
  var form = jqForm[0]; 
  if (!form.name.value || !form.email.value) { 
    alert('Please enter a value for both Your Name and Your Email'); 
    return false; 
  } else {
   newHtml = '<h2>For Realtors</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for joining our interested buyers list for this community.</p>';
    $('#realtorFrm').data('frm',$('#realtorFrm').html()); 
    $('#realtorFrm').html(newHtml); 
  } 
}

function validateAskHoa(formData, jqForm, options) { 
  var form = jqForm[0]; 
  if (!form.name.value || !form.email.value) { 
    alert('Please enter a value for both Your Name and Your Email'); 
    return false; 
  } else {
   newHtml = '<h2>Ask a Question</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for asking a question about this community HOA. You will receive an answer as soon as possible</p>' +
            '<div style="text-align: right; width: 100%; margin-top: 0px; float: left;"><button id="askAgainBtn" type="button" class="askAgainBtn" onclick="showAskFrm(); return false"></button></div>';
    $('#askFrm').data('frm',$('#askFrm').html()); 
    $('#askFrm').html(newHtml); 
  } 
}
function validateTell(formData, jqForm, options) { 
  var form = jqForm[0]; 
  if (!form.friend_email.value || !form.name.value || !form.email.value) { 
    alert('Please enter a value for Friend\'s Email, Your Email, Your Name, and Subject Line'); 
    return false; 
  } else {
  newHtml = '<h2>Tell a Friend</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for telling your friend  about Garbett Homes.</p>' +
            '<div style="text-align: right; width: 100%; margin-top: 0px; float: left;"><button id="askAgainBtn" type="button" class="tellAnothBtn" onclick="showTellFrm(); return false"></button></div>';
    $('#tellFrm').data('frm',$('#tellFrm').html()); 
    $('#tellFrm').html(newHtml); 
  } 
}

function validateTellGBM(formData, jqForm, options) { 
  var form = jqForm[0]; 
  if (!form.friend_email.value || !form.name.value || !form.email.value) { 
    alert('Please enter a value for Friend\'s Email, Your Email, Your Name, and Subject Line'); 
    return false; 
  } else {
  newHtml = '<h2>Tell a Friend</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for telling your friend  about Garbett Mortgage.</p>' +
            '<div style="text-align: right; width: 100%; margin-top: 0px; float: left;"><button id="askAgainBtn" type="button" class="tellAnothBtn" onclick="showTellFrm(); return false"></button></div>';
    $('#tellFrm').data('frm',$('#tellFrm').html()); 
    $('#tellFrm').html(newHtml); 
  } 
}

function validateTellGPM(formData, jqForm, options) { 
  var form = jqForm[0]; 
  if (!form.friend_email.value || !form.name.value || !form.email.value) { 
    alert('Please enter a value for Friend\'s Email, Your Email, Your Name, and Subject Line'); 
    return false; 
  } else {
  newHtml = '<h2>Tell a Friend</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for telling your friend about Garbett Homeowner Central.</p>' +
            '<div style="text-align: right; width: 100%; margin-top: 0px; float: left;"><button id="askAgainBtn" type="button" class="tellAnothBtn" onclick="showTellFrm(); return false"></button></div>';
    $('#tellFrm').data('frm',$('#tellFrm').html()); 
    $('#tellFrm').html(newHtml); 
  } 
}
function showAskResponse(responseText, statusText)  { 
  newHtml = '<h2>Ask a Question</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>'+responseText+'</p>' +
            '<div style="text-align: right; width: 100%; margin-top: 0px; float: left;"><button id="askAgainBtn" type="button" class="askAgainBtn" onclick="showAskFrm(); return false"></button></div>';
  $('#askFrm').data('frm',$('#askFrm').html()); 
  $('#askFrm').html(newHtml); 
}

function showAskFrm() {
  $('#askFrm').html($('#askFrm').data('frm')); 
}
function showTellResponse(responseText, statusText)  { 
  newHtml = '<h2>Tell a Friend</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>'+responseText+'</p>' +
            '<div style="text-align: right; width: 100%; margin-top: 0px; float: left;"><button id="askAgainBtn" type="button" class="tellAnothBtn" onclick="showTellFrm(); return false"></button></div>';
  $('#tellFrm').data('frm',$('#tellFrm').html()); 
  $('#tellFrm').html(newHtml); 
}

function showTellFrm() {
  $('#tellFrm').html($('#tellFrm').data('frm')); 
}

function showEmploymentResponse(responseText, statusText)  { 
  newHtml = '<h2>Employment Opportunities</h2>' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Your submission has been received and we will respond as soon as possible.</p>'; 
//            '<div style="text-align: right; width: 100%; margin-top: 0px; float: left;"><button id="employAgainBtn" type="submit" class="tellAnothBtn"></button></div>';
  $('#POD2').html(newHtml); 
}

function validateEmployment(formData, jqForm, options) { 
  var form = jqForm[0]; 
  if (!form.name.value || !form.email.value) { 
    alert('Please enter a value for both Your Name and Your Email'); 
    return false; 
  } else {
    newHtml = '<h2>Employment Opportunities</h2>' +
              '<h2 style="color: red;">Success!</h2>' +
              '<p>Your submission has been received and we will respond as soon as possible.</p>'; 
    $('#POD2').html(newHtml); 
  } 
}
function validateBid(formData, jqForm, options) { 
  var form = jqForm[0]; 
    newHtml = '<h2 style="color: red;">Success!</h2>' +
              '<p>Your submission has been received and we will respond as soon as possible.</p>'; 
    $('#bidFrm').html(newHtml); 
}




function showSuggestResponse(responseText, statusText)  { 
  newHtml = '<h2>Suggestions</h2>' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Your submission has been received and we will respond as soon as possible.</p>'; 
//            '<div style="text-align: right; width: 100%; margin-top: 0px; float: left;"><button id="employAgainBtn" type="submit" class="tellAnothBtn"></button></div>';
  $('#suggestFrm').html(newHtml); 
}
function showRentResponse(responseText, statusText)  { 
  newHtml = '<h2>Thank you for your application, someone will be contacting you</h2>'; 
  $('#rentFrm').html(newHtml); 
}

function validateRent(formData, jqForm, options) { 
  var form = jqForm[0]; 
  if (!form.friend_email.value || !form.name.value || !form.email.value || !form.subject.value) { 
    alert('Please enter a value for Friend\'s Email, Your Email, Your Name, and Subject Line'); 
    return false; 
  } else {
    newHtml = '<h2>Thank you for your application, someone will be contacting you</h2>'; 
    $('#rentFrm').html(newHtml); 
  } 
}

function validateSuggest(formData, jqForm, options) { 
  var form = jqForm[0]; 
  if (!form.name.value || !form.email.value) { 
    alert('Please enter a value for both Your Name and Your Email'); 
    return false; 
  } else {
    newHtml = '<h2>Suggestions</h2>' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Your submission has been received and we will respond as soon as possible.</p>'; 
    $('#suggestFrm').html(newHtml); 
  } 
}


function accesslogin () {
     window.open("http://agents.garbetthomes.com/user/authenticate","accesswindow","scrollbars=yes,status=yes,resizable=yes,toolbar=0,location=0,directories=0,menubar=0,width=800,height=600,top=0,left=0");
     return false;
}


function validatePet(formData, jqForm, options) { 
  var form = jqForm[0]; 
/*  if (!form.name.value || !form.email.value) { 
    alert('Please enter a value for both Your Name and Your Email'); 
    return false; 
  } else {
*/
  newHtml = '<h2>Pet Registration</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for registering your pet</p>' ;
//    $('#petFrm').data('frm',$('#petFrm').html()); 
    $('#petFrm').html(newHtml); 
//  } 
}

function validateWarranty(formData, jqForm, options) { 
  var form = jqForm[0]; 
/*  if (!form.name.value || !form.email.value) { 
    alert('Please enter a value for both Your Name and Your Email'); 
    return false; 
  } else {
*/
  newHtml = '<h2>Submit a Warranty Request</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for submitting a warranty request.  A warranty coordinator will contact you within two business days.</p>' ;
//    $('#petFrm').data('frm',$('#petFrm').html()); 
    $('#warrantyFrm').html(newHtml); 
//  } 
}

function validateClubhouse(formData, jqForm, options) { 
  var form = jqForm[0]; 
/*  if (!form.name.value || !form.email.value) { 
    alert('Please enter a value for both Your Name and Your Email'); 
    return false; 
  } else {
*/
  newHtml = '<h2>Clubhouse Rental</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for submitting a clubhouse rental.</p>' ;
//    $('#petFrm').data('frm',$('#petFrm').html()); 
    $('#clubhouseFrm').html(newHtml); 
//  } 
}

function validateVehicle(formData, jqForm, options) { 
  var form = jqForm[0]; 
/*  if (!form.name.value || !form.email.value) { 
    alert('Please enter a value for both Your Name and Your Email'); 
    return false; 
  } else {
*/
  newHtml = '<h2>Vehicle Registration</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for registering your vehicle.</p>' ;
//    $('#petFrm').data('frm',$('#petFrm').html()); 
    $('#vehicleFrm').html(newHtml); 
//  } 
}

function validateInterest(formData, jqForm, options) { 
  var form = jqForm[0]; 
  if (!form.first_name.value || !form.last_name.value || !form.email.value || !form.telephone.value) { 
    alert('Please fill out all of the fields.'); 
    return false; 
  } else {
   newHtml = '<h2>Interested Buyer\'s List</h2><br />' +
            '<h2 style="color: red;">Success!</h2>' +
            '<p>Thank you for joining our interested buyers list for this community.</p>'; 
    $('#interestFrm').data('frm',$('#interestFrm').html()); 
    $('#interestFrm').html(newHtml); 
  } 
}


