function CheckReOrder(form) { //alert("Page Subs:"+form.amnt_copies.value+"/"+form.page_edit_sub[0].checked+"/"+form.page_edit_sub[1].checked+"/"); //if (form.page_edit_sub[0].checked == false) { alert("sub 0"); } //if (form.page_edit_sub[1].checked == false) { alert("sub 1"); } if (form.page_edit_sub[0].checked == false && form.page_edit_sub[1].checked == false) { alert("If you wish to change or replace pages, this is the ONLY place you may request to do so. We are not responsible for change requests made via email or the message center. The new/sub pages can be uploaded after you submit the order.\n\nChoose YES or NO."); return false; } else { return true; } } 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 = 1; // 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; box12 = obj.form.genre12.checked; box13 = obj.form.genre13.checked; box14 = obj.form.genre14.checked; box15 = obj.form.genre15.checked; box16 = obj.form.genre16.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) + (box12 ? 1 : 0) + (box13 ? 1 : 0) + (box14 ? 1 : 0) + (box15 ? 1 : 0) + (box16 ? 1 : 0); if (count > max) { alert("Oops! You can only choose " + max + " Genre! \nUncheck an Genre if you wish to pick another."); obj.checked = false; } if (count == 0) { alert("Oops! You have to pick at least one Genres!"); // obj.checked = true; } } 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.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.publisher.value.length == 0) { fixThis += "PUBLISHER NAME MISSING! Please fill in your publisher name.\n"; } if (form.country.value == "pick") { fixThis += "COUNTRY MISSING! Please pick your country.\n"; } if (form.phone.value.length == 0) { fixThis += "PHONE NUMBER MISSING! Please fill in your phone number.\n"; } if (form.userpassword.value.length == 0) { } else if (form.userpassword.value.length < 5) { fixThis += "NEW PASSWORD TO SHORT! Five or more chararacters/number.\n"; } if (form.userpassword2.value.length == 0) { } 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 CheckUpload(form) { var fixThis = ""; if (form.file.value.length == 0) { fixThis += "WE NEED A FILE TO UPLOAD\n"; } if (form.description.value.length == 0) { fixThis += "PLEASE PROVIDE AN ACCURATE DESCRIPTION OF THIS UPLOAD\n"; } if (fixThis != "") { alert(fixThis); return false; } else { return true; } } function validateSubmitFormDTGImages(form) { var fixThis = ""; if (form.image_name.value == "name of your image") { fixThis += "Please name your image. Thanks!\n"; } if (fixThis != "") { alert(fixThis); return false; } else { return true; } } function CheckOrder(form) { var fixThis = "", val = -1; //alert("AAAA"); // for( i = 0; i < maths.page_edit_sub.length; i++ ) // { // if( maths.page_edit_sub[i].checked == true ) val = maths.page_edit_sub[i].value; // } //if (maths.page_edit_sub.value == 0) val = 1; //alert("BBBB"); //if (maths.page_edit_sub.value == "0") val = 1; //alert("CCCC"); //if (maths.page_edit_sub.value == "1") val = 1; //alert("DDDD"); //if (maths.page_edit_sub[0].checked == true) val = 1; //alert("EEEE"); //if (maths.page_edit_sub[1].checked == true) val = 1; //alert("maths.order_name.value = "+maths.order_name.value); //if (maths.reorder.value==1 && val==-1) { fixThis += "MUST pick YES or NO to Page Substitutions!\n" } if (maths.order_name.value == "name of comic" || maths.order_name.value == "name of art board" || maths.order_name.value == "name of mini-poster" || maths.order_name.value == "name of flyer" || maths.order_name.value == "name of mouse pad" || maths.order_name.value == "name of t-shirt" || maths.order_name.value == "name of card" || maths.order_name.value == "name of trade" || maths.order_name.value == "name of bookmark") { fixThis += "Please name this order/product. Thanks!\n" } if (fixThis != "") { alert(fixThis); return false; } else { return true; } } function CheckNewIPListing(form) { // alert("AAA"); var fixThis = ""; var comic_page0 = document.new_listing.elements["comic_page[]"]; if (form.title.value == "") { fixThis += "TITLE MISSING! Please enter the Title Name.\n" } if (form.publisher.value == "") { fixThis += "PUBLISHER NAME MISSING! Please enter the Publishers Name.\n" } if (form.ip_include.value == 0 && form.cm_include.value == 0 ) { fixThis += "MUST BE INCLUDED IN: IndyPlanet And/Or ComicsMonkey.\n" } if (form.creators.value == "") { fixThis += "CREATORS INFO MISSING! Please enter in the creator info.\n" } if (form.copyright.value == "") { fixThis += "COPYRIGHT INFO MISSING! Please enter in the copyright info.\n" } if (form.overview.value == "") { fixThis += "SERIES OVERVIEW INFO MISSING! Please enter in the series overview info.\n" } if (form.summary.value == "") { fixThis += "SERIES SUMMARY INFO MISSING! Please enter in the series summary info.\n" } // if (comic_page0[0].value == "") { fixThis += "FILE INFO MISSING! Please include page file info.\n" } if (form.paypal.value == "") { fixThis += "PAYPAL INFO MISSING! Please enter in your paypal info.\n" } if (fixThis != "") { alert(fixThis); return false; } else { return true; } } function CheckCMPriceing1() { with(document.new_listing) { var new_recommend_cost = 0, profit = 0, price_change = 0; if ( (cm_price.value * 1) < (cm_recommend_cost.value * 1) ) { cm_price.value = to_currency(cm_recommend_cost.value,""); price_change = 1; profit = to_currency((cm_recommend_cost.value * 0.10),""); } // if ( (cm_price.value * 1) > (cm_recommend_cost.value * 1) ) if (1 == 2) { new_recommend_cost = Math.round(cm_price.value - 0.01); if ( (cm_price.value * 1) >= (new_recommend_cost * 1) ) { new_recommend_cost = new_recommend_cost + .50; } else { new_recommend_cost = new_recommend_cost - 0.01; } cm_price.value = to_currency(new_recommend_cost,""); price_change = 1; profit = to_currency((new_recommend_cost * 0.10),""); } // if (price_change != 0) { alert("Your price point at ComicsMonkey must be least 150% of your printing cost at Ka-Blam.\n For uniformity's sake -- and to avoid oddball price points -- we round up to the next $0.50 or $0.99 mark. For example, if you selected $3.29 as your price point, we will round that up to $3.50. Of if you selected $3.77 we would round that up to $3.99.\n Price change made.\n New price is $"+cm_price.value+"\nNew Profit is $"+profit); } if (price_change != 0) { alert("Your price point at ComicsMonkey must be least 150% of your printing cost at Ka-Blam.\n Price change made.\n New price is $"+cm_price.value+"\nNew Profit is $"+profit); } } } function CheckCMPriceing() { with(document.copy_over_cm) { var new_recommend_cost = 0, profit = 0, price_change = 0; if ( (price.value * 1) < (cm_recommend_cost.value * 1) ) { price.value = to_currency(cm_recommend_cost.value,""); price_change = 1; profit = to_currency((cm_recommend_cost.value * 0.10),""); } if ( (price.value * 1) > (cm_recommend_cost.value * 1) ) { new_recommend_cost = Math.round(price.value - 0.01); if ( (price.value * 1) >= (new_recommend_cost * 1) ) { new_recommend_cost = new_recommend_cost + .50; } else { new_recommend_cost = new_recommend_cost - 0.01; } price.value = to_currency(new_recommend_cost,""); price_change = 1; profit = to_currency((new_recommend_cost * 0.10),""); } if (price_change != 0) { alert("Your price point at ComicsMonkey must be least 150% of your printing cost at Ka-Blam.\n For uniformity's sake -- and to avoid oddball price points -- we round up to the next $0.50 or $0.99 mark. For example, if you selected $3.29 as your price point, we will round that up to $3.50. Of if you selected $3.77 we would round that up to $3.99.\n Price change made.\n New price is $"+price.value+"\nNew Profit is $"+profit); return false; } else { return true; } } } function CheckIPPriceing1() { with(document.new_listing) { alert("ip_price.value="+ip_price.value+" | printing_cost.value="+printing_cost.value); var new_recommend_cost = 0, price_change = 0; if ( (ip_price.value * 1) < (printing_cost.value * 1) ) { ip_price.value = to_currency(printing_cost.value,""); price_change = 1; } if (price_change != 0) { alert("Your price point at IndyPlanet must be at lease or greater than your printing cost at Ka-Blam.\n Price change made.\n New price is $"+ip_price.value); } } } function CheckIPPriceing() { with(document.copy_over_ip) { var new_recommend_cost = 0, price_change = 0; if ( (price.value * 1) < (printing_cost.value * 1) ) { price.value = to_currency(printing_cost.value,""); price_change = 1; } if (price_change != 0) { alert("Your price point at IndyPlanet must be at lease or greater than your printing cost at Ka-Blam.\n Price change made.\n New price is $"+price.value); return false; } else { return true; } } } function CheckIPCMPriceing() { alert("ONE"); with(document.changes) { var new_recommend_cost = 0, profit = 0, price_change = 0; if ( (products_price.value * 1) < (cm_recommend_cost.value * 1) ) { products_price.value = to_currency(cm_recommend_cost.value,""); price_change = 1; profit = to_currency((cm_recommend_cost.value * 0.10),""); } if ( (price.value * 1) > (cm_recommend_cost.value * 1) ) { new_recommend_cost = Math.round(price.value - 0.01); if ( products_price.value >= new_recommend_cost ) { new_recommend_cost = new_recommend_cost + .50; } else { new_recommend_cost = new_recommend_cost - 0.01; } products_price.value = to_currency(new_recommend_cost,""); price_change = 1; profit = to_currency((new_recommend_cost * 0.10),""); } if (price_change != 0) { alert("Your price point at ComicsMonkey must be least 150% of your printing cost at Ka-Blam.\n For uniformity's sake -- and to avoid oddball price points -- we round up to the next $0.50 or $0.99 mark. For example, if you selected $3.29 as your price point, we will round that up to $3.50. Of if you selected $3.77 we would round that up to $3.99.\n Price change made.\n New price is $"+products_price.value+"\nNew Profit is $"+profit); return false; } else { return true; } price_change = 0; if ( (cm_products_price.value * 1) < (printing_cost.value * 1) ) { cm_products_price.value = to_currency(printing_cost.value,""); price_change = 1; } if (price_change != 0) { alert("Your price point at IndyPlanet must be at least the printing cost at Ka-Blam.\n Price change made.\n New price is $"+cm_products_price.value); return false; } else { return true; } } } function calculate() { with(document.maths) { var kablam_ad_discount, width, dpi, price_increase = 10; 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=.25; } // Interior Page else if (kablam_ad.value == 3) { kablam_ad_discount=.60; } // No Ad if (min_quantity.value == 1 && amnt_copies.value < 1 ) { amnt_copies.value = 1; } if (order_type.value == 3 || order_type.value == 4 || order_type.value == 34 || order_type.value == 35 ) //|| //order_type.value == 50 || order_type.value == 51 || order_type.value == 52 || order_type.value == 53) { if (admin_override.value == 0 && amnt_copies.value % 2) { amnt_copies.value = (amnt_copies.value * 1) + 1; } } //alert('AAA '+page_edit_sub[1].checked); //if (page_edit_sub[1].checked == true ) { amnt_copies.value = 1; } //if (amnt_copies.value < 1) { page_edit_sub.value = 0; } var cost_per_page, binding=0, bulk_discount=0; // Binding fees if (order_type.value == 1 || order_type.value == 80 || order_type.value == 32 || order_type.value == 82 || order_type.value == 3 || order_type.value == 34) { if (page_count.value<12 || glued_override.value==1) { binding=1.25 + (extra_1.value*1); } else { binding=1.25 + (extra_1.value*1); } //alert('binding '+binding); //if ( (cover_spec.value==5 || cover_spec.value==6) && page_count.value>11) { cover_spec.value=1; } } else if (order_type.value == 2 || order_type.value == 81 || order_type.value == 33 || order_type.value == 83 || order_type.value == 4 || order_type.value == 35) { if (page_count.value<12) { binding=0.80 + (extra_1.value*1); } else { binding=0.80 + (extra_1.value*1); } //if ( (cover_spec.value==5 || cover_spec.value==6) && page_count.value>11) { cover_spec.value=1; } } // Order Types if (order_type.value == 0) { cost_per_page=.00; } // No Order Type else if (order_type.value == 1 || order_type.value == 80) // { cost_per_page=.20; } // Standard OR Magazine Comic Full Color per 4 pages { cost_per_page=.20; if ((amnt_copies.value * 1) < 500 ) { bulk_discount=0; } else if ((amnt_copies.value * 1) < 1000 ) { bulk_discount=20; } else { bulk_discount=25; } } else if (order_type.value == 2 || order_type.value == 81) // { cost_per_page=.10; } // Standard OR Magazine Comic Black & White per 4 pages { cost_per_page=.10; if ((amnt_copies.value * 1) < 500 ) { bulk_discount=0; } else if ((amnt_copies.value * 1) < 1000 ) { bulk_discount=20; } else { bulk_discount=25; } } else if (order_type.value == 32 || order_type.value == 82) // { cost_per_page=.435; } // Standard OR Magazine Comic Full Color GLOSSY per 4 pages { cost_per_page=.435; if ((amnt_copies.value * 1) < 500 ) { bulk_discount=0; } else if ((amnt_copies.value * 1) < 1000 ) { bulk_discount=20; } else { bulk_discount=25; } } else if (order_type.value == 33 || order_type.value == 83) // { cost_per_page=.215; } // Standard OR Magazine Comic Black & White GLOSSY per 4 pages { cost_per_page=.215; if ((amnt_copies.value * 1) < 500 ) { bulk_discount=0; } else if ((amnt_copies.value * 1) < 1000 ) { bulk_discount=20; } else { bulk_discount=25; } } else if (order_type.value == 3) // { cost_per_page=.175; } // Manga Comic Full Color per 4 pages { cost_per_page=.175; if ((amnt_copies.value * 1) < 500 ) { bulk_discount=0; } else if ((amnt_copies.value * 1) < 1000 ) { bulk_discount=20; } else { bulk_discount=25; } } else if (order_type.value == 4) // { cost_per_page=.075; } // Manga Comic Black & White per 4 pages { cost_per_page=.075; if ((amnt_copies.value * 1) < 500 ) { bulk_discount=0; } else if ((amnt_copies.value * 1) < 1000 ) { bulk_discount=20; } else { bulk_discount=25; } } else if (order_type.value == 34) // { cost_per_page=.435; } // Manga Comic Full Color GLOSSY per 4 pages { cost_per_page=.435; if ((amnt_copies.value * 1) < 500 ) { bulk_discount=0; } else if ((amnt_copies.value * 1) < 1000 ) { bulk_discount=20; } else { bulk_discount=25; } } else if (order_type.value == 35) // { cost_per_page=.195; } // Manga Comic Black & White GLOSSY per 4 pages { cost_per_page=.195; if ((amnt_copies.value * 1) < 500 ) { bulk_discount=0; } else if ((amnt_copies.value * 1) < 1000 ) { bulk_discount=20; } else { bulk_discount=25; } } else if (order_type.value == 5) { cost_per_page=1.75; if (admin_override.value == 0 && (amnt_copies.value * 1) < 10 ) { amnt_copies.value=10; } } // Mini Posters Cardstock/UV Coated: Trimmed- NO else if (order_type.value == 6) { cost_per_page=1.80; if (admin_override.value == 0 && (amnt_copies.value * 1) < 10 ) { amnt_copies.value=10; } } // Mini Posters Cardstock/UV Coated: Trimmed- YES else if (order_type.value == 7) { cost_per_page=1.50; if (admin_override.value == 0 && (amnt_copies.value * 1) < 10 ) { amnt_copies.value=10; } } // Mini Posters Cardstock: Trimmed- NO else if (order_type.value == 8) { cost_per_page=1.55; if (admin_override.value == 0 && (amnt_copies.value * 1) < 10 ) { amnt_copies.value=10; } } // Mini Posters Cardstock: Trimmed- YES else if (order_type.value == 9) { cost_per_page=1.00; if (admin_override.value == 0 && (amnt_copies.value * 1) < 10 ) { amnt_copies.value=10; } } // Mini Posters Cardstock: Trimmed- YES else if (order_type.value == 65) { cost_per_page=6.75; if (admin_override.value == 0 && (amnt_copies.value * 1) < 10 ) { amnt_copies.value=10; } } // Mini Posters Metallic Silver: Trimmed- NO else if (order_type.value == 66) { cost_per_page=6.80; if (admin_override.value == 0 && (amnt_copies.value * 1) < 10 ) { amnt_copies.value=10; } } // Mini Posters Metallic Silver: Trimmed- YES else if (order_type.value == 67) { cost_per_page=6.75; if (admin_override.value == 0 && (amnt_copies.value * 1) < 10 ) { amnt_copies.value=10; } } // Mini Posters Metallic Burst: Trimmed- NO else if (order_type.value == 68) { cost_per_page=6.80; if (admin_override.value == 0 && (amnt_copies.value * 1) < 10 ) { amnt_copies.value=10; } } // Mini Posters Metallic Burst: 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=75.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=50.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=25.00; } // Fliers (8 X 10.5) - Glossy - 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=40.00; } // Fliers (8 X 10.5) - Glossy - 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 == 30) { cost_per_page=.75; } // Art Print (8 1/2 X 11) Full Color else if (order_type.value == 31) { cost_per_page=1.00; } // Art Print (11 X 17) Full Color else if (order_type.value == 36 || order_type.value == 54) // Standard OR Magazine Size: Trades Color insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.09 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.085 + 0.00125; } else { cost_per_page=.08 + 0.00125; } binding=2.25; } else if (order_type.value == 37 || order_type.value == 55) // Standard OR Magazine Size: Trades Black & White insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.0225 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.02 + 0.00125; } else { cost_per_page=.0175 + 0.00125; } binding=2.25; } else if (order_type.value == 38 || order_type.value == 56) // Standard OR Magazine Size: Trades Color GLOSSY insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.24 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.24 + 0.00125; } else { cost_per_page=.24 + 0.00125; } binding=2.25; } else if (order_type.value == 39 || order_type.value == 57) // Standard OR Magazine Size: Trades Black & White GLOSSY insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.07 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.07 + 0.00125; } else { cost_per_page=.07 + 0.00125; } binding=2.25; } else if (order_type.value == 50) // Manga Size: Trades Color insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.048 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.0455 + 0.00125; } else { cost_per_page=.0435 + 0.00125; } binding=2.25; } else if (order_type.value == 51) // Manga Size: Trades Black & White insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.0112 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.01 + 0.00125; } else { cost_per_page=.009 + 0.00125; } binding=2.25; } else if (order_type.value == 52) // Manga Size: Trades Color GLOSSY insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.16 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.16 + 0.00125; } else { cost_per_page=.16 + 0.00125; } binding=2.25; } else if (order_type.value == 53) // Manga Size: Trades Black & White GLOSSY insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.05 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.05 + 0.00125; } else { cost_per_page=.05 + 0.00125; } binding=2.25; } else if (order_type.value == 120 || order_type.value == 128) // Hardback Full/Magizine Size: Color insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.09 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.085 + 0.00125; } else { cost_per_page=.08 + 0.00125; } binding=2.25; } else if (order_type.value == 121 || order_type.value == 129) // Hardback Full/Magizine Size: Black & White insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.0225 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.02 + 0.00125; } else { cost_per_page=.0175 + 0.00125; } binding=2.25; } else if (order_type.value == 122 || order_type.value == 130) // Hardback Full/Magizine Size: Color GLOSSY insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.24 + 0.00125 } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.24 + 0.00125; } else { cost_per_page=.24 + 0.00125; } binding=2.25; } else if (order_type.value == 123 || order_type.value == 131) // Hardback Full/Magizine Size: Black & White GLOSSY insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.07 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.07 + 0.00125; } else { cost_per_page=.07 + 0.00125; } binding=2.25; } else if (order_type.value == 124) // Hardback Manga Size: Color insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.048 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.0455 + 0.00125; } else { cost_per_page=.0435 + 0.00125; } binding=2.25; } else if (order_type.value == 125) // Hardback Manga Size: Black & White insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.0112 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.01 + 0.00125; } else { cost_per_page=.009 + 0.00125; } binding=2.25; } else if (order_type.value == 126) // Hardback Manga Size: Color GLOSSY insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.16 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.16 + 0.00125; } else { cost_per_page=.16 + 0.00125; } binding=2.25; } else if (order_type.value == 127) // Hardback Manga Size: Black & White GLOSSY insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.05 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.05 + 0.00125; } else { cost_per_page=.05 + 0.00125; } binding=2.25; } else if (order_type.value == 140) // Hardback Binding: Color insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.09 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.085 + 0.00125; } else { cost_per_page=.08 + 0.00125; } binding=8.50; } else if (order_type.value == 141) // Hardback Binding: Black & White insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.0225 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.02 + 0.00125; } else { cost_per_page=.0175 + 0.00125; } binding=8.50; } else if (order_type.value == 142) // Hardback Binding: Color GLOSSY insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.24 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.24 + 0.00125; } else { cost_per_page=.24 + 0.00125; } binding=8.50; } else if (order_type.value == 143) // Hardback Binding: Black & White GLOSSY insides { if ((amnt_copies.value * 1) < 25 ) { cost_per_page=.07 + 0.00125; } else if ((amnt_copies.value * 1) < 100 ) { cost_per_page=.07 + 0.00125; } else { cost_per_page=.07 + 0.00125; } binding=8.50; } else if (order_type.value == 28) { cost_per_page=1.00;} // Pre-Lined Art Board 11 X 17 : Ka-Blam Logo else if (order_type.value == 29) { cost_per_page=0.75;} // Pre-Lined Art Board 8.5 X 11 : Ka-Blam Logo else if (order_type.value == 40) { cost_per_page=2.00;} // Pre-Lined Art Board 11 X 17 : User Logo else if (order_type.value == 41) { cost_per_page=1.50;} // Pre-Lined Art Board 8.5 X 11 : User Logo 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 else if (order_type.value == 70) { cost_per_shirt=10.95; } // Standard T-Shirt: White color / (shirt x 2) + Man Power + Profit else if (order_type.value == 71) { cost_per_shirt=13.95; } // Standard T-Shirt: Black color / (shirt x 2) + Man Power + Profit else if (order_type.value == 160) // Trading / Sketch Cards: Standard { if (amnt_copies.value <= 20) { cost_per_page=0.40; } else if (amnt_copies.value <= 100) { cost_per_page=0.30; } else if (amnt_copies.value <= 300) { cost_per_page=0.25; } else if (amnt_copies.value <= 500) { cost_per_page=0.20; } else { cost_per_page=0.15; } } else if (order_type.value == 161) // Trading / Sketch Cards: Premium { if (amnt_copies.value <= 20) { cost_per_page=0.45; } else if (amnt_copies.value <= 100) { cost_per_page=0.35; } else if (amnt_copies.value <= 300) { cost_per_page=0.30; } else if (amnt_copies.value <= 500) { cost_per_page=0.25; } else { cost_per_page=0.20; } } else if (order_type.value == 164) // Bookmarks { if (amnt_copies.value <= 15) { cost_per_page=0.40; } else if (amnt_copies.value <= 150) { cost_per_page=0.25; } else if (amnt_copies.value <= 300) { cost_per_page=0.20; } else { cost_per_page=0.15; } } else if (order_type.value == 200) { cost_per_page=10.00;} // Banner Ad Sales IndyPlanet else if (order_type.value == 201) { cost_per_page=10.00;} // Banner Ad Sales ComicsMonkey else if (order_type.value == 210) { cost_per_page=25.00;} // Flyer Ad Sales IndyPlanet/ComicsMonkey ALL IN ONE 12-20-09 else if (order_type.value == 211) { cost_per_page=25.00;} // Flyer Ad Sales ComicsMonkey else if (order_type.value == 220) { updateTotal(document.maths); return; } else if (order_type.value == 330) { cost_per_page=0.50;} // Bag & Boards var cover_cost, added_cost = 0; //alert('AAA cover_type.value='+cover_type.value); if (cover_type.value == 0) { cover_cost=.00; } // No Cover Type else if (cover_type.value == 16) { cover_cost=.215; } // Self Cover comic Fill Color: Inside and Out else if (cover_type.value == 1) { cover_cost=.265; } // Standard Comic Full Color: Inside and Out else if (cover_type.value == 2) { cover_cost=.225; } // Standard Comic Color Outsides / Black & White Insides else if (cover_type.value == 3) { cover_cost=.185; } // Standard Comic Black & White: Inside and Out else if (cover_type.value == 7) { cover_cost=.265; added_cost=1.00; } // CARDSTOCK Standard Comic Full Color: Inside and Out else if (cover_type.value == 8) { cover_cost=.225; added_cost=1.00; } // CARDSTOCK Standard Comic Color Outsides / Black & White Insides else if (cover_type.value == 40) { cover_cost=.265; added_cost=1.00; } // Sketch Cover Standard Comic Full Color: Inside and Out else if (cover_type.value == 41) { cover_cost=.225; added_cost=1.00; } // Sketch Cover Standard Comic Color Outsides / Black & White Insides else if (cover_type.value == 44) { cover_cost=.265; added_cost=5.00; } // Metallic Silver - Standard Comic Full Color: Inside and Out else if (cover_type.value == 45) { cover_cost=.265; added_cost=5.00; } // Metallic Prismatic - Standard Comic Full Color: Inside and Out else if (cover_type.value == 46) { cover_cost=.265; added_cost=5.00; } // Holographic XXX - Standard Comic Full Color: Inside and Out else if (cover_type.value == 62) { cover_cost=.265; added_cost=5.00; } // Holographic XXX - Standard Comic Full Color: Inside and Out else if (cover_type.value == 63) { cover_cost=.265; added_cost=5.00; } // Holographic XXX - Standard Comic Full Color: Inside and Out else if (cover_type.value == 4) { cover_cost=.235; } // Manga Comic Full Color: Inside and Out else if (cover_type.value == 5) { cover_cost=.195; } // Manga Comic Color Outsides / Black & White Insides else if (cover_type.value == 6) { cover_cost=.155; } // Manga Comic Black & White: Inside and Out else if (cover_type.value == 9) { cover_cost=.235; added_cost=1.00; } // CARDSTOCK Manga Comic Full Color: Inside and Out else if (cover_type.value == 10) { cover_cost=.195; added_cost=1.00; } // CARDSTOCK Manga Comic Color Outsides / Black & White Insides else if (cover_type.value == 42) { cover_cost=.235; added_cost=1.00; } // Sketch Cover Manga Comic Full Color: Inside and Out else if (cover_type.value == 43) { cover_cost=.195; added_cost=1.00; } // Sketch Cover Manga Comic Color Outsides / Black & White Insides else if (cover_type.value == 47) { cover_cost=.20 + .015 + .02; added_cost=5.00; } // Metallic Silver - Manga Comic Full Color: Inside and Out else if (cover_type.value == 48) { cover_cost=.20 + .015 + .02; added_cost=5.00; } // Metallic Prismatic - Manga Comic Full Color: Inside and Out else if (cover_type.value == 49) { cover_cost=.20 + .015 + .02; added_cost=5.00; } // Holographic XXX - Manga Comic Full Color: Inside and Out else if (cover_type.value == 64) { cover_cost=.20 + .015 + .02; added_cost=5.00; } // Holographic XXX - Manga Comic Full Color: Inside and Out else if (cover_type.value == 65) { cover_cost=.20 + .015 + .02; added_cost=5.00; } // Holographic XXX - Manga Comic Full Color: Inside and Out else if (cover_type.value == 11) { cover_cost=1.00; } // Trades Full Color Satin Finish Cardstosk- Inside and Out / Was .50 else if (cover_type.value == 12) { cover_cost=1.00; } // Trades Color Outsides Satin Finish Cardstosk- Black & White Insides else if (cover_type.value == 13) { cover_cost=1.00; } // Trades Color Outsides Satin Finish Cardstosk- Blank Insides else if (cover_type.value == 21) { cover_cost=1.00; } // Trades Full Color Cardstosk- Inside and Out w/ Lamination else if (cover_type.value == 22) { cover_cost=1.00; } // Trades Color Outsides Cardstosk- Black & White Insides w/ Lamination else if (cover_type.value == 23) { cover_cost=1.00; } // Trades Color Outsides Cardstosk- Blank Insides w/ Lamination else if (cover_type.value == 71) { cover_cost=1.50; } // Trades Full Color Glossy Finish Cardstosk- Inside and Out else if (cover_type.value == 72) { cover_cost=1.50; } // Trades Color Outsides Glossy Finish Cardstosk- Blank Insides else if (cover_type.value == 50) { cover_cost=0; added_cost=8.50; } // Hardcover Full Color- Inside and Out else if (cover_type.value == 51) { cover_cost=0; added_cost=8.50; } // Hardcover Color Outsides / Black & White Insides else if (cover_type.value == 52) { cover_cost=0; added_cost=8.50; } // Hardcover Color Outsides / Blank Insides else if (cover_type.value == 55) { cover_cost=0; added_cost=0; } // Hardcover Pre-Printed Material Full Color- Inside and Out else if (cover_type.value == 56) { cover_cost=0; added_cost=0; } // Hardcover Pre-Printed Material Color Outsides / Black & White Insides else if (cover_type.value == 57) { cover_cost=0; added_cost=0; } // Hardcover Pre-Printed Material Color Outsides / Blank Insides 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 else if (cover_type.value == 30) { cost_pre_images=3.00; } // T-Shirt:- Front Full else if (cover_type.value == 31) { cost_pre_images=2.00; } // T-Shirt:- Front Pocket Left else if (cover_type.value == 32) { cost_pre_images=2.00; } // T-Shirt:- Front Pocket Right else if (cover_type.value == 33) { cost_pre_images=3.00; } // T-Shirt:- Back Full else if (cover_type.value == 34) { cost_pre_images=6.00; } // T-Shirt:- Front Full & Back Full else if (cover_type.value == 35) { cost_pre_images=5.00; } // T-Shirt:- Front Pocket Left & Back Full else if (cover_type.value == 36) { cost_pre_images=5.00; } // T-Shirt:- Front Pocket Right & Back Full else if (cover_type.value == 60) { cover_cost=0.03; } // Sketch Card - Bookmark Rounded Corners: YES else if (cover_type.value == 61) { cover_cost=0.00; } // Sketch Card - Bookmark Rounded Corners: NO if (order_type.value == 101) { cost_per_page=10.00; cover_cost=0.00; } // Ka-Blam Shirts white and black //alert('amnt_copies= '+amnt_copies.value+' order_type= '+order_type.value+' cost_per_page= '+cost_per_page+' cover_type= '+cover_type.value+' cover_cost= '+cover_cost+' added cost='+added_cost+' binding= '+binding); //alert('order_type='+page_count.value+' binding='+binding); // Proof Code: Set back to 1 if they want a proof if (proof_requested.value > 0) { amnt_copies.value=1; } //alert("binding :"+binding+" / added_cost :"+added_cost); // Print math if (order_type.value == 310 || order_type.value == 311 || order_type.value == 315 || order_type.value == 320 || order_type.value == 321 || order_type.value == 322) // Additional Postage / Miscellaneous Item { var per_copy_cost = amount_per.value; per_copy_cost = per_copy_cost + (per_copy_cost * (price_increase / 100)); // 3/23/22 per_copy_cost = formatCurrency(per_copy_cost); var subtotal_cost = per_copy_cost * amnt_copies.value; var subtotal_cost_discount = subtotal_cost; var total_cost = subtotal_cost_discount; } else if (order_type.value == 70 || order_type.value == 71) // T-Shirts { var shirt_size_addition = 2; //( Shirts_XXL_Plus_Price.value * 1 ); // extra cost for XXL + sizes var cost_per_print = cost_per_shirt + cost_pre_images; amount_per.value = cost_per_print; //alert(Shirts_XXL_Plus_Price.value); //alert("order_type="+order_type.value+"\n cost_per_shirt="+cost_per_shirt+"\n cover_type="+cover_type.value+"\n cost_pre_images="+cost_pre_images+"\n shirt_size_addition="+shirt_size_addition+"\n cost_per_print="+cost_per_print+"\n amount_per="+amount_per.value+"\n attribute1="+attribute1.value+"\n attribute2="+attribute2.value+"\n attribute3="+attribute3.value+"\n attribute4="+attribute4.value+"\n attribute5="+attribute5.value+"\n attribute6="+attribute6.value+"\n attribute7="+attribute7.value); var cost_per_1 = cost_per_print * attribute1.value; var cost_per_2 = cost_per_print * attribute2.value; var cost_per_3 = cost_per_print * attribute3.value; var cost_per_4 = cost_per_print * attribute4.value; var cost_per_5 = (cost_per_print + shirt_size_addition) * attribute5.value; var cost_per_6 = (cost_per_print + shirt_size_addition) * attribute6.value; var cost_per_7 = (cost_per_print + shirt_size_addition) * attribute7.value; //alert("cost_per_1="+cost_per_1+"\n cost_per_2="+cost_per_2+"\n cost_per_3="+cost_per_3+"\n cost_per_4="+cost_per_4+"\n cost_per_5="+cost_per_5+"\n cost_per_6="+cost_per_6+"\n cost_per_77="+cost_per_7); if (tshirts.value!=4) // Takes care of IP listing crap values now being there { document.getElementById("attribute1_price").innerHTML=to_currency(cost_per_print,"$"); // Small document.getElementById("attribute1_total").innerHTML=to_currency(cost_per_1,"$"); document.getElementById("attribute2_price").innerHTML=to_currency(cost_per_print,"$"); // Medium document.getElementById("attribute2_total").innerHTML=to_currency(cost_per_2,"$"); document.getElementById("attribute3_price").innerHTML=to_currency(cost_per_print,"$"); // Large document.getElementById("attribute3_total").innerHTML=to_currency(cost_per_3,"$"); document.getElementById("attribute4_price").innerHTML=to_currency(cost_per_print,"$"); // XLarge document.getElementById("attribute4_total").innerHTML=to_currency(cost_per_4,"$"); document.getElementById("attribute5_price").innerHTML=to_currency((cost_per_print + shirt_size_addition),"$"); // 2XLarge document.getElementById("attribute5_total").innerHTML=to_currency(cost_per_5,"$"); document.getElementById("attribute6_price").innerHTML=to_currency((cost_per_print + shirt_size_addition),"$"); // 3XLarge document.getElementById("attribute6_total").innerHTML=to_currency(cost_per_6,"$"); document.getElementById("attribute7_price").innerHTML=to_currency((cost_per_print + shirt_size_addition),"$"); // 4XLarge document.getElementById("attribute7_total").innerHTML=to_currency(cost_per_7,"$"); } var subtotal_cost = cost_per_1 + cost_per_2 + cost_per_3 + cost_per_4 + cost_per_5 + cost_per_6 + cost_per_7; var subtotal_cost_discount = subtotal_cost - (subtotal_cost * ((discount.value * 1) * .01)); var total_cost = subtotal_cost_discount + (setup_fee.value * 1); var per_copy_cost = cost_per_print; } // Trade paperbacks else if (order_type.value == 36 || order_type.value == 37 || order_type.value == 38 || order_type.value == 39 || order_type.value == 50 || order_type.value == 51 || order_type.value == 52 || order_type.value == 53 || order_type.value == 54 || order_type.value == 55 || order_type.value == 56 || order_type.value == 57) { if (reorder.value == 0 && page_count.value < 24) { page_count.value=24; } else if (reorder.value == 0 && page_count.value > 700) { page_count.value=700; } if (page_count.value%2 != 0) { page_count.value++; } var pc = page_count.value; if (page_count.value%4 != 0) { pc++; pc++; } var per_copy_cost = ((((cost_per_page * pc) + cover_cost) + kablam_ad_discount) + binding + added_cost); per_copy_cost = per_copy_cost + (per_copy_cost * (price_increase / 100)); // 3/23/22 per_copy_cost = formatCurrency(per_copy_cost); var subtotal_cost = per_copy_cost * 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 if (order_type.value == 36 || order_type.value == 37 || order_type.value == 50 || order_type.value == 51 || order_type.value == 54 || order_type.value == 55) { width=Math.round((page_count.value*0.00189655)*100)/100; } else { width=Math.round((page_count.value*0.0042222)*100)/100; } width +=0.02; dpi=Math.round((width*300)*100)/100; spine_width.value = width + " Inches\n" + dpi + " Pixels @ 300 DPI"; } // Hardback else if (order_type.value == 120 || order_type.value == 121 || order_type.value == 122 || order_type.value == 123 || order_type.value == 124 || order_type.value == 125 || order_type.value == 126 || order_type.value == 127 || order_type.value == 128 || order_type.value == 129 || order_type.value == 130 || order_type.value == 131) { if (page_count.value < 66) { page_count.value=66; } if (page_count.value%2 != 0) { page_count.value++; } var pc = page_count.value; if (page_count.value%4 != 0) { pc++; pc++; } var per_copy_cost = ((((cost_per_page * pc) + cover_cost) + kablam_ad_discount) + binding + added_cost); per_copy_cost = per_copy_cost + (per_copy_cost * (price_increase / 100)); // 3/23/22 per_copy_cost = formatCurrency(per_copy_cost); var subtotal_cost = per_copy_cost * 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 if (order_type.value == 120 || order_type.value == 121 || order_type.value == 124 || order_type.value == 125 || order_type.value == 128 || order_type.value == 129) { width=Math.round(((page_count.value*0.0022222)+0.1875)*100)/100; } else { width=Math.round(((page_count.value*0.0042222)+0.1875)*100)/100; } dpi=Math.round((width*300)*100)/100; spine_width.value = width + " Inches\n" + dpi + " Pixels @ 300 DPI"; } // Hardback Pre-Printed binding else if (order_type.value == 140 || order_type.value == 141 || order_type.value == 142 || order_type.value == 143) { if (extra_1.value < 20) { extra_1.value=20; } if (extra_1.value%2 != 0) { extra_1.value++; } if (page_count.value%2 != 0) { page_count.value++; } var pc = page_count.value, total_pages = (page_count.value*1) + (extra_1.value*1); if (page_count.value%4 != 0) { pc++; pc++; } var per_copy_cost = ((((cost_per_page * pc) + cover_cost) + kablam_ad_discount) + binding + added_cost); per_copy_cost = per_copy_cost + (per_copy_cost * (price_increase / 100)); // 3/23/22 per_copy_cost = formatCurrency(per_copy_cost); var subtotal_cost = per_copy_cost * 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 if (order_type.value == 140 || order_type.value == 141 || order_type.value == 142 || order_type.value == 143) { width=Math.round(((total_pages*0.0022222)+0.1875)*100)/100; } else { width=Math.round(((total_pages*0.0042222)+0.1875)*100)/100; } dpi=Math.round((width*300)*100)/100; spine_width.value = "Total pages = " + total_pages + "\n" + width + " Inches\n" + dpi + " Pixels @ 300 DPI"; } else // Everything else { var per_copy_cost = (((((cost_per_page * page_count.value) + cover_cost) + kablam_ad_discount) + binding) ); //alert("per_copy_cost :"+per_copy_cost); per_copy_cost = per_copy_cost + (per_copy_cost * (price_increase / 100)); // 3/23/22 //alert("per_copy_cost* :"+per_copy_cost); per_copy_cost = formatCurrency(per_copy_cost - ( per_copy_cost * ( bulk_discount * .01 ) ) ); per_copy_cost = (per_copy_cost*1) + added_cost; //alert("per_copy_cost :"+per_copy_cost); var subtotal_cost = per_copy_cost * 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,"$"); 11-12-09 formatted_subtotal.value = to_currency(per_copy_cost,"$"); formatted_subtotal_discount.value = to_currency(subtotal_cost_discount,"$"); formatted_total.value = to_currency(total_cost,"$"); total.value = to_currency(total_cost,""); //alert("bulk_discount :"+bulk_discount); // Inclusive IP/CM/IPD questionair if (ip_cm_ipd_included.value == 1) { //alert("Inside IP/CM/IPD Questionair :"+product_code.value); if (title_name.value == "") { title_name.value = order_name.value; } if (product_code.value == 4 || product_code.value == 1) { //alert("AAA"); document.getElementById("printing_cost_id").innerHTML=to_currency(per_copy_cost,""); var overall_total = per_copy_cost; if (product_code.value==4) { var recommened_priceA = ( (1*overall_total)+5 ); } else { var recommened_priceA = ( overall_total * 1.5 ); } var recommened_priceB = Math.round(recommened_priceA); if ( recommened_priceA >= recommened_priceB ) { recommened_priceB = recommened_priceB+.50; } else { recommened_priceB -= 0.01 } var ip_profit_price = (recommened_priceB - per_copy_cost); document.getElementById("retail_recommend_cost_id").innerHTML=to_currency(recommened_priceB,""); if (ip_price.value= recommened_priceB ) { recommened_priceB = recommened_priceB+.50; } else { recommened_priceB -= 0.01 } var ip_profit_price = (recommened_priceB - per_copy_cost); var cm_profit_price = (recommened_priceB * 0.10); document.getElementById("retail_recommend_cost_id").innerHTML=to_currency(recommened_priceB,""); if (ip_price.value= recommened_priceB ) { recommened_priceB = recommened_priceB+.50; } var recommened_priceC = recommened_priceB - overall_total; new_listing.price.value=to_currency(recommened_priceB,""); new_listing.actual_printing_cost.value=overall_total; head1.firstChild.nodeValue=overall_total; head2.firstChild.nodeValue=to_currency(recommened_priceB,""); head3.firstChild.nodeValue=to_currency(recommened_priceC,""); } } } function PriceCheckForIpIpdCm() { with(document.maths) { //alert("ip_price.value="+ip_price.value+" | printing_cost.value="+printing_cost.value+" | cm_recommend_cost="+cm_recommend_cost.value+" | cm_include="+cm_include.value); var new_recommend_cost = 0, price_change = 0; if (cm_include.value == 0) { if ( (ip_price.value * 1) < (printing_cost.value * 1) ) { ip_price.value = to_currency(printing_cost.value,""); price_change = 1; } if (price_change != 0) { alert("Your IndyPlanet price point, if this item isn't at ComicMonkey, must be at lease or greater than your printing cost at Ka-Blam.\n Price change made.\n New price is $"+ip_price.value); } } else { if ( (cm_price.value * 1) < (cm_recommend_cost.value * 1) ) { cm_price.value = to_currency(cm_recommend_cost.value,""); price_change = 1; } if ( (ip_price.value * 1) != (cm_price.value * 1) ) { ip_price.value = to_currency(cm_price.value,""); price_change = 1; } if (price_change != 0) { alert("Your ComicMonkey and IndyPlanet price point must be the same, and at lease or greater ComicsMonkey minimum price.\n Price change made.\n New price is $"+ip_price.value); } } } } function PriceCheckForIpIpdIpb() // Code for IPBulk Pricing { with(document.maths) { //alert("sale "); //+sale); var new_recommend_cost = 0, price_change = 0; if (ip_bulk.value == 0) { if ( (ip_price.value * 1) < (printing_cost.value * 1) ) { ip_price.value=to_currency( printing_cost.value,""); } cm_price.value="-----"; document.getElementById("cm_price_id").innerHTML = cm_price.value document.getElementById("cm_profit_price_id").innerHTML="-----"; } else { if ( (ip_price.value * 0.75) < (printing_cost.value * 1) ) { ip_price.value=to_currency( ( (printing_cost.value * 1) / 0.75 ),""); } cm_price.value=to_currency( ( (ip_price.value * 1) * 0.75 ),""); document.getElementById("cm_price_id").innerHTML = cm_price.value; if ( (cm_price.value * 1) < (printing_cost.value * 1) ) { cm_price.value = to_currency(printing_cost.value,""); document.getElementById("cm_price_id").innerHTML = cm_price.value; ip_price.value = to_currency( ( (printing_cost.value * 1) / 0.75 ),""); } document.getElementById("cm_profit_price_id").innerHTML=to_currency( ( (cm_price.value * 1) - (printing_cost.value * 1) ),""); } document.getElementById("ip_profit_price_id").innerHTML=to_currency( ( (ip_price.value * 1) - (printing_cost.value * 1) ),""); if (ipd_include.value == 1) { var ipd_profit_price; ipd_profit_price = (ipd_price.value * .50); if (sale.checked) { ipd_profit_price = 0.00; } document.getElementById("ipd_profit_price_id").innerHTML=to_currency(ipd_profit_price,""); } } } function formatCurrency(num) { num = isNaN(num) || num === '' || num === null ? 0.00 : num; return parseFloat(num).toFixed(2); } 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=800,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&&i1){ value--; document.getElementById('number').value = value; } calculate(); }