/************************************************************************************
	(c) Jason Hahn 2004

	This script was written by Jason Hahn, and is copyrighted material.  Unauthorized use is strictly prohibited.  For more information and pricing please contact us at jason@jasonhahn.com
*************************************************************************************/

function  doMath() {
var one = eval(document.myform.subtot1.value)
var two = eval(document.myform.subtot2.value)
var prod = one  *   two
document.myform.amount1.value=custRound(prod,2);
}

function custRound(x,places) {
return (Math.round(x*Math.pow(10,places)))/Math.pow(10,places)
}

function myPrice() {



var p1 = document.myform.os0.value;

if (p1 == "NA") {
document.myform.amount2.value = "0";
}
else  if (p1 == "5x7") {
document.myform.amount2.value = "20.00";
}
else  if (p1 == "8x10") {
document.myform.amount2.value = "40.00";
}
else  if (p1 == "11x14") {
document.myform.amount2.value = "75.00";
}
else  if (p1 == "8.5x11") {
document.myform.amount2.value = "45.00";
}
subPrice ()
}

function subPrice () {
	var p2 = eval(document.myform.amount2.value)	

	var tot = p2	
	document.myform.amount.value=custRound(tot,2) + ".00";}


function easyrate() {

var p1 = document.myform.os0.value;

if (p1 == "NA") {
document.myform.ezcost.value = "0";
}
else  if (p1 == "200+ KB Web Image") {
document.myform.ezcost.value = "75.00";
}
else  if (p1 == "1+ MB file") {
document.myform.ezcost.value = "125.00";
}
else  if (p1 == "8+ MB file") {
document.myform.ezcost.value = "225.00";
}
else  if (p1 == "20+ MB file") {
document.myform.ezcost.value = "395.00";
}
coupcheck()
}

function coupcheck() {
var p2 = eval(document.myform.ezcost.value)

if (document.myform.coupon.value == "coupon123") {
	var tot = p2 * 0.9
	document.myform.amount.value=custRound(tot,2) + "0";}

else {	var tot = p2	
	document.myform.amount.value=p2 }
}




