function validateOrderSubmit(form) { var fixThis = ""; if (form.printing_agreement_checkbox.checked == false) { fixThis += "PLEASE READ OVER THE PRINTING & PRICING AGREEMENT,\nTHEN CHECK THE CHECKBOX!"; } //if (fixThis != "") { alert(fixThis); return false; } else { return true; } } if (document.getElementById) { document.writeln('') document.writeln('') } function countChoices(obj) { max = 3; // max. number allowed at a time box1 = obj.form.genre1.checked; // your checkboxes here box2 = obj.form.genre2.checked; box3 = obj.form.genre3.checked; box4 = obj.form.genre4.checked; box5 = obj.form.genre5.checked; box6 = obj.form.genre6.checked; box7 = obj.form.genre7.checked; box8 = obj.form.genre8.checked; box9 = obj.form.genre9.checked; box10 = obj.form.genre10.checked; box11 = obj.form.genre11.checked; count = (box1 ? 1 : 0) + (box2 ? 1 : 0) + (box3 ? 1 : 0) + (box4 ? 1 : 0) + (box5 ? 1 : 0) + (box6 ? 1 : 0) + (box7 ? 1 : 0) + (box8 ? 1 : 0) + (box9 ? 1 : 0) + (box10 ? 1 : 0) + (box11 ? 1 : 0); if (count > max) { alert("Oops! You can only choose up to " + max + " Genres! \nUncheck an Genre if you wish to pick another."); obj.checked = false; } } function openClose(theID) { if (document.getElementById(theID).style.display == "block") { document.getElementById(theID).style.display = "none" } else { document.getElementById(theID).style.display = "block" } } function closeOpen(theID) { if (document.getElementById(theID).style.display == "none") { document.getElementById(theID).style.display = "block" } else { document.getElementById(theID).style.display = "none" } } function countdown_clock(year, month, day, hour, minute, format) { //I chose a div as the container for the timer, but //it can be an input tag inside a form, or anything //who's displayed content can be changed through //client-side scripting. html_code = '
'; document.write(html_code); countdown(year, month, day, hour, minute, format); } function countdown(year, month, day, hour, minute, format) { Today = new Date(); Todays_Year = Today.getFullYear() - 2000; Todays_Month = Today.getMonth() + 1; //Convert both today's date and the target date into miliseconds. Todays_Date = (new Date(Todays_Year, Todays_Month, Today.getDate(), Today.getHours(), Today.getMinutes(), Today.getSeconds())).getTime(); Target_Date = (new Date(year, month, day, hour, minute, 00)).getTime(); //Find their difference, and convert that into seconds. Time_Left = Math.round((Target_Date - Todays_Date) / 1000); if(Time_Left < 0) Time_Left = 0; switch(format) { case 0: //The simplest way to display the time left. document.all.countdown.innerHTML = Time_Left + ' seconds'; break; case 1: //More datailed. days = Math.floor(Time_Left / (60 * 60 * 24)); Time_Left %= (60 * 60 * 24); hours = Math.floor(Time_Left / (60 * 60)); Time_Left %= (60 * 60); minutes = Math.floor(Time_Left / 60); Time_Left %= 60; seconds = Time_Left; dps = 's'; hps = 's'; mps = 's'; sps = 's'; //ps is short for plural suffix. if(days == 1) dps =''; if(hours == 1) hps =''; if(minutes == 1) mps =''; if(seconds == 1) sps =''; document.all.countdown.innerHTML = days + ' day' + dps + ' '; document.all.countdown.innerHTML += hours + ' hour' + hps + ' '; document.all.countdown.innerHTML += minutes + ' minute' + mps + ' and '; document.all.countdown.innerHTML += seconds + ' second' + sps; break; default: document.all.countdown.innerHTML = Time_Left + ' seconds'; } //Recursive call, keeps the clock ticking. setTimeout('countdown(' + year + ',' + month + ',' + day + ',' + hour + ',' + minute + ',' + format + ');', 1000); } function clearText(thefield) { if (thefield.defaultValue==thefield.value) thefield.value = "" } function validateEmail(email) { if(!email.match(/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/)) {alert("Error: this is NOT a valid Email Address.")} } function validatePNumber(phonenumber) { if(!phonenumber.match(/^[ ]*[(]{0,1}[ ]*[0-9]{3,3}[ ]*[)]{0,1}[-]{0,1}[ ]*[0-9]{3,3}[ ]*[-]{0,1}[ ]*[0-9]{4,4}[ ]*$/)) {alert("Error: this is NOT a valid Phone Number.")} } function validateForm(form) { var fixThis = ""; if (form.fullname.value.length == 0) { fixThis += "FULL NAME MISSING! Please enter in your Full Name.\n" } if (form.nickname.value.length == 0) { fixThis += "USERNAME MISSING! Please enter in your Usnername.\n" } if (form.address_line1.value.length == 0) { fixThis += "ADDRESS MISSING! Please fill in your Address.\n"; } if (form.city.value.length == 0) { fixThis += "CITY MISSING! Please fill in your City.\n"; } if (form.state.value.length == 0) { fixThis += "STATE MISSING! Please fill in your State.\n"; } if (form.zipcode.value.length == 0) { fixThis += "ZIP CODE MISSING! Please fill in your Zip Code.\n"; } if (form.country.value.length == 0) { fixThis += "COUNTRY MISSING! Please fill in your Country.\n"; } if (form.phone.value.length == 0) { fixThis += "PHONE NUMBER MISSING! Please fill in your Phone Number.\n"; } if (form.useremail.value.length == 0) { fixThis += "EMAIL MISSING! Please enter in your Email Address.\n" } if (form.publisher.value.length == 0) { fixThis += "PUBLISHING NAMR MISSING! Please fill in your Publishing Name.\n"; } if (form.userpassword.value.length == 0) { fixThis += "PASSWORD MISSING! Please enter in your Password.\n" } else if (form.userpassword.value.length < 5) { fixThis += "PASSWORD TO SHORT! Five or more chararacters/number.\n" } if (form.userpassword2.value.length == 0) { fixThis += "RE-TYPE PASSWORD MISSING! Please enter in your RE-TYPR Password.\n" } else if (form.userpassword2.value.length < 5) { fixThis += "RE-TYPE PASSWORD TO SHORT! Five or more chararacters/number.\n" } if (form.userpassword.value != form.userpassword2.value) { fixThis += "PASSWORDS DON'T MATCH! Please RE-enter Passwords.\n" } if (fixThis != "") { alert(fixThis); return false; } else { return true; } } function validateForm2(form) { var fixThis = ""; if (form.nickname.value.length == 0) { fixThis += "USERNAME MISSING! Please enter in your Username.\n"; } if (form.userpassword.value.length == 0) { fixThis += "PASSWORD MISSING! Please enter in your Password.\n"; } if (fixThis != "") { alert(fixThis); return false; } else { return true; } } function validateForm3(form) { var fixThis = ""; if (form.fullname.value.length == 0) { fixThis += "FULLNAME MISSING! Please enter in your Fullname.\n" } if (form.address_line1.value.length == 0) { fixThis += "ADDRESS MISSING! Please fill in your address.\n"; } if (form.city.value.length == 0) { fixThis += "CITY MISSING! Please fill in your city.\n"; } if (form.state.value.length == 0) { fixThis += "STATE MISSING! Please fill in your state.\n"; } if (form.zipcode.value.length == 0) { fixThis += "ZIP CODE MISSING! Please fill in your zip.\n"; } if (form.userpassword.value.length == 0) { fixThis += "NEW PASSWORD MISSING! Please enter in your Password.\n" } else if (form.userpassword.value.length < 5) { fixThis += "NEW PASSWORD TO SHORT! Five or more chararacters/number.\n" } if (form.userpassword2.value.length == 0) { fixThis += "NEW RE-TYPE PASSWORD MISSING! Please enter in your Re-Type Password.\n" } else if (form.userpassword2.value.length < 5) { fixThis += "NEW RE-TYPE PASSWORD TO SHORT! Five or more chararacters/number.\n" } if (form.userpassword.value != form.userpassword2.value) { fixThis += "NEW PASSWORDS DON'T MATCH! Please re-enter Passwords.\n" } if (fixThis != "") { alert(fixThis); return false; } else { return true; } } function validateForm4(form) { var fixThis = ""; if (form.fullname.value.length == 0) { fixThis += "FULLNAME MISSING! Please enter in Users Fullname.\n" } if (form.nickname.value.length == 0) { fixThis += "NICKNAME MISSING! Please enter in Users Nickname.\n"; } if (form.useremail.value.length == 0) { fixThis += "EMAIL MISSING! Please enter in Users Email Address.\n" } if (form.userpassword.value.length == 0) { fixThis += "PASSWORD MISSING! Please enter in Users Password.\n" } else if (form.userpassword.value.length < 5) { fixThis += "PASSWORD TO SHORT! Five or more chararacters/number.\n" } if (form.userpassword2.value.length == 0) { fixThis += "RE-TYPE PASSWORD MISSING! Please enter in Users Re-Type Password.\n" } else if (form.userpassword2.value.length < 5) { fixThis += "RE-TYPE PASSWORD TO SHORT! Five or more chararacters/number.\n" } if (form.userpassword.value != form.userpassword2.value) { fixThis += "NEW PASSWORDS DON'T MATCH! Please re-enter Passwords.\n" } if (fixThis != "") { alert(fixThis); return false; } else { return true; } } function validateSubmitForm(form) { var fixThis = ""; if (form.submit_checkbox.checked == false) { fixThis += "PLEASE READ OVER THE SUBMISSION REQUIREMENTS,\n THEN CHECK THE CHECKBOX!\n"; } if (fixThis != "") { alert(fixThis); return false; } else { return true; } } function CheckOrder(form) { var fixThis = ""; if (maths.order_name.value == "name of comic" || maths.order_name.value == "Pre-Lined Comic Boards" || maths.order_name.value == " name of mini-poster" || maths.order_name.value == " name of flyers" || maths.order_name.value == " name of mouse pad") { fixThis += "Please name this order/product. Thanks!\n" } if (fixThis != "") { alert(fixThis); return false; } else { return true; } } function calculate() { with(document.maths) { var kablam_ad_discount, width, dpi; if (kablam_ad.value == 0) { kablam_ad_discount=0; } // Back Cover else if (kablam_ad.value == 1) { kablam_ad_discount=.25; } // Inside Back Cover else if (kablam_ad.value == 2) { kablam_ad_discount=.45; } // Interior Page else if (kablam_ad.value == 3) { kablam_ad_discount=.65; } // No Ad var cost_per_page, binding=0; if (order_type.value == 0) { cost_per_page=.00; } // No Order Type else if (order_type.value == 1) { cost_per_page=.18 + .015; binding=1.25;} // Standard Comic Full Color per 4 pages else if (order_type.value == 2) { cost_per_page=.08 + .015; binding=.80;} // Standard Comic Black & White per 4 pages else if (order_type.value == 3) { cost_per_page=.16 + .015; binding=1.25;} // Manga Comic Full Color per 4 pages else if (order_type.value == 4) { cost_per_page=.06 + .015; binding=.80;} // Manga Comic Black & White per 4 pages else if (order_type.value == 5) { cost_per_page=1.00; } // Mini Posters: Trimmed- NO else if (order_type.value == 6) { cost_per_page=1.00; } // Mini Posters: Trimmed- YES else if (order_type.value == 10) { cost_per_page=25.00; } // Business Cards - Color Front / Blank Back (250 count / 11 sheets of paper) else if (order_type.value == 11) { cost_per_page=35.00; } // Business Cards - Color Front / Color Back (250 count / 11 sheets of paper) else if (order_type.value == 12) { cost_per_page=30.00; } // Business Cards - Color Front / Black & White Back (250 count / 11 sheets of paper) else if (order_type.value == 13) { cost_per_page=7.50; } // Fliers (4 X 5.25) - Color Front / Blank Back (100 count / 13 sheets of paper) else if (order_type.value == 14) { cost_per_page=.00; } // Fliers (4 X 5.25) - Black & White / Blank Back (100 count / 13 sheets of paper) else if (order_type.value == 15) { cost_per_page=10.00; } // Fliers (4 X 5.25) - Color Front and Back (100 count / 13 sheets of paper) else if (order_type.value == 16) { cost_per_page=.00; } // Fliers (4 X 5.25) - Color Front / Black & White Back (100 count / 13 sheets of paper) else if (order_type.value == 17) { cost_per_page=.00; } // Fliers (4 X 5.25) - Black & White- Front and Back (100 count / 13 sheets of paper) else if (order_type.value == 18) { cost_per_page=10.00; } // Fliers (8 X 10.5) - Color Front / Blank Back (100 count / 50 sheets of paper) else if (order_type.value == 19) { cost_per_page=.00; } // Fliers (8 X 10.5) - Black & White / Blank Back (100 count / 50 sheets of paper) else if (order_type.value == 20) { cost_per_page=15.00; } // Fliers (8 X 10.5) - Color Front and Back (100 count / 50 sheets of paper) else if (order_type.value == 21) { cost_per_page=.00; } // Fliers (8 X 10.5) - Color Front / Black & White Back (100 count / 50 sheets of paper) else if (order_type.value == 22) { cost_per_page=.00; } // Fliers (8 X 10.5) - Black & White Front and Back (100 count / 50 sheets of paper) else if (order_type.value == 23) { cost_per_page=.42; } // Post Cards (4 X 5.25) - Color Front / Blank Back (100 count / 13 sheets of paper) else if (order_type.value == 24) { cost_per_page=.14; } // Post Cards (4 X 5.25) - Black & White / Blank Back (100 count / 13 sheets of paper) else if (order_type.value == 25) { cost_per_page=.89; } // Post Cards (4 X 5.25) - Color Front and Back (100 count / 13 sheets of paper) else if (order_type.value == 26) { cost_per_page=.56; } // Post Cards (4 X 5.25) - Color Front / Black & White Back (100 count / 13 sheets of paper) else if (order_type.value == 27) { cost_per_page=.28; } // Post Cards (4 X 5.25) - Black & White- Front and Back (100 count / 13 sheets of paper) else if (order_type.value == 28) { cost_per_page=.06; } // Pre-Lined Art Boards with Custom Logos (11 X 17) - Non Rero Blue else if (order_type.value == 29) { cost_per_page=.75; } // Art Print (8 1/2 X 11) Full Color else if (order_type.value == 30) { cost_per_page=1.00; } // Art Print (11 X 17) Full Color else if (order_type.value == 31) { cost_per_page=cost_per_item.value; } // Art Print (11 X 17) Full Color else if (order_type.value == 36) { cost_per_page=.10 + .015; binding=2.25;} // Full Size: Trades Color insides else if (order_type.value == 37) { cost_per_page=.025 + .015; binding=2.25;} // Full Size: Trades Black & White insides else if (order_type.value == 50) { cost_per_page=.10 + .015; binding=2.25;} // Manga Size: Trades Color insides else if (order_type.value == 51) { cost_per_page=.025 + .015; binding=2.25;} // Manga Size: Trades Black & White insides else if (order_type.value == 38) { cost_per_page=1.50;} // Pre-Lined Art Board 11 X 17 else if (order_type.value == 40) { cost_per_page=1.25;} // Pre-Lined Art Board 8.5 X 11 else if (order_type.value == 60) { cost_per_page=5.00;} // Custome Mouse Pads 7.25 X 9.75 X 1/8 else if (order_type.value == 61) { cost_per_page=5.00;} // Custome Mouse Pads 7.25 X 9.75 X 1/4 var cover_cost ; if (cover_type.value == 0) { cover_cost=.00; } // No Cover Type else if (cover_type.value == 1) { cover_cost=.20 + .015; } // Standard Comic Full Color: Inside and Out else if (cover_type.value == 2) { cover_cost=.16 + .015; } // Standard Comic Color Outsides / Black & White Insides else if (cover_type.value == 3) { cover_cost=.12 + .015; } // Standard Comic Black & White: Inside and Out else if (cover_type.value == 7) { cover_cost=.20 + .015 + .35; } // CARDSTOCK Standard Comic Full Color: Inside and Out else if (cover_type.value == 8) { cover_cost=.16 + .015 + .35; } // CARDSTOCK Standard Comic Color Outsides / Black & White Insides else if (cover_type.value == 4) { cover_cost=.20 + .015; } // Manga Comic Full Color: Inside and Out else if (cover_type.value == 5) { cover_cost=.16 + .015; } // Manga Comic Color Outsides / Black & White Insides else if (cover_type.value == 6) { cover_cost=.12 + .015; } // Manga Comic Black & White: Inside and Out else if (cover_type.value == 9) { cover_cost=.20 + .015 + .35; } // CARDSTOCK Manga Comic Full Color: Inside and Out else if (cover_type.value == 10) { cover_cost=.16 + .015 + .35; } // CARDSTOCK Manga Comic Color Outsides / Black & White Insides else if (cover_type.value == 11) { cover_cost=.25 + .015; } // Trades Full Color- Inside and Out else if (cover_type.value == 12) { cover_cost=.15 + .015; } // Trades Color Outsides / Black & White Insides else if (cover_type.value == 13) { cover_cost=.05 + .015; } // Trades Color Outsides / Blank Insides else if (cover_type.value == 21) { cover_cost=.25 + .015 + .25; } // Trades Full Color- Inside and Out w/ Lamination else if (cover_type.value == 22) { cover_cost=.15 + .015 + .25; } // Trades Color Outsides / Black & White Insides w/ Lamination else if (cover_type.value == 23) { cover_cost=.05 + .015 + .25; } // Trades Color Outsides / Blank Insides w/ Lamination else if (cover_type.value == 14) { cover_cost=0.00; } // Pre-Lined Art Board Smooth else if (cover_type.value == 15) { cover_cost=0.00; } // Pre-Lined Art Board Rough // Proof Code: Set back to 1 if they want a proof if (proof_requested.value >0) { amnt_copies.value=1; } if (order_type.value == 36 || order_type.value == 37 || order_type.value == 50 || order_type.value == 51) { if ((order_type.value == 36 || order_type.value == 37) && page_count.value < 48) { page_count.value=48; } if ((order_type.value == 50 || order_type.value == 51) && page_count.value < 48) { page_count.value=64; } if (page_count.value%2 != 0) { page_count.value++; } var pc = page_count.value; if (page_count.value%4 != 0) { pc++; pc++; } var subtotal_cost = ((((cost_per_page * pc) + cover_cost) + kablam_ad_discount) + binding) * amnt_copies.value; var subtotal_cost_discount = subtotal_cost - (subtotal_cost * ((discount.value * 1) * .01)); var total_cost = subtotal_cost_discount + (setup_fee.value * 1); //Trade Paperback Spine Width Calucator width=Math.round((page_count.value*0.0022222)*100)/100; dpi=Math.round((width*300)*100)/100; spine_width.value = width + " Inches\n" + dpi + " Pixels @ 300 DPI"; } else { var subtotal_cost = ((((cost_per_page * page_count.value) + cover_cost) + kablam_ad_discount) + binding) * amnt_copies.value; var subtotal_cost_discount = subtotal_cost - (subtotal_cost * ((discount.value * 1) * .01)); var total_cost = subtotal_cost_discount + (setup_fee.value * 1); } //Display new total formatted_subtotal.value = to_currency(subtotal_cost,"$"); formatted_subtotal_discount.value = to_currency(subtotal_cost_discount,"$"); formatted_total.value = to_currency(total_cost,"$"); total.value = to_currency(total_cost,""); } } function to_currency(val,currency){ //if(!val) {alert("Please provide a value"); return;} if(isNaN(val)){alert(val+" is an invalid input"); return;} val=""+Math.round(100*val); var is_negative=(val<0)? true:false; if(is_negative){val=val.substring(1,val.length)} while (val.length <= 2) {val="0"+val} var dec_point=val.length-2; var first_part=val.substring(0,dec_point); var second_part=val.substring(dec_point,val.length); var result=first_part+"."+second_part; var sign=is_negative? "-":""; if(!currency){currency=""}; result=sign+currency+result; return result; } function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=670,height=600,left = 187,top = 84');"); } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i