function checkSize(){ if($('#s_size').val() == "Choose your size"){ $('.select').show(); return false; } } function contact(in1, in2, in3){ if(in1 == "" || in2 == "" || in3 == ""){ alert("* required"); return; } showLoading(); $.post("include/contact.php", { e: in1, s: in2, q: in3 }, function(data){ $("#content").slideUp({ complete:function(){ $("#content").load("include/sections.php #contact_thanks", hideLoading); } }); }); function showLoading(){ $("#loading_loader").css({visibility:"visible"}).css({opacity:"1"}).css({display:"block"}); } function hideLoading(){ $("#loading_loader").fadeTo(1000, 0); $("#content").slideDown(); }; } function open_window(link,w,h) //opens new window { var win = "width="+w+",height="+h+",menubar=no,location=no,resizable=yes,scrollbars=yes"; wishWin = window.open(link,'wishWin',win); } function confirmDelete() //unsubscription confirmation { temp = window.confirm('Delete?'); if (temp) //delete { window.location="index.php?killuser=yes"; } } function checkdisabled(el) { if (el.options[el.selectedIndex].disabled) { alert ("This option is not available!"); el.options.value = 'Choose your size'; } } function hidedisabledoptions(el) { if (document.all && !window.opera) { for (var i = 0; i < el.options.length; i++) { if (el.options[i].disabled) el.options[i].style.color = '#a7a6aa'; } } } function validate_login() //validate customer information { if (document.login_form.email.value=="") { alert("Please input your email"); return false; } if (document.login_form.password.value=="") { alert("Please input your password"); return false; } return true; } function validate_send() //validate customer information { if (document.send.email.value=="") { alert("Please input your email"); return false; } return true; } function validate_custinfo() //validate customer information { if (document.custinfo_form.fname.value=="" || document.custinfo_form.lname.value=="") { alert("Please input your name"); return false; } if (document.custinfo_form.email.value=="") { alert("Please input your email"); return false; } if (document.custinfo_form.password.value=="") { alert("Please input your password"); return false; } if (document.custinfo_form.password.value != document.custinfo_form.confirm_password.value) { alert("Please confirm your password"); return false; } if (document.custinfo_form.phone.value=="") { alert("Please input your phone number"); return false; } if (document.custinfo_form.address.value=="") { alert("Please input your address"); return false; } if (document.custinfo_form.city.value=="") { alert("Please input your city"); return false; } if (document.custinfo_form.state.value=="") { alert("Please input your state"); return false; } if (document.custinfo_form.zip.value=="") { alert("Please input your postcode"); return false; } return true; } function CookieHandler() { this.setCookie = function (name, value, seconds) { if (typeof(seconds) != 'undefined') { var date = new Date(); date.setTime(date.getTime() + (seconds*1000)); var expires = "; expires=" + date.toGMTString(); } else { var expires = ""; } document.cookie = name+"="+value+expires+"; path=/"; } this.getCookie = function (name) { name = name + "="; var carray = document.cookie.split(';'); for(var i=0;i < carray.length;i++) { var c = carray[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(name) == 0) return c.substring(name.length,c.length); } return null; } this.deleteCookie = function (name) { this.setCookie(name, "", -1); } }