// JavaScript Document var message="Right Button Disabled!"; /////////////////////////////////// function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } function changeImage(val){ if(handle!=0) clearTimeout(handle); if (!document.images) return document.images.bigImg.style.filter = "blendTrans(duration=crossfadeDuration)"; if(document.images.bigImg.filters) document.images.bigImg.filters.blendTrans.Apply(); document.images.bigImg.src=eval("image"+val+".src"); if(document.images.bigImg.filters) document.images.bigImg.filters.blendTrans.Play(); count=val; handle=setTimeout(moveImage,5000); } function moveImage(val){ if(val!=1 || val!=-1) val=1; count+=val; if(count<1) count=9; else if(count>9) count=1; changeImage(count); } function hideMe(){ divDetails.innerHTML=""; divDetails.style.visibility="hidden"; } function getTots(obj,price) { var Cqty; Cqty=obj.value; Nqty=obj.name; preval = eval("document.form1.pre"+Nqty); if(preval.value== obj.value)return; if(preval.value>0){ getval=preval.value*price; document.form1.gtot.value=Number(document.form1.gtot.value) - Number(getval); preval.value=0; } if(isNaN(obj.value)) { obj.value= 0; } if(obj.value<1) { obj.value=0; } if(obj.value>0){ preval.value=obj.value; tot = obj.value*price; gtotalval = Number(document.form1.gtot.value)+Number(tot); document.form1.gtot.value=gtotalval.toFixed(2); gtotal.innerHTML="$" + document.form1.gtot.value; }else{ gtotalval=parseFloat(document.form1.gtot.value); gtotal.innerHTML="$" + gtotalval.toFixed(2); obj.value=''; } } function chkForm(obj){ if(obj.gtot.value==0){ alert("Please order your items") //obj.qty1_1.focus(); return false; } obj.submit(); return true; } function chkout_file(slno){ if(slno==1){ document.getElementById("check1").style.display=""; document.getElementById("print1").style.display="none"; }else{ document.getElementById("check1").style.display="none"; document.getElementById("print1").style.display=""; } //location.href="#checkout"; } var shipping_firstname=""; var shipping_lastname=""; var address1 = ""; var address2 = ""; var city = ""; var state = ""; var shipping_country = ""; var shipping_zip = ""; function InitSaveVariables(form) { shipping_firstname=form.shipping_firstname.value; shipping_lastname=form.shipping_lastname.value; address1=form.shipping_address1.value; city=form.shipping_city.value; state=form.shipping_state.value; shipping_country=form.shipping_country.value; shipping_zip=form.shipping_zip.value; } function ShipToBillPerson(form) { if (form.copy.checked) { InitSaveVariables(form); form.shipping_firstname.value = form.firstname.value; form.shipping_lastname.value = form.lastname.value; form.shipping_address1.value = form.address1.value; form.shipping_city.value = form.city.value; form.shipping_state.value = form.state.value; form.shipping_country.value = form.country.value; form.shipping_zip.value = form.zip.value; } else { form.shipping_firstname.value = shipping_firstname; form.shipping_lastname.value = shipping_lastname; form.shipping_address1.value = address1; form.shipping_city.value = city; form.shipping_state.value = state; form.shipping_country.value = shipping_country; form.shipping_zip.value = shipping_zip; } } function check(obj){ if(obj.firstname.value==""){ alert("Please enter your first name."); obj.firstname.focus(); return false; } if(obj.lastname.value==""){ alert("Please enter your last name."); obj.lastname.focus(); return false; } if(obj.address1.value==""){ alert("Please enter your address."); obj.address1.focus(); return false; } if(obj.city.value==""){ alert("Please enter your city."); obj.city.focus(); return false; } if(obj.state.value==""){ alert("Please enter your state/province."); obj.state.focus(); return false; } if(obj.country.value==""){ alert("Please enter your country."); obj.country.focus(); return false; } if(obj.zip.value==""){ alert("Please enter your zip/postal code."); obj.zip.focus(); return false; } if (obj.copy.checked==false) { if(obj.shipping_firstname.value==""){ alert("Please enter your first name."); obj.shipping_firstname.focus(); return false; } if(obj.shipping_lastname.value==""){ alert("Please enter your last name."); obj.shipping_lastname.focus(); return false; } if(obj.shipping_address1.value==""){ alert("Please enter your shipping address."); obj.shipping_address1.focus(); return false; } if(obj.shipping_city.value==""){ alert("Please enter your city."); obj.shipping_city.focus(); return false; } if(obj.shipping_state.value==""){ alert("Please enter your state/province."); obj.shipping_state.focus(); return false; } if(obj.shipping_country.value==""){ alert("Please enter your country."); obj.shipping_country.focus(); return false; } if(obj.shipping_zip.value==""){ alert("Please enter your zip/postal code."); obj.shipping_zip.focus(); return false; } } if(obj.phone.value==""){ alert("Please enter your phone number."); obj.phone.focus(); return false; } if(obj.email.value==""){ alert("Please enter your email."); obj.email.focus(); return false; } if(obj.email.value!=""){ if(IsEmailValid(obj.email)==false) { alert('Please enter a valid e-mail address!'); obj.email.focus(); return false; } } } function IsEmailValid(ElemName) { var EmailOk = true var Temp = ElemName; var AtSym = Temp.value.indexOf('@') var Period = Temp.value.lastIndexOf('.') var Space = Temp.value.indexOf(' ') var Length = Temp.value.length - 1 // Array is from 0 to length-1 if ((AtSym < 1) || // '@' cannot be in first position (Period <= AtSym+1) || // Must be atleast one valid char btwn '@' and '.' (Period == Length ) || // Must be atleast one valid char after '.' (Space != -1)) // No empty spaces permitted { EmailOk = false //alert('Please enter a valid e-mail address!') //Temp.focus() return false } //return EmailOk } function getgtot(){ if(document.form1.gtot.value>0){ str=parseFloat(document.form1.gtot.value); gtotal.innerHTML="$" + str.toFixed(2); }else{ gtotal.innerHTML="$0.00"; } initDiv(); }