// JavaScript Document function isEmail(aStr) { var reEmail=/^[0-9a-zA-Z_\.-]+\@[0-9a-zA-Z_\.-]+\.[a-zA-Z]+$/; if(!reEmail.test(aStr)) { return false; } return true; } $(function(){ $('.digits').keydown(function(e){ if(e.shiftKey && (e.keyCode == 35|| e.keyCode == 36 || e.keyCode==9)) { } else if(e.shiftKey || e.altKey || e.ctrlKey) { return false; } if((e.keyCode>=48 && e.keyCode<=57)|| (e.keyCode>=96 && e.keyCode<=105)|| (e.keyCode == 8 || e.keyCode == 9 || e.keyCode == 46 || e.keyCode == 35|| e.keyCode == 36|| e.keyCode == 37|| e.keyCode == 39|| e.keyCode == 13 || e.keyCode == 16 || e.keyCode == 17 || e.keyCode == 18 || e.keyCode == 20 || e.keyCode == 116 || e.keyCode ==144 )) { } else { return false; } }); $('.phone').keydown(function(e){ //alert(e.keyCode); if(e.shiftKey && (e.keyCode == 35|| e.keyCode == 36 || e.keyCode==9)) { } else if(e.shiftKey || e.altKey || e.ctrlKey) { return false; } if((e.keyCode>=48 && e.keyCode<=57)|| (e.keyCode>=96 && e.keyCode<=105)|| (e.keyCode == 32 || e.keyCode == 189 || e.keyCode == 109 || e.keyCode == 111 || e.keyCode == 191 || e.keyCode == 8 || e.keyCode == 9 || e.keyCode == 46 || e.keyCode == 35|| e.keyCode == 36|| e.keyCode == 37|| e.keyCode == 39|| e.keyCode == 13 || e.keyCode == 16 || e.keyCode == 17 || e.keyCode == 18 || e.keyCode == 20 || e.keyCode == 116 || e.keyCode ==144 )) { } else { return false; } }); }); function SubmitFeedbackForm() { var xflag=1; var errmsg=''; var focusfield=''; if($('#txtFeedbackFormName').val()=='' || $('#txtFeedbackFormName').val()=='Name*') { xflag=0; if(errmsg=='') { errmsg='Please enter name.'; focusfield='txtFeedbackFormName'; } else { errmsg+='\nPlease enter name.'; } } if($('#txtFeedbackFormEmail').val()=='' || $('#txtFeedbackFormEmail').val()=='Email Address*') { xflag=0; if(errmsg=='') { errmsg='Please enter email id.'; focusfield='txtFeedbackFormEmail'; } else { errmsg+='\nPlease enter email id.'; } } else if(!isEmail($('#txtFeedbackFormEmail').val())) { xflag=0; if(errmsg=='') { errmsg='Please enter valid email id.'; focusfield='txtFeedbackFormEmail'; } else { errmsg+='\nPlease enter valid email id.'; } } /*if($('#txtFeedbackFormPhone').val()=='' || $('#txtFeedbackFormPhone').val()=='Telephone Number*') { xflag=0; if(errmsg=='') { errmsg='Please enter phone no.'; focusfield='txtFeedbackFormPhone'; } else { errmsg+='\nPlease enter phone no.'; } }*/ if($('#txtFeedbackFormComments').val()=='' || $('#txtFeedbackFormComments').val()=='Your Feedback*') { xflag=0; if(errmsg=='') { errmsg='Please enter your feedback.'; focusfield='txtFeedbackFormComments'; } else { errmsg+='\nPlease enter your feedback.'; } } //, txtFeedbackFormComments:$('#txtFeedbackFormComments').val() if(xflag==1) { $('#btnFeedbackFormSubmit').val('Wait...'); $('#btnFeedbackFormSubmit').attr('disabled',true); $.post('incl/feedback.php',{txtFeedbackFormName:$('#txtFeedbackFormName').val(), txtFeedbackFormEmail:$('#txtFeedbackFormEmail').val(), txtFeedbackFormComments:$('#txtFeedbackFormComments').val()},function(responsedata){ $('#btnFeedbackFormSubmit1').hide(); $('#btnFeedbackFormSubmit').show(); if(responsedata!='') { var responsevalues=(responsedata).split('~ResponseData~'); if(responsevalues[0]==0 || responsevalues[0]=='') { alert(responsevalues[1]); $('#txtFeedbackFormName').val(document.getElementById('txtFeedbackFormName').defaultValue); $('#txtFeedbackFormEmail').val(document.getElementById('txtFeedbackFormEmail').defaultValue); //$('#txtFeedbackFormPhone').val(document.getElementById('txtFeedbackFormPhone').defaultValue); $('#txtFeedbackFormComments').val(document.getElementById('txtFeedbackFormComments').defaultValue); $('#btnFeedbackFormSubmit').val('Submit'); $('#btnFeedbackFormSubmit').attr('disabled',false); } else { alert(responsevalues[1]); $('#'+responsevalues[2]).focus(); $('#btnFeedbackFormSubmit').val('Submit'); $('#btnFeedbackFormSubmit').attr('disabled',false); } } else { alert('Error in submit your query...'); $('#txtFeedbackFormEmail').focus(); $('#btnFeedbackFormSubmit').val('Submit'); $('#btnFeedbackFormSubmit').attr('disabled',false); } }); } else { alert(errmsg); $('#'+focusfield).focus(); } } function SubmitEnquiryForm() { var xflag=1; var errmsg=''; var focusfield=''; if($('#txtContactFormName').val()=='' || $('#txtContactFormName').val()=='Name*') { xflag=0; if(errmsg=='') { errmsg='Please enter name.'; focusfield='txtContactFormName'; } else { errmsg+='\nPlease enter name.'; } } if($('#txtContactFormPhone').val()=='' || $('#txtContactFormPhone').val()=='Telephone Number*') { xflag=0; if(errmsg=='') { errmsg='Please enter phone no.'; focusfield='txtContactFormPhone'; } else { errmsg+='\nPlease enter phone no.'; } } if($('#txtContactFormEmail').val()=='' || $('#txtContactFormEmail').val()=='Email Address*') { xflag=0; if(errmsg=='') { errmsg='Please enter email id.'; focusfield='txtContactFormEmail'; } else { errmsg+='\nPlease enter email id.'; } } else if(!isEmail($('#txtContactFormEmail').val())) { xflag=0; if(errmsg=='') { errmsg='Please enter valid email id.'; focusfield='txtContactFormEmail'; } else { errmsg+='\nPlease enter valid email id.'; } } /*if($('#txtContactFormComments').val()=='') { xflag=0; if(errmsg=='') { errmsg='Please enter your query.'; focusfield='txtContactFormComments'; } else { errmsg+='\nPlease enter your query.'; } }*/ //, txtContactFormComments:$('#txtContactFormComments').val() if(xflag==1) { $('#btnContactFormSubmit').html('Wait...'); $('#btnContactFormSubmit').attr('disabled',true); $.post('server-activity.php?act=8bcdfccc79791cbee045549a0cbe987f',{txtContactFormName:$('#txtContactFormName').val(), txtContactFormEmail:$('#txtContactFormEmail').val(), txtContactFormPhone:$('#txtContactFormPhone').val(), txtContactFormComments:$('#txtContactFormComments').val()},function(responsedata){ $('#btnContactFormSubmit1').hide(); $('#btnContactFormSubmit').show(); if(responsedata!='') { var responsevalues=(responsedata).split('~ResponseData~'); if(responsevalues[0]==0 || responsevalues[0]=='') { alert(responsevalues[1]); $('#txtContactFormName').val(document.getElementById('txtContactFormName').defaultValue); $('#txtContactFormEmail').val(document.getElementById('txtContactFormEmail').defaultValue); $('#txtContactFormPhone').val(document.getElementById('txtContactFormPhone').defaultValue); $('#txtContactFormComments').val(document.getElementById('txtContactFormComments').defaultValue); $('#btnContactFormSubmit').html('Submit'); $('#btnContactFormSubmit').attr('disabled',false); } else { alert(responsevalues[1]); $('#'+responsevalues[2]).focus(); $('#btnContactFormSubmit').html('Submit'); $('#btnContactFormSubmit').attr('disabled',false); } } else { alert('Error in submit your query...'); $('#txtContactFormEmail').focus(); $('#btnContactFormSubmit').html('Submit'); $('#btnContactFormSubmit').attr('disabled',false); } }); } else { alert(errmsg); $('#'+focusfield).focus(); } } function SubmitPackageEnquiryForm() { var xflag=1; var errmsg=''; var focusfield=''; if($('#txtPackageEnquiryName').val()=='' || $('#txtPackageEnquiryName').val()=='Name*') { xflag=0; if(errmsg=='') { errmsg='Please enter name.'; focusfield='txtPackageEnquiryName'; } else { errmsg+='\nPlease enter name.'; } } if($('#txtPackageEnquiryEmail').val()=='' || $('#txtPackageEnquiryEmail').val()=='Email Address*') { xflag=0; if(errmsg=='') { errmsg='Please enter email id.'; focusfield='txtPackageEnquiryEmail'; } else { errmsg+='\nPlease enter email id.'; } } else if(!isEmail($('#txtPackageEnquiryEmail').val())) { xflag=0; if(errmsg=='') { errmsg='Please enter valid email id.'; focusfield='txtPackageEnquiryEmail'; } else { errmsg+='\nPlease enter valid email id.'; } } if($('#txtPackageEnquiryPhone').val()=='' || $('#txtPackageEnquiryPhone').val()=='Telephone Number*') { xflag=0; if(errmsg=='') { errmsg='Please enter contact no.'; focusfield='txtPackageEnquiryPhone'; } else { errmsg+='\nPlease enter contact no.'; } } /*if($('#txtContactFormComments').val()=='') { xflag=0; if(errmsg=='') { errmsg='Please enter your query.'; focusfield='txtContactFormComments'; } else { errmsg+='\nPlease enter your query.'; } }*/ //, txtContactFormComments:$('#txtContactFormComments').val() if(xflag==1) { $('#btnPackageEnquirySubmit').html('Wait...'); $('#btnPackageEnquirySubmit').attr('disabled',true); $.post('server-activity.php?act=c10f37a8b66acfb78902592f8703df38',{txtPackageEnquiryName:$('#txtPackageEnquiryName').val(), txtPackageEnquiryEmail:$('#txtPackageEnquiryEmail').val(), txtPackageEnquiryPhone:$('#txtPackageEnquiryPhone').val(), hfPackageEnquiryId:$('#hfPackageEnquiryId').val(),hfPackageEnquiryType:$('#hfPackageEnquiryType').val()},function(responsedata){ $('#btnPackageEnquirySubmit1').hide(); $('#btnPackageEnquirySubmit').show(); if(responsedata!='') { var responsevalues=(responsedata).split('~ResponseData~'); if(responsevalues[0]==0 || responsevalues[0]=='') { alert(responsevalues[1]); if($('#myModalClose')) $('#myModalClose').click(); $('#txtPackageEnquiryName').val(document.getElementById('txtPackageEnquiryName').defaultValue); $('#txtPackageEnquiryEmail').val(document.getElementById('txtPackageEnquiryEmail').defaultValue); $('#txtPackageEnquiryPhone').val(document.getElementById('txtPackageEnquiryPhone').defaultValue); /*$('#txtContactFormComments').val(document.getElementById('txtContactFormComments').defaultValue);*/ $('#btnPackageEnquirySubmit').html('Submit'); $('#btnPackageEnquirySubmit').attr('disabled',false); } else { alert(responsevalues[1]); $('#'+responsevalues[2]).focus(); $('#btnPackageEnquirySubmit').html('Submit'); $('#btnPackageEnquirySubmit').attr('disabled',false); } } else { alert('Error in submit your query...'); $('#txtPackageEnquiryEmail').focus(); $('#btnPackageEnquirySubmit').html('Submit'); $('#btnPackageEnquirySubmit').attr('disabled',false); } }); } else { alert(errmsg); $('#'+focusfield).focus(); } } function SubscribeMe() { var xflag=1; var errmsg=''; var focusfield=''; if($('#txtSubscribeEmail').val()=='' || $('#txtSubscribeEmail').val()=='Enter Email address to Subscribe') { xflag=0; if(errmsg=='') { errmsg='Please enter email id.'; focusfield='txtSubscribeEmail'; } else { errmsg+='\nPlease enter email id.'; } } else if(!isEmail($('#txtSubscribeEmail').val())) { xflag=0; if(errmsg=='') { errmsg='Please enter valid email id.'; focusfield='txtSubscribeEmail'; } else { errmsg+='\nPlease enter valid email id.'; } } if(xflag==1) { document.getElementById('btnSubscribe').disabled=true; //$('#btnSubscribe').val('Wait...'); $.post('server-activity.php?act=7a0af29f9add9f00a97207b3e4c2eb00',{txtSubscribeEmail:$('#txtSubscribeEmail').val()},function(responsedata){ document.getElementById('btnSubscribe').disabled=false; //$('#btnSubscribe').val('Subscribe'); if(responsedata!='') { var responsevalues=(responsedata).split('~ResponseData~'); if(responsevalues[0]==0 || responsevalues[0]=='') { $('#txtSubscribeEmail').val(''); alert(responsevalues[1]); $('#'+responsevalues[2]).focus(); return false; } else { alert(responsevalues[1]); $('#'+responsevalues[2]).focus(); return false; } } else { alert('Error in submission of your email id...'); $('#txtSubscribeEmail').focus(); return false; } //$( this ).dialog( "close" ); }); return false; } else { alert(errmsg); $('#'+focusfield).focus(); return false; } return false; } function SubmitPackageQuickEnquiryForm() { var xflag=1; var errmsg=''; var focusfield=''; if($('#txtPackageQuickEnquiryName').val()=='' || $('#txtPackageQuickEnquiryName').val()=='Name*') { xflag=0; if(errmsg=='') { errmsg='Please enter name.'; focusfield='txtPackageQuickEnquiryName'; } else { errmsg+='\nPlease enter name.'; } } if($('#txtPackageQuickEnquiryEmail').val()=='' || $('#txtPackageQuickEnquiryEmail').val()=='Email Address*') { xflag=0; if(errmsg=='') { errmsg='Please enter email id.'; focusfield='txtPackageQuickEnquiryEmail'; } else { errmsg+='\nPlease enter email id.'; } } else if(!isEmail($('#txtPackageQuickEnquiryEmail').val())) { xflag=0; if(errmsg=='') { errmsg='Please enter valid email id.'; focusfield='txtPackageQuickEnquiryEmail'; } else { errmsg+='\nPlease enter valid email id.'; } } if($('#txtPackageQuickEnquiryPhone').val()=='' || $('#txtPackageQuickEnquiryPhone').val()=='Telephone Number*') { xflag=0; if(errmsg=='') { errmsg='Please enter contact no.'; focusfield='txtPackageQuickEnquiryPhone'; } else { errmsg+='\nPlease enter contact no.'; } } /*if($('#txtContactFormComments').val()=='') { xflag=0; if(errmsg=='') { errmsg='Please enter your query.'; focusfield='txtContactFormComments'; } else { errmsg+='\nPlease enter your query.'; } }*/ //, txtContactFormComments:$('#txtContactFormComments').val() if(xflag==1) { $('#btnPackageQuickEnquirySubmit').html('Wait...'); $('#btnPackageQuickEnquirySubmit').attr('disabled',true); $.post('server-activity.php?act=c10f37a8b66acfb78902592f8703df38',{txtPackageEnquiryName:$('#txtPackageQuickEnquiryName').val(), txtPackageEnquiryEmail:$('#txtPackageQuickEnquiryEmail').val(), txtPackageEnquiryPhone:$('#txtPackageQuickEnquiryPhone').val(), hfPackageEnquiryId:$('#hfPackageQuickEnquiryId').val(),hfPackageEnquiryType:$('#hfPackageQuickEnquiryType').val(), txtPackageEnquiryPax:$('#txtPackageQuickEnquiryPax').val(), txtPackageEnquiryDestination:$('#txtPackageQuickEnquiryDestination').val(), txtPackageEnquiryDate:$('#txtPackageQuickEnquiryDate').val(), txtPackageEnquiryNights:$('#txtPackageQuickEnquiryNights').val()},function(responsedata){ $('#btnPackageQuickEnquirySubmit1').hide(); $('#btnPackageQuickEnquirySubmit').show(); if(responsedata!='') { var responsevalues=(responsedata).split('~ResponseData~'); if(responsevalues[0]==0 || responsevalues[0]=='') { alert(responsevalues[1]); if($('#myModalClose')) $('#myModalClose').click(); $('#txtPackageQuickEnquiryName').val(document.getElementById('txtPackageQuickEnquiryName').defaultValue); $('#txtPackageQuickEnquiryEmail').val(document.getElementById('txtPackageQuickEnquiryEmail').defaultValue); $('#txtPackageQuickEnquiryPhone').val(document.getElementById('txtPackageQuickEnquiryPhone').defaultValue); $('#txtPackageQuickEnquiryPax').val(document.getElementById('txtPackageQuickEnquiryPax').defaultValue); $('#txtPackageEnquiryDestination').val(document.getElementById('txtPackageEnquiryDestination').defaultValue); $('#txtPackageQuickEnquiryDate').val(document.getElementById('txtPackageQuickEnquiryDate').defaultValue); $('#txtPackageQuickEnquiryNights').val(document.getElementById('txtPackageQuickEnquiryNights').defaultValue); /*$('#txtContactFormComments').val(document.getElementById('txtContactFormComments').defaultValue);*/ $('#btnPackageQuickEnquirySubmit').html('Submit'); $('#btnPackageQuickEnquirySubmit').attr('disabled',false); } else { alert(responsevalues[1]); $('#'+responsevalues[2]).focus(); $('#btnPackageQuickEnquirySubmit').html('Submit'); $('#btnPackageQuickEnquirySubmit').attr('disabled',false); } } else { alert('Error in submit your query...'); $('#txtPackageQuickEnquiryEmail').focus(); $('#btnPackageQuickEnquirySubmit').html('Submit'); $('#btnPackageQuickEnquirySubmit').attr('disabled',false); } }); } else { alert(errmsg); $('#'+focusfield).focus(); } }