function checkcheckoutform() {var error=false;str="";if(document.getElementById('showlogin').value==0 && document.checkout.returning_email.value.length!=0) {if(document.checkout.returning_email.value.length==0) {str=str+"Please Enter Emailid \n";error=true;} var eres=echeck(document.checkout.returning_email.value);if(eres!=true){str=str+eres+"\n";error=true;} if(document.checkout.returning_password.value.length==0) {str=str+"Please Enter Password \n";error=true;}} if(document.getElementById('showlogin').value==1) {if(document.checkout.sender_email.value.length==0) {str=str+"Please Enter Sender Email \n";error=true;} var eres=echeck(document.checkout.sender_email.value);if(eres!=true){str=str+eres+"\n";error=true;} if(document.checkout.sender_password.value.length==0) {str=str+"Please Enter Sender Password \n";error=true;} if(document.checkout.sender_password1.value.length==0) {str=str+"Please Enter Confirm Password \n";error=true;} if(document.checkout.sender_password1.value!=document.checkout.sender_password.value) {str=str+"Password doesn't Match \n";error=true;}} if(document.getElementById('showlogin').value==1||document.getElementById('showlogin').value==2) {if(document.checkout.sender_name.value.length==0) {str=str+"Please Enter Sender Name \n";error=true;} if(!CheckPhoneNumber(document.checkout.sender_phone.value)) {str=str+"Please Enter Sender Phone \n";error=true;}} if(document.getElementById('loginstatus').value==0) {if(document.checkout.recipientname.value.length==0) {str=str+"Recipient Name must Contain any Value \n";error=true;} if(document.checkout.recipientaddress.value.length==0) {str=str+"Recipient Address must Contain any Value \n";error=true;} if(document.checkout.recipientcity.value.length==0) {str=str+"Recipient City must Contain any Value \n";error=true;} if(!CheckPhoneNumber(document.checkout.recipientphone.value)) {str=str+"Recipient Phone must Contain any Value \n";error=true;} if(document.checkout.recipientgreeting.value=="-1") {str=str+"Please select greeting type \n";error=true;}} document.getElementById('loginstatus').value=0;if(error==true) {alert(str);return false;} else {return true;}} function check_form(frm) {var error=false;var str="";if(frm.firstname.value.length==0) {str=str+"Please Enter your Firstname \n";error=true;} if(frm.lastname.value.length==0) {str=str+"Please Enter your Lastname \n";error=true;} if(frm.dob.value.length==0) {str=str+"Please Enter your DOB \n";error=true;} if(frm.email_address.value.length==0) {str=str+"Please Enter your email \n";error=false;} var eres=echeck(frm.email_address.value);if(eres!=true){str=str+eres+"\n";error=true;} if(frm.street_address.value.length==0) {str=str+"Please Enter your Street Address \n";error=true;} if(!CheckZipCode(frm.postcode.value)) {str=str+"Please Enter Correct zip code \n";error=true;} if(frm.city.value.length==0) {str=str+"Please Enter Your City \n";error=true;} if(frm.state.value.length==0) {str=str+"Please Enter Your State \n";error=true;} if(frm.country.value.length==0) {str=str+"Please Enter Your Country \n";error=true;} if(!CheckPhoneNumber(frm.telephone.value)) {str=str+"Please Enter Correct Phone Number \n";error=true;} if(frm.password.value.length==0) {str=str+"Please Enter your Password \n";error=true;} if(frm.confirmation.value.length==0) {str=str+"Please Enter your Conform Password \n";error=true;} if(frm.password.value!=frm.confirmation.value) {str=str+"Password doesn't Match \n";error=true;} if(frm.visual_verify_code.value=='') {str=str+"Please Enter Security Code \n";error=true;} if(error==true) {alert(str);return false;} else {return true;}} function orderform(frm) {var error=false;var str="";if(frm.ono.value=="") {str=str+"Please Enter Track Order \n";error=true;} if(isNaN(frm.ono.value)) {str=str+"Please Enter Integer \n";frm.ono.value="";error=true;} if(error==true) {alert(str);return false;} else {window.open('track-order/'+frm.ono.value+'/','_self');return false;}} function check_Editform(frm) {var error=false;var str="";if(frm.firstname.value.length==0) {str=str+"Please Enter Your Firstname \n";error=true;} if(frm.lastname.value.length==0) {str=str+"Please Enter Your Lastname \n";error=true;} if(frm.dob.value.length==0) {str=str+"Please Enter Your DOB \n";error=true;} if(frm.email_address.value.length==0) {str=str+"Please Enter Your Email \n";error=true;} var eres=echeck(frm.email_address.value);if(eres!=true){str=str+eres+"\n";error=true;} if(!CheckPhoneNumber(frm.telephone.value)) {str=str+"Please Enter Correct Phone Number \n";error=true;} if(error==true) {alert(str);return false;} else {return true;}} function check_Changeform(frm) {var error=false;var str="";if(frm.password_current.value.length==0) {str=str+"Please Enter Current Password \n";error=true;} if(frm.password_new.value.length==0) {str=str+"Please Enter New Password \n";error=true;} if(frm.password_confirmation.value.length==0) {str=str+"Please Enter Conform Password \n";error=true;} if(frm.password_confirmation.value!=frm.password_new.value) {str=str+"Password Doesn't Match \n";error=true;} if(error==true) {alert(str);return false;} else {return true;}} function emailvalidation(frm) {var error=false;var str="";if(frm.email_address.value.length==0) {str=str+"Please Enter Your Email \n";error=true;} var eres=echeck(frm.email_address.value);if(eres!=true){str=str+eres+"\n";error=true;} if(error==true) {alert(str);return false;} else {return true;}} function bookmark(title,url){netscape="Netscape User's hit CTRL+D to add a bookmark to this site." if(window.sidebar){window.sidebar.addPanel(title,url,"");} else if(window.external){window.external.AddFavorite(url,title);} else if(window.opera&&window.print){return true;} else if(navigator.appName=='Netscape') {alert(netscape);}} 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"Invalid E-mail ID";} if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr){return"Invalid E-mail ID";} if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr){return"Invalid E-mail ID";} if(str.indexOf(at,(lat+1))!=-1){return"Invalid E-mail ID";} if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot){return"Invalid E-mail ID";} if(str.indexOf(dot,(lat+2))==-1){return"Invalid E-mail ID";} if(str.indexOf(" ")!=-1){return"Invalid E-mail ID";} return true} function CheckPhoneNumber(TheNumber){var valid=1 var GoodChars="0123456789()-+ " var i=0 if(TheNumber==""){valid=0} for(i=0;i<=TheNumber.length-1;i++){if(GoodChars.indexOf(TheNumber.charAt(i))==-1){valid=0}} return valid} function CheckZipCode(TheNumber){var valid=1 var GoodChars="0123456789" var i=0 if(TheNumber==""){valid=0} for(i=0;i<=TheNumber.length-1;i++){if(GoodChars.indexOf(TheNumber.charAt(i))==-1){valid=0}} return valid}