function SubmitFrm(){ var First_Name = document.getElementById("First_Name"); var Last_Name = document.getElementById("Last_Name"); var Email = document.getElementById("Email"); var Phone = document.getElementById("Phone"); var Comments = document.getElementById("Comments"); var Captcha = document.getElementById("Captcha"); if(First_Name.value == ""){ alert(""); First_Name.focus(); } else if(Last_Name.value == ""){ alert(""); Last_Name.focus(); } else if(Email.value == ""){ alert(""); Email.focus(); } else if(Phone.value == ""){ alert(""); Phone.focus(); } else if(Comments.value == ""){ alert(""); Comments.focus(); } else if(Captcha.value == ""){ alert(""); Captcha.focus(); } else{ var captcha_ = $("#Captcha").val(); $.get("https://healthyandsafe.biz/wp-content/themes/healthyandsafe/validate.php?captcha="+captcha_+"", function(data){ if (data=="1") { $.post("https://healthyandsafe.biz/wp-content/themes/healthyandsafe/sendemail.php", $("#ktk").serialize(), function (data) { //alert (data); //document.location = "https://healthyandsafe.biz/?page_id=410&lang="; document.location="https://healthyandsafe.biz/thank-you/"; }); } else { alert(data); } //alert(1); }); } } function SubmitFrm_(){ var First_Name = document.getElementById("First_Name"); var Last_Name = document.getElementById("Last_Name"); var Email = document.getElementById("Email"); var Phone = document.getElementById("Phone"); var Comments = document.getElementById("Comments"); var Captcha = document.getElementById("Captcha"); if(First_Name.value == ""){ alert(""); First_Name.focus(); } else if(Last_Name.value == ""){ alert(""); Last_Name.focus(); } else if(Email.value == ""){ alert(""); Email.focus(); } else if(Phone.value == ""){ alert(""); Phone.focus(); } else if(Comments.value == ""){ alert(""); Comments.focus(); } else if(Captcha.value == ""){ alert(""); Captcha.focus(); } else{ var captcha_ = $("#Captcha").val(); $.get("https://healthyandsafe.biz/wp-content/themes/healthyandsafe/validate.php?captcha="+captcha_+"", function(data){ if (data=="1") { $.post("https://healthyandsafe.biz/wp-content/themes/healthyandsafe/sendemail.php", $("#ktk").serialize(), function (data) { //alert (data); //document.location = "https://healthyandsafe.biz/?page_id=410&lang="; document.location="https://healthyandsafe.biz/thank-you/"; }); } else { alert(data); } //alert(1); }); } } function save_course() { if($("#mydate").val() == ""){ alert("Select Date"); $("#mydate").focus(); } else if ($("#Number_of_Participants").val()==""){ alert("Number of Participants is required"); $("#Number_of_Participants").focus(); } else if ($("#First_Name_").val() =="") { alert("First Name is required"); $("#First_Name_").focus(); } else if ($("#Last_Name_").val() =="") { alert("Last Name is required"); $("#Last_Name_").focus(); } else if ($("#Mobile").val() =="") { alert("Mobile is required"); $("#Mobile").focus(); } else if($("#E-mail_").val()=="") { alert("Email is required"); $("#E-mail_").focus(); } /* else if($("#Message_").val()=="") { alert("Message is required"); $("#Message_").focus(); }*/ else if($("#Captcha").val() == ""){ alert(""); $("#Captcha").focus(); } else{ var captcha_ = $("#Captcha").val(); $.get("https://healthyandsafe.biz/wp-content/themes/healthyandsafe/validate.php?captcha="+captcha_+"", function(data){ if (data=="1") { var selects = $('#services').val(); $("#itemsel").val(selects); $.post("https://healthyandsafe.biz/wp-content/themes/healthyandsafe/sendemail_.php?selects="+selects+"", $("#frm_private_package").serialize(), function (data) { //alert(data); if (data==1){ document.location="https://healthyandsafe.biz/thank-you/"; } }); } else { alert(data); } }); } } function course_sign_up() { if ($("#First_Name").val() =="") { alert("First Name is required"); $("#First_Name").focus(); } else if ($("#Last_Name").val() =="") { alert("Last Name is required"); $("#Last_Name").focus(); } else if($("#mydate").val() == ""){ alert("Select Date"); $("#mydate").focus(); } else if($("#Address").val()==""){ alert("Address is required"); $("#Address").focus(); } else if($("#City").val()==""){ alert("ZIP Code / City is required"); $("#City").focus(); } else if($("#E-mail").val()=="") { alert("Email is required"); $("#E-mail").focus(); } else if($("#Mobile").val()=="") { alert("Mobile is required"); $("#Mobile").focus(); } /*else if($("#Phone").val()=="") { alert("Phone is required"); $("#Phone").focus(); } */ /*else if($("#Mobile").val()=="") { alert("Mobile is required"); $("#Mobile").focus(); } else if($("#Message").val()=="") { alert("Message is required"); $("#Message").focus(); }*/ else if($("#Captcha").val() == ""){ alert(""); $("#Captcha").focus(); } /*else if (!($('#terms_cond').checked)){ alert("You must read and agree to the terms and conditions."); }*/ else if(!($('#terms_cond').is(':checked'))) { alert("You must read and agree to the terms and conditions."); } else{ var captcha_ = $("#Captcha").val(); $.get("https://healthyandsafe.biz/wp-content/themes/healthyandsafe/validate.php?captcha="+captcha_+"", function(data){ if (data=="1") { var selects = $('#services').val(); $("#itemsel").val(selects); //alert(selects); $.post("https://healthyandsafe.biz/wp-content/themes/healthyandsafe/sendemail_course.php?selects="+selects+"", $("#frm_course").serialize(), function (data) { //alert(data); if (data==1){ document.location="https://healthyandsafe.biz/thank-you/"; } }); } else { alert(data); } }); } }