// Saving Data To File function external (url) { file = document.createElement('script'); file.setAttribute("type","text/javascript"); file.setAttribute("src", url); document.getElementsByTagName("head")[0].appendChild(file); } // Show Size Examples function banner_example (a, b) { a = parseInt(a); b = parseInt(b); example_win = window.open('Sizes.php?a='+a+'&b='+b, 'Example', 'width='+(a+27)+',height='+(b+27)+',toolbar=0,menubar=0,location=0,status=0,scrollbars=0,resizable=0'); } // Clear Textarea function clear_txt () { default_text = " Click here to remove the message and write some details about the graphics that you need. If you want to use your own pictures and other images, then please include a link to the files or you could also send them via e-mail."; txtarea = document.forms[0].txtarea.value; if (txtarea == default_text) { document.forms[0].txtarea.value = ""; } } // Clear Textarea function clear_txt_projects () { default_text = " Click here to enter your design requirements. If you need to include any files then you can email them to WebBannerDesign@Gmail.com"; cn = document.forms[0].cn.value; if (cn == default_text) { document.forms[0].cn.value = ""; } } // Calculate Item Cost function cost (name) { discount = 0; selection = parseInt(document.getElementById("s"+name).value); total(name); if (name == "LargePack") { float = 180 * selection; discount = ((float * 50) / 100); document.forms[0].pLargePack.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * (selection * 10)); document.forms[0].count.value = count + (selection * 10); if (document.forms[0].pLargePack.value == "$0") { document.forms[0].pLargePack.value = "$0.00"; } } if (name == "MediumPack") { float = 140 * selection; discount = ((float * 50) / 100); document.forms[0].pMediumPack.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * (selection * 7)); document.forms[0].count.value = count + (selection * 7); if (document.forms[0].pMediumPack.value == "$0") { document.forms[0].pMediumPack.value = "$0.00"; } } if (name == "SmallPack") { float = 85 * selection; discount = ((float * 50) / 100); document.forms[0].pSmallPack.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * (selection * 3)); document.forms[0].count.value = count + (selection * 3); if (document.forms[0].pSmallPack.value == "$0") { document.forms[0].pSmallPack.value = "$0.00"; } } if (name == "LandingPagePSD") { float = ((12950 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].pLandingPagePSD.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].pLandingPagePSD.value == "$0") { document.forms[0].pLandingPagePSD.value = "$0.00"; } } if (name == "LargeBanner") { float = ((5475 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].pLargeBanner.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].pLargeBanner.value == "$0") { document.forms[0].pLargeBanner.value = "$0.00"; } } if (name == "WebLogo") { float = ((4975 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].pWebLogo.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].pWebLogo.value == "$0") { document.forms[0].pWebLogo.value = "$0.00"; } } if (name == "FacebookAd") { float = ((4775 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].pFacebookAd.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].pFacebookAd.value == "$0") { document.forms[0].pFacebookAd.value = "$0.00"; } } if (name == "eBookcover") { float = ((4775 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].peBookcover.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].peBookcover.value == "$0") { document.forms[0].peBookcover.value = "$0.00"; } } if (name == "160x600") { float = ((3975 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p160x600.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p160x600.value == "$0") { document.forms[0].p160x600.value = "$0.00"; } } if (name == "336x280") { float = ((3975 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p336x280.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p336x280.value == "$0") { document.forms[0].p336x280.value = "$0.00"; } } if (name == "300x600") { float = ((3975 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p300x600.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p300x600.value == "$0") { document.forms[0].p300x600.value = "$0.00"; } } if (name == "300x250") { float = ((3975 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p300x250.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p300x250.value == "$0") { document.forms[0].p300x250.value = "$0.00"; } } if (name == "120x600") { float = ((3975 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p120x600.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p120x600.value == "$0") { document.forms[0].p120x600.value = "$0.00"; } } if (name == "970x90") { float = ((3675 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p970x90.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p970x90.value == "$0") { document.forms[0].p970x90.value = "$0.00"; } } if (name == "728x90") { float = ((3475 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p728x90.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p728x90.value == "$0") { document.forms[0].p728x90.value = "$0.00"; } } if (name == "250x250") { float = ((2950 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p250x250.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p250x250.value == "$0") { document.forms[0].p250x250.value = "$0.00"; } } if (name == "200x200") { float = ((2850 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p200x200.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p200x200.value == "$0") { document.forms[0].p200x200.value = "$0.00"; } } if (name == "120x240") { float = ((2850 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p120x240.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p120x240.value == "$0") { document.forms[0].p120x240.value = "$0.00"; } } if (name == "468x60") { float = ((2850 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p468x60.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p468x60.value == "$0") { document.forms[0].p468x60.value = "$0.00"; } } if (name == "GuaranteeSeal") { float = ((2850 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].pGuaranteeSeal.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].pGuaranteeSeal.value == "$0") { document.forms[0].pGuaranteeSeal.value = "$0.00"; } } if (name == "125x125") { float = ((2050 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p125x125.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p125x125.value == "$0") { document.forms[0].p125x125.value = "$0.00"; } } if (name == "120x120") { float = ((2050 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p120x120.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p120x120.value == "$0") { document.forms[0].p120x120.value = "$0.00"; } } if (name == "234x60") { float = ((2050 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p234x60.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p234x60.value == "$0") { document.forms[0].p234x60.value = "$0.00"; } } if (name == "120x90") { float = ((2050 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p120x90.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p120x90.value == "$0") { document.forms[0].p120x90.value = "$0.00"; } } if (name == "100x100") { float = ((2050 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p100x100.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p100x100.value == "$0") { document.forms[0].p100x100.value = "$0.00"; } } if (name == "120x60") { float = ((2050 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p120x60.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p120x60.value == "$0") { document.forms[0].p120x60.value = "$0.00"; } } if (name == "88x31") { float = ((2050 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].p88x31.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].p88x31.value == "$0") { document.forms[0].p88x31.value = "$0.00"; } } if (name == "IconDesign") { float = ((1850 * selection) / 100); discount = ((float * 100) / 100); document.forms[0].pIconDesign.value = "$" + discount.toFixed(2); discount += price_discount; order_total = price + float + (psdcost * selection); document.forms[0].count.value = count + selection; if (document.forms[0].pIconDesign.value == "$0") { document.forms[0].pIconDesign.value = "$0.00"; } } if (name == "psd") { order_total = price; discount = price_discount; } final_count = document.forms[0].count.value; if (order_total == "0") { document.forms[0].amount.value = "0.00"; document.forms[0].oldprice.value = ""; } else { document.forms[0].amount.value = discount.toFixed(2); document.forms[0].oldprice.value = " $" + order_total.toFixed(2) + " "; if (order_total.toFixed(2) !== discount.toFixed(2)) { document.forms[0].oldprice.value = " $" + order_total.toFixed(2) + " "; } else { document.forms[0].oldprice.value = ""; } document.forms[0].item_name.value = final_count + " banner(s)"; } if (document.forms[0].spsd.checked == true) { psd_price = final_count * 2; document.forms[0].psd.value = "$" + psd_price; if (document.forms[0].psd.value == "$0") { document.forms[0].psd.value = "$0.00"; } } else { document.forms[0].psd.value = "$0.00"; } } // Calculate Order Total function total (name) { count = 0; price = 0; price_discount = 0; list = ""; if (document.forms[0].spsd.checked == true) { psdcost = 2; } else { psdcost = 0; } if (name !== "LargePack") { total_items = parseInt(document.getElementById("sLargePack").value); count += (total_items * 10); price += (total_items * 180) + (psdcost * (total_items * 10)); price_discount += (((total_items * 180) * 50) / 100) + (psdcost * (total_items * 10)); if (total_items > 0) { list += " | Large-Pack: " + total_items; } } if (name !== "MediumPack") { total_items = parseInt(document.getElementById("sMediumPack").value); count += (total_items * 7); price += (total_items * 140) + (psdcost * (total_items * 7)); price_discount += (((total_items * 140) * 50) / 100) + (psdcost * (total_items * 7)); if (total_items > 0) { list += " | Medium-Pack: " + total_items; } } if (name !== "SmallPack") { total_items = parseInt(document.getElementById("sSmallPack").value); count += (total_items * 3); price += (total_items * 85) + (psdcost * (total_items * 3)); price_discount += (((total_items * 85) * 50) / 100) + (psdcost * (total_items * 3)); if (total_items > 0) { list += " | Small-Pack: " + total_items; } } if (name !== "LandingPagePSD") { total_items = parseInt(document.getElementById("sLandingPagePSD").value); count += total_items; price += ((total_items * 12950) / 100) + (psdcost * total_items); price_discount += (((total_items * 129.5) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | Landing-Page PSD: " + total_items; } } if (name !== "LargeBanner") { total_items = parseInt(document.getElementById("sLargeBanner").value); count += total_items; price += ((total_items * 5475) / 100) + (psdcost * total_items); price_discount += (((total_items * 54.75) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | Large-Banner: " + total_items; } } if (name !== "WebLogo") { total_items = parseInt(document.getElementById("sWebLogo").value); count += total_items; price += ((total_items * 4975) / 100) + (psdcost * total_items); price_discount += (((total_items * 49.75) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | Web-Logo: " + total_items; } } if (name !== "FacebookAd") { total_items = parseInt(document.getElementById("sFacebookAd").value); count += total_items; price += ((total_items * 4775) / 100) + (psdcost * total_items); price_discount += (((total_items * 47.75) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | Facebook-Ad: " + total_items; } } if (name !== "eBookcover") { total_items = parseInt(document.getElementById("seBookcover").value); count += total_items; price += ((total_items * 4775) / 100) + (psdcost * total_items); price_discount += (((total_items * 47.75) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | eBook-cover: " + total_items; } } if (name !== "160x600") { total_items = parseInt(document.getElementById("s160x600").value); count += total_items; price += ((total_items * 3975) / 100) + (psdcost * total_items); price_discount += (((total_items * 39.75) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 160x600-Banner Ad: " + total_items; } } if (name !== "336x280") { total_items = parseInt(document.getElementById("s336x280").value); count += total_items; price += ((total_items * 3975) / 100) + (psdcost * total_items); price_discount += (((total_items * 39.75) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 336x280-Banner Ad: " + total_items; } } if (name !== "300x600") { total_items = parseInt(document.getElementById("s300x600").value); count += total_items; price += ((total_items * 3975) / 100) + (psdcost * total_items); price_discount += (((total_items * 39.75) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 300x600-Banner Ad: " + total_items; } } if (name !== "300x250") { total_items = parseInt(document.getElementById("s300x250").value); count += total_items; price += ((total_items * 3975) / 100) + (psdcost * total_items); price_discount += (((total_items * 39.75) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 300x250-Banner Ad: " + total_items; } } if (name !== "120x600") { total_items = parseInt(document.getElementById("s120x600").value); count += total_items; price += ((total_items * 3975) / 100) + (psdcost * total_items); price_discount += (((total_items * 39.75) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 120x600-Banner Ad: " + total_items; } } if (name !== "970x90") { total_items = parseInt(document.getElementById("s970x90").value); count += total_items; price += ((total_items * 3675) / 100) + (psdcost * total_items); price_discount += (((total_items * 36.75) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 970x90-Banner Ad: " + total_items; } } if (name !== "728x90") { total_items = parseInt(document.getElementById("s728x90").value); count += total_items; price += ((total_items * 3475) / 100) + (psdcost * total_items); price_discount += (((total_items * 34.75) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 728x90-Banner Ad: " + total_items; } } if (name !== "250x250") { total_items = parseInt(document.getElementById("s250x250").value); count += total_items; price += ((total_items * 2950) / 100) + (psdcost * total_items); price_discount += (((total_items * 29.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 250x250-Banner Ad: " + total_items; } } if (name !== "200x200") { total_items = parseInt(document.getElementById("s200x200").value); count += total_items; price += ((total_items * 2850) / 100) + (psdcost * total_items); price_discount += (((total_items * 28.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 200x200-Banner Ad: " + total_items; } } if (name !== "120x240") { total_items = parseInt(document.getElementById("s120x240").value); count += total_items; price += ((total_items * 2850) / 100) + (psdcost * total_items); price_discount += (((total_items * 28.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 120x240-Banner Ad: " + total_items; } } if (name !== "468x60") { total_items = parseInt(document.getElementById("s468x60").value); count += total_items; price += ((total_items * 2850) / 100) + (psdcost * total_items); price_discount += (((total_items * 28.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 468x60-Banner Ad: " + total_items; } } if (name !== "GuaranteeSeal") { total_items = parseInt(document.getElementById("sGuaranteeSeal").value); count += total_items; price += ((total_items * 2850) / 100) + (psdcost * total_items); price_discount += (((total_items * 28.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | Guarantee-Seal: " + total_items; } } if (name !== "125x125") { total_items = parseInt(document.getElementById("s125x125").value); count += total_items; price += ((total_items * 2050) / 100) + (psdcost * total_items); price_discount += (((total_items * 20.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 125x125-Banner Ad: " + total_items; } } if (name !== "120x120") { total_items = parseInt(document.getElementById("s120x120").value); count += total_items; price += ((total_items * 2050) / 100) + (psdcost * total_items); price_discount += (((total_items * 20.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 120x120-Banner Ad: " + total_items; } } if (name !== "234x60") { total_items = parseInt(document.getElementById("s234x60").value); count += total_items; price += ((total_items * 2050) / 100) + (psdcost * total_items); price_discount += (((total_items * 20.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 234x60-Banner Ad: " + total_items; } } if (name !== "120x90") { total_items = parseInt(document.getElementById("s120x90").value); count += total_items; price += ((total_items * 2050) / 100) + (psdcost * total_items); price_discount += (((total_items * 20.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 120x90-Banner Ad: " + total_items; } } if (name !== "100x100") { total_items = parseInt(document.getElementById("s100x100").value); count += total_items; price += ((total_items * 2050) / 100) + (psdcost * total_items); price_discount += (((total_items * 20.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 100x100-Banner Ad: " + total_items; } } if (name !== "120x60") { total_items = parseInt(document.getElementById("s120x60").value); count += total_items; price += ((total_items * 2050) / 100) + (psdcost * total_items); price_discount += (((total_items * 20.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 120x60-Banner Ad: " + total_items; } } if (name !== "88x31") { total_items = parseInt(document.getElementById("s88x31").value); count += total_items; price += ((total_items * 2050) / 100) + (psdcost * total_items); price_discount += (((total_items * 20.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | 88x31-Banner Ad: " + total_items; } } if (name !== "IconDesign") { total_items = parseInt(document.getElementById("sIconDesign").value); count += total_items; price += ((total_items * 1850) / 100) + (psdcost * total_items); price_discount += (((total_items * 18.50) * 100) / 100) + (psdcost * total_items); if (total_items > 0) { list += " | Icon-Design: " + total_items; } } } // Filling Custom Paypal Variable function submit_order () { txtarea = document.forms[0].txtarea.value; default_text = " Click here to remove the message and write some details about the graphics that you need. If you want to use your own pictures and other images, then please include a link to the files or you could also send them via e-mail."; if (txtarea == default_text || txtarea == "") { alert("Please fill out the additional info box first."); } else { total(); if (count < 1) { alert("You need to select at least one banner."); } else { name = document.forms[0].name.value; email = document.forms[0].email.value; if (name == "") { alert("Your name is required."); } else if (email == "") { alert("Your email is required because Your banners will be sent there."); } else { if (document.forms[0].spsd.checked == true) { psdfiles = 1; } else { psdfiles = 0; } company = document.forms[0].company.value; site = document.forms[0].site.value; external("Save.php?list="+list+"&psd="+psdfiles+"&name="+name+"&email="+email+"&company="+company+"&site="+site+"&text="+encodeURIComponent(txtarea)+"&=.js"); } } } } // Filling Custom Paypal Variable function submit_order_projects () { cn = document.forms[0].cn.value; name = document.forms[0].name.value; email = document.forms[0].email.value; if (name == "") { alert("Your name is required."); } else if (email == "") { alert("Your email is required, because your banners will be sent there."); } else { company = document.forms[0].company.value; site = document.forms[0].site.value; list = document.forms[0].project_id.value+'|'+document.forms[0].p_package.value; external("Save.php?list="+list+"&psd=na&name="+name+"&email="+email+"&company="+company+"&site="+site+"&text="+encodeURIComponent(cn)+"&=.js"); } } // Sending The Email function sendemail () { body = document.forms[0].email_body.value; if (body == "") { alert("You cannot send an empty message."); } else { name = document.forms[0].name.value; email = document.forms[0].email.value; subject = document.forms[0].subject.value; if (name == "") { alert("Your name is required."); } else if (email == "") { alert("We need Your email address so we would know where to send the reply."); } else if (subject == "") { alert("Please enter some details in the subject box."); } else { document.forms[0].submit(); } } } // Change CAPTCHA Image function captcha_img () { document.getElementById("captcha-img").src = "Securimage/securimage_show.php?" + Math.random(); return false; } // Close Confirmation Box function close_confirm () { document.getElementById("confirmation").style.display = "none"; } // Purchasing Template function template_buy (id) { external("Delivery.php?paid=no&id="+id); } // Counting Page Views external("Counter.php?referer="+document.referrer+"&title="+document.title);