function addMailing() {
var Mailing = document.NML_Order.Mailing.value;
var Product = document.NML_Order.myProduct.value;
var mPrice = 0;
	if(Mailing == "+") {
			document.getElementById('mailRow2').className = 'rowOn'; 
			document.getElementById('mailRow3').className = 'rowOn'; 
			document.getElementById('mailRow4').className = 'rowOn'; 
			document.getElementById('mailRow5').className = 'rowOn'; 
			document.getElementById('mailRow6').className = 'rowOn'; 
			document.getElementById('msPlusButton').className = 'MinusButton'; 
			document.getElementById('msPlusButton').value = 'X'; 
			if(Product == "Flyer Folded" || Product == "Tri-Fold Flyer") {
				document.getElementById('mailRow7').className = 'rowOn'; 
			}
	}
	if(Mailing == "X") {
			document.getElementById('mailRow2').className = 'rowOff'; 
			document.getElementById('mailRow3').className = 'rowOff'; 
			document.getElementById('mailRow4').className = 'rowOff'; 
			document.getElementById('mailRow5').className = 'rowOff'; 
			document.getElementById('mailRow6').className = 'rowOff'; 
			document.getElementById('msPlusButton').className = 'PlusButtonMail'; 
			document.getElementById('msPlusButton').value = '+'; 
		document.getElementById('mailPrice').value = 0 * 1;
		document.getElementById('postageRate').value = " ";
		document.getElementById('mailQuantity').value = "";
		document.getElementById('inkJetPrice').value = 0 * 1;
		document.getElementById('mListPrice').value = 0 * 1;
		document.getElementById('tabbingPrice').value = 0 * 1;
				document.getElementById('mailRow7').className = 'rowOff'; 
	mPrice = 0;
	}
}
function addShipping() {
var Shipping = document.NML_Order.Shipping.value;
var t_zip = document.NML_Order.t_zip.value;
var shipWeight = document.NML_Order.shipWeight.value;
var upsGround = document.NML_Order.upsGround.value * 1;
var ups2DayAir = document.NML_Order.ups2DayAir.value * 1;
var upsNextDayAir = document.NML_Order.upsNextDayAir.value * 1;
var shipPrice = 0;
	if(shipWeight > 0) {
		if(Shipping == "+") {
			document.getElementById('shipRow1').className = 'rowOn'; 
			document.getElementById('shipRow2').className = 'rowOn'; 
			document.getElementById('shipRow3').className = 'rowOn'; 
			document.getElementById('shipRow4').className = 'rowOn'; 
			document.getElementById('shipRow5').className = 'rowOn'; 
			document.getElementById('shipRow6').className = 'rowOn'; 
			document.getElementById('shPlusButton').className = 'MinusButton'; 
			document.getElementById('shPlusButton').value = 'X'; 
			document.getElementById('upsGround').value = 0.00.toFixed(2);
			document.getElementById('ups2DayAir').value = 0.00.toFixed(2);
			document.getElementById('upsNextDayAir').value = 0.00.toFixed(2);
			document.getElementById('shipPrice').value = 0.00.toFixed(2);
			document.getElementById('shipUPSbuttonG').checked=false;
			document.getElementById('shipUPSbutton2').checked=false;
			document.getElementById('shipUPSbuttonN').checked=false;
			if(t_zip == "") { document.getElementById('shipPrice').value = 0.00.toFixed(2); }
		}
	}
	if(Shipping == "X") {
			document.getElementById('shipRow1').className = 'rowOff'; 
			document.getElementById('shipRow2').className = 'rowOff'; 
			document.getElementById('shipRow3').className = 'rowOff'; 
			document.getElementById('shipRow4').className = 'rowOff'; 
			document.getElementById('shipRow5').className = 'rowOff'; 
			document.getElementById('shipRow6').className = 'rowOff'; 
			document.getElementById('shPlusButton').className = 'PlusButtonUPS'; 
			document.getElementById('shPlusButton').value = '+'; 
			document.getElementById('shipWeight').value = 0;
			document.getElementById('shipPrice').value = 0 * 1;
			document.getElementById('shipMethod').value = "Do Not Ship";
			shipPrice = 0;
			document.getElementById('t_zip').value = "";
	}
}
/*
function blastTog() {
}
*/
/*
function blastIt() {
}
*/
/*
MEMBERSHIP
function distTog()
{
}
*/
/*
MEMBERSHIP
function distOpt()
{
}
*/

function showPrice()
{
var Quantity = document.NML_Order.myQuantity.value;
var pPrice = 0;
var printPrice = document.NML_Order.printPrice.value;
var Format = document.NML_Order.myFormat.value;
var Product = document.NML_Order.myProduct.value;
var mPrice = 0;
var postageRate = document.NML_Order.postageRate.value;
var pQuantity = document.NML_Order.myQuantity.value * 1;
var mailQuantity = document.NML_Order.mailQuantity.value * 1;
var mailPrice = document.NML_Order.mailPrice.value;
var shipPrice = 0;

if(Product != " ") {
			document.getElementById('myQuantity').className = 'prcBox';
} else {
			document.getElementById('myQuantity').className = 'prcBoxHid';
}
if(postageRate != " ") {
			document.getElementById('mailQuantity').className = 'prcBox';
} else {
			document.getElementById('mailQuantity').className = 'prcBoxHid';
}

//UV Coat AD
if(Quantity == "Quantity" || Product == " "){ 
	document.getElementById('UVcoat').className = 'UVcoat01'; }
else {	document.getElementById('UVcoat').className = 'UVcoat02'; }


// JUMBO POSTCARDS
if(Product == "Jumbo Postcard 5.5 x 8.5"){
	if (Format == "4/0 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .36; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .34; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .31; }
		if(Quantity >= 1000)  { pPrice = Quantity * .28; }
	}
	if (Format == "4/1 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .39; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .37; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .34; }
		if(Quantity >= 1000)  { pPrice = Quantity * .31; }
	}
	if (Format == "4/4 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .42; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .40; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .37; }
		if(Quantity >= 1000)  { pPrice = Quantity * .34; }
	}
	if(postageRate == "First Class") {
		if(mailQuantity < 500) { document.getElementById('mailQuantity').value = 500; }
			if(mailQuantity > pQuantity) {
				document.getElementById('mailQuantity').value = Quantity;
				mailQuantity = Quantity * 1;
				alert('You cannot Mail more than you are Printing.');
					if(mailQuantity < 500) {
					document.getElementById('mailQuantity').value = 500;
						if(pQuantity < 500) { document.getElementById('myQuantity').value = 500; }
					}
		return false;
		}
		if(mailQuantity <= 500) { mPrice = 500 * .36; }
		if(mailQuantity >= 500) { mPrice = mailQuantity * .36; }
	}
	if(postageRate == "Standard Bulk Rate") {
		if(mailQuantity < 200) { document.getElementById('mailQuantity').value = 200; }
			if(mailQuantity > pQuantity) {
				document.getElementById('mailQuantity').value = Quantity;
				mailQuantity = Quantity * 1;
				alert('You cannot Mail more than you are Printing.');
					if(mailQuantity < 200) {
					document.getElementById('mailQuantity').value = 200;
						if(pQuantity < 200) { document.getElementById('myQuantity').value = 200; }
					}
		return false;
		}
		if(mailQuantity <= 199) { mPrice = 200 * .26; }
		if(mailQuantity >= 200) { mPrice = mailQuantity * .26; }
	}
}
// SUPER JUMBO POSTCARDS
if(Product == "Super Jumbo Postcard 6 x 11.5"){
	if (Format == "4/0 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .49; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .46; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .43; }
		if(Quantity >= 1000)  { pPrice = Quantity * .40; }
	}
	if (Format == "4/1 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .52; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .49; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .46; }
		if(Quantity >= 1000)  { pPrice = Quantity * .43; }
	}
	if (Format == "4/4 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .58; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .55; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .52; }
		if(Quantity >= 1000)  { pPrice = Quantity * .49; }
	}
	if(postageRate == "First Class") {
		if(mailQuantity < 500) { document.getElementById('mailQuantity').value = 500; }
			if(mailQuantity > pQuantity) {
				document.getElementById('mailQuantity').value = Quantity;
				mailQuantity = Quantity * 1;
				alert('You cannot Mail more than you are Printing.');
					if(mailQuantity < 500) {
					document.getElementById('mailQuantity').value = 500;
						if(pQuantity < 500) { document.getElementById('myQuantity').value = 500; }
					}
		return false;
		}
		if(mailQuantity <= 500) { mPrice = 500 * .36; document.getElementById('mailQuantity').value = 500; }
		if(mailQuantity >= 500) { mPrice = mailQuantity * .36; }
	}
	if(postageRate == "Standard Bulk Rate") {
		if(mailQuantity < 200) { document.getElementById('mailQuantity').value = 200; }
			if(mailQuantity > pQuantity) {
				document.getElementById('mailQuantity').value = Quantity;
				mailQuantity = Quantity * 1;
				alert('You cannot Mail more than you are Printing.');
					if(mailQuantity < 200) {
					document.getElementById('mailQuantity').value = 200;
						if(pQuantity < 200) { document.getElementById('myQuantity').value = 200; }
					}
		return false;
		}
		if(mailQuantity <= 199) { mPrice = 200 * .26; }
		if(mailQuantity >= 200) { mPrice = mailQuantity * .26; }
	}
}
// STANDARD POSTCARDS
if(Product == "Standard Postcard 4.25 x 6"){
	if (Format == "4/0 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .18; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .17; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .15; }
		if(Quantity >= 1000)  { pPrice = Quantity * .13; }
	}
	if (Format == "4/1 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .22; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .20; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .18; }
		if(Quantity >= 1000)  { pPrice = Quantity * .16; }
	}
	if (Format == "4/4 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .25; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .23; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .21; }
		if(Quantity >= 1000)  { pPrice = Quantity * .19; }
	}
	if(postageRate == "First Class") {
		if(mailQuantity < 500) { document.getElementById('mailQuantity').value = 500; }
			if(mailQuantity > pQuantity) {
				document.getElementById('mailQuantity').value = Quantity;
				mailQuantity = Quantity * 1;
				alert('You cannot Mail more than you are Printing.');
					if(mailQuantity < 500) {
					document.getElementById('mailQuantity').value = 500;
						if(pQuantity < 500) { document.getElementById('myQuantity').value = 500; }
				}
		return false;
		}
		if(mailQuantity <= 499) { mPrice = 500 * .22; }
		if(mailQuantity >= 500) { mPrice = mailQuantity * .22; }
	}
	if(postageRate == "Standard Bulk Rate") {
		if(mailQuantity < 200) { document.getElementById('mailQuantity').value = 200; }
			if(mailQuantity > pQuantity) {
				document.getElementById('mailQuantity').value = Quantity;
				mailQuantity = Quantity * 1;
				alert('You cannot Mail more than you are Printing.');
					if(mailQuantity < 200) {
					document.getElementById('mailQuantity').value = 200;
						if(pQuantity < 200) { document.getElementById('myQuantity').value = 200; }
					}
		return false;
		}
		if(mailQuantity <= 199) { mPrice = 200 * .26; }
		if(mailQuantity >= 200) { mPrice = mailQuantity * .26; }
	}
}
// RACK CARDS
if(Product == "Rack Card 4 x 9"){
	if (Format == "4/0 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .36; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .34; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .31; }
		if(Quantity >= 1000)  { pPrice = Quantity * .28; }
	}
	if (Format == "4/1 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .39; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .37; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .34; }
		if(Quantity >= 1000)  { pPrice = Quantity * .31; }
	}
	if (Format == "4/4 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .42; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .40; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .37; }
		if(Quantity >= 1000)  { pPrice = Quantity * .34; }
	}
	if(postageRate == "First Class") {
		if(mailQuantity < 500) { document.getElementById('mailQuantity').value = 500; }
			if(mailQuantity > pQuantity) {
				document.getElementById('mailQuantity').value = Quantity;
				mailQuantity = Quantity * 1;
				alert('You cannot Mail more than you are Printing.');
					if(mailQuantity < 500) {
					document.getElementById('mailQuantity').value = 500;
						if(pQuantity < 500) { document.getElementById('myQuantity').value = 500; }
				}
		return false;
		}
		if(mailQuantity <= 499) { mPrice = 500 * .36; document.getElementById('mailQuantity').value = 500; }
		if(mailQuantity >= 500) { mPrice = mailQuantity * .36; }
	}
	if(postageRate == "Standard Bulk Rate") {
		if(mailQuantity < 200) { document.getElementById('mailQuantity').value = 200; }
			if(mailQuantity > pQuantity) {
				document.getElementById('mailQuantity').value = Quantity;
				mailQuantity = Quantity * 1;
				alert('You cannot Mail more than you are Printing.');
					if(mailQuantity < 200) {
					document.getElementById('mailQuantity').value = 200;
						if(pQuantity < 200) { document.getElementById('myQuantity').value = 200; }
				}
		return false;
		}
		if(mailQuantity <= 199) { mPrice = 200 * .26; }
		if(mailQuantity >= 200) { mPrice = mailQuantity * .26; }
	}

}
// FLYERS / BROCHURES
if(Product == "Flyer"){
	if (Format == "4/0 on 80# Gloss Text"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .49; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .47; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .44; }
		if(Quantity >= 1000)  { pPrice = Quantity * .41; }
	}
	if (Format == "4/0 on 100# Gloss Text"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .49; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .47; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .44; }
		if(Quantity >= 1000)  { pPrice = Quantity * .41; }
	}
	if (Format == "4/0 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .60; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .58; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .55; }
		if(Quantity >= 1000)  { pPrice = Quantity * .52; }
	}
	if (Format == "4/1 on 100# Gloss Text" || Format == "4/4 on 100# Gloss Text"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .58; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .56; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .53; }
		if(Quantity >= 1000)  { pPrice = Quantity * .50; }
	}
	if (Format == "4/1 on 110# Cover Stock" || Format == "4/4 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .69; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .67; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .64; }
		if(Quantity >= 1000)  { pPrice = Quantity * .61; }
	}
}

if(Product == "Four Page Brochure 11 x 17"){
	if (Format == "4/0 on 80# Gloss Text"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .98; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .94; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .88; }
		if(Quantity >= 1000)  { pPrice = Quantity * .82; }
	}
	if (Format == "4/0 on 100# Gloss Text"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * .98; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * .94; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * .88; }
		if(Quantity >= 1000)  { pPrice = Quantity * .82; }
	}
	if (Format == "4/0 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * 1.12; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * 1.08; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * 1.02; }
		if(Quantity >= 1000)  { pPrice = Quantity * 0.96; }
	}
	if (Format == "4/1 on 100# Gloss Text" || Format == "4/4 on 100# Gloss Text"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * 1.16; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * 1.12; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * 1.06; }
		if(Quantity >= 1000)  { pPrice = Quantity * 1.00; }
	}
	if (Format == "4/1 on 110# Cover Stock" || Format == "4/4 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 249)  { pPrice = Quantity * 1.30; }
		if(Quantity >= 250  && Quantity <= 499)  { pPrice = Quantity * 1.26; }
		if(Quantity >= 500  && Quantity <= 999)  { pPrice = Quantity * 1.20; }
		if(Quantity >= 1000)  { pPrice = Quantity * 1.14; }
	}

}

if(Product == "Business Card 2 x 3.5"){
	if (Format == "4/0 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 500)  { pPrice = 50.00; 
			document.getElementById('myQuantity').value = 500;
			}
		if(Quantity >= 501  && Quantity <= 1000)  { pPrice = 70.00;
			document.getElementById('myQuantity').value = 1000;
			}
		if(Quantity > 1001)  { pPrice = 120.00;
			document.getElementById('myQuantity').value = 2000;
			}
	}
	if (Format == "4/1 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 500)  { pPrice = 70.00; 
			document.getElementById('myQuantity').value = 500;
			}
		if(Quantity >= 501  && Quantity <= 1000)  { pPrice = 90.00;
			document.getElementById('myQuantity').value = 1000;

			}
		if(Quantity > 1001)  { pPrice = 150.00;
			document.getElementById('myQuantity').value = 2000;
			}
	}
	if (Format == "4/4 on 110# Cover Stock"){
		if(Quantity > 0  && Quantity <= 500)  { pPrice = 80.00; 
			document.getElementById('myQuantity').value = 500;
			}
		if(Quantity >= 501  && Quantity <= 1000)  { pPrice = 110.00;
			document.getElementById('myQuantity').value = 1000;
			}
		if(Quantity > 1001)  { pPrice = 170.00;
			document.getElementById('myQuantity').value = 2000;
			}
	}
	if(Quantity != "Quantity") {
		if(Quantity != 500 && Quantity != 1000 && Quantity != 2000) {
			alert('Business Cards are only available in fixed Quantities of 500, 1000 and 2000.');
		} else {}
	}
}
if(Product == "Sticker 2 x 3.5"){
	if (Format == "4/0 on Glossy Peel and Stick"){
		if(Quantity > 0  && Quantity <= 500)  { pPrice = 85.00; 
			document.getElementById('myQuantity').value = 500;
			}
		if(Quantity >= 501  && Quantity <= 1000)  { pPrice = 115.00;
			document.getElementById('myQuantity').value = 1000;
			}
		if(Quantity > 1001)  { pPrice = 175.00;
			document.getElementById('myQuantity').value = 2000;
			}
	}
	if(Quantity != "Quantity") {
		if(Quantity != 500 && Quantity != 1000 && Quantity != 2000) {
			alert('Stickers are only available in fixed Quantities of 500, 1000 and 2000.');
		} else {}
	}
}
if (Product == "Business Card 2 x 3.5" || Product == "Sticker 2 x 3.5") {
			document.getElementById('bCARDS').className = 'rowOn';
	} else {
			document.getElementById('bCARDS').className = 'rowOff';
	}

// 49.00 minimum +++++++++++
if(pPrice < 49.00 && pPrice > .01) { pPrice = 49.00; }

if(Product == " "){ 
	document.getElementById('printPrice').value = 0;
	document.getElementById('noTaxTotal').value = 0;
	document.getElementById('NMLbutton').className = 'noButton'; 
	document.getElementById('toOrder').className = 'toOrderOff'; 
	document.getElementById('shipRow').className = 'rowOff'; 
	document.getElementById('taxRow').className = 'rowOff'; 
	document.getElementById('taxRow2').className = 'rowOff'; 
	document.getElementById('taxRow3').className = 'rowOff'; 
	document.getElementById('stateTax').value = 0;
	document.getElementById('typesetting01').className = 'rowOff'; 
	} else {
		if(Quantity == "Quantity" || Format == "--"){ 
		document.getElementById('printPrice').value = 0;
		document.getElementById('noTaxTotal').value = 0;
		document.getElementById('NMLbutton').className = 'noButton'; 
		document.getElementById('toOrder').className = 'toOrderOff'; 
		document.getElementById('shipRow').className = 'rowOff'; 
		document.getElementById('taxRow').className = 'rowOff'; 
		document.getElementById('taxRow2').className = 'rowOff'; 
		document.getElementById('taxRow3').className = 'rowOff'; 
		document.getElementById('stateTax').value = 0;
		document.getElementById('typesetting01').className = 'rowOff'; 
		} else { 
		document.getElementById('printPrice').value = pPrice.toFixed(2);
		document.getElementById("NMLbutton").className = "ButtonSubmit"; 
		document.getElementById('toOrder').className = 'toOrderOn'; 
		document.getElementById('shipRow').className = 'rowOn'; 
		document.getElementById('taxRow').className = 'rowOn';
		document.getElementById('taxRow2').className = 'rowOn'; 
		document.getElementById('taxRow3').className = 'rowOn'; 
			if(Product != "Four Page Brochure 11 x 17" && Product != "Four Page Brochure 8.5 x 22" && Product != "Six Page Brochure" && Product != "Pocket Folder 9 x 12" && Product != "Pocket Folder 9 x 14.5" && Product != "Pocket Folder 9 x 14.5 with Spine") {
			document.getElementById('typesetting01').className = 'rowOn'; 
			}
		}
}
/*
if(Product == "Flyer"){
  if(Format == "4/0 on 110# Cover Stock" || Format == "4/1 on 110# Cover Stock" || Format == "4/4 on 110# Cover Stock") {
	if(Quantity != "--") {
		document.getElementById('mailPrice').value = mPrice.toFixed(2);
		document.getElementById('mailRow1').className = 'rowOn'; 
		} else {
		document.getElementById('mailPrice').value = 0 * 1;
		document.getElementById('postageRate').value = " ";
		document.getElementById('mailQuantity').value = "";
		document.getElementById('printPrice').value = 0 * 1;
		document.getElementById('mailRow1').className = 'rowOff'; 
		document.getElementById('mailRow2').className = 'rowOff'; 
		document.getElementById('mailRow3').className = 'rowOff'; 
		document.getElementById('mailRow4').className = 'rowOff'; 
	}
  }
}
*/
if(Product == "Jumbo Postcard 5.5 x 8.5" || Product == "Super Jumbo Postcard 6 x 11.5" || Product == "Standard Postcard 4.25 x 6"){
	if(Quantity != "Quantity" && Product != "Choose Product") {
		document.getElementById('mailPrice').value = mPrice.toFixed(2);
		document.getElementById('mailRow1').className = 'rowOn'; 
		} else {
		document.getElementById('mailPrice').value = 0 * 1;
		document.getElementById('postageRate').value = " ";
		document.getElementById('mailQuantity').value = "";
		document.getElementById('printPrice').value = 0 * 1;
		document.getElementById('mailRow1').className = 'rowOff'; 
		document.getElementById('mailRow2').className = 'rowOff'; 
		document.getElementById('mailRow3').className = 'rowOff'; 
		document.getElementById('mailRow4').className = 'rowOff'; 
		document.getElementById('shipRow').className = 'rowOff'; 
		document.getElementById('taxRow').className = 'rowOff'; 
		document.getElementById('taxRow2').className = 'rowOff'; 
		document.getElementById('taxRow3').className = 'rowOff'; 
		document.getElementById('stateTax').value = 0;
		}
	}
/* COMMLINK & MEMBERSHIP */
}

function subtotalPrice() {
var t_zip = document.NML_Order.t_zip.value;
var b_zip = document.NML_Order.b_zip.value;
var NMLbutton = document.NML_Order.NMLbutton.value;
var pPrice = document.getElementById('printPrice').value * 1;
var tsPrice = document.getElementById('typesettingPrice').value * 1;
var mPrice = document.getElementById('mailPrice').value * 1;
var mLPrice = document.getElementById('mListPrice').value * 1;
var mailingListType = document.getElementById('mailingListType').value;
var iJPrice = document.getElementById('inkJetPrice').value * 1;

var addTabbing = document.getElementById('addTabbing').value;
var tabbingPrice = document.getElementById('tabbingPrice').value * 1;

var shipPrice = document.getElementById('shipPrice').value * 1;
var upsGround = document.getElementById('upsGround').value * 1;
var ups2DayAir = document.getElementById('ups2DayAir').value * 1;
var upsNextDayAir = document.getElementById('upsNextDayAir').value * 1;

var flatax = document.getElementById('flatax').value * 1;
var stateTax = document.getElementById('stateTax').value * 1;
var tPrice = 0;

var Product = document.NML_Order.myProduct.value;

var myQuantity = document.NML_Order.myQuantity.value;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
var uvPrice = document.NML_Order.uvPrice.value * 1;
var uvCoat = document.getElementsByName("uvCoating");
if(Product == "Business Card 2 x 3.5") {
	if(myQuantity >= 500) {
	document.getElementById('ivCoat01').className = 'rowOn'; 
	document.getElementById('uvCoating2L').className = 'showUV2'; 
	document.getElementById('uvCoating2').className = 'showUV2'; 
	for (var x = 2; x < uvCoat.length; x ++) {
		if(uvCoat[0].checked) { uvPrice = myQuantity * 0.02; }
		if(uvCoat[1].checked) { uvPrice = myQuantity * 0.03; }
		if(uvCoat[2].checked) { uvPrice = 0.00 * 1; }
	document.getElementById('uvPrice').value = uvPrice.toFixed(2);
		}
	} else {
	document.getElementById('uvCoating3').checked=true;
	document.getElementById('uvPrice').value = 0 * 1;
	document.getElementById('ivCoat01').className = 'rowOff';
	}
}
if(Product == "Standard Postcard 4.25 x 6") {
 if(myQuantity >= 1) { 
	document.getElementById('ivCoat01').className = 'rowOn';
	document.getElementById('uvCoating2L').className = 'showUV2'; 
	document.getElementById('uvCoating2').className = 'showUV2'; 
	for (var x = 2; x < uvCoat.length; x ++) {
		if(uvCoat[0].checked) { uvPrice = myQuantity * 0.02; }
		if(uvCoat[1].checked) { uvPrice = myQuantity * 0.03; }
		if(uvCoat[2].checked) { uvPrice = 0.00 * 1; }
	document.getElementById('uvPrice').value = uvPrice.toFixed(2);
		if(uvPrice <= 9.99 && uvPrice > 0) { 
			uvPrice = 10.00;
			document.getElementById('uvPrice').value = uvPrice.toFixed(2); }
		}
	} else {
	document.getElementById('uvCoating3').checked=true;
	document.getElementById('uvPrice').value = 0 * 1;
	document.getElementById('ivCoat01').className = 'rowOff';
	}
}
if(Product == "Jumbo Postcard 5.5 x 8.5") {
 if(myQuantity >= 1) { 
	document.getElementById('ivCoat01').className = 'rowOn';
	document.getElementById('uvCoating2L').className = 'showUV2'; 
	document.getElementById('uvCoating2').className = 'showUV2'; 
	for (var x = 2; x < uvCoat.length; x ++) {
		if(uvCoat[0].checked) { uvPrice = myQuantity * 0.03; }
		if(uvCoat[1].checked) { uvPrice = myQuantity * 0.04; }
		if(uvCoat[2].checked) { uvPrice = 0.00 * 1; }
	document.getElementById('uvPrice').value = uvPrice.toFixed(2);
		if(uvPrice <= 9.99 && uvPrice > 0) { 
			uvPrice = 10.00;
			document.getElementById('uvPrice').value = uvPrice.toFixed(2); }
		}
	} else {
	document.getElementById('uvCoating3').checked=true;
	document.getElementById('uvPrice').value = 0 * 1;
	document.getElementById('ivCoat01').className = 'rowOff';
	}
}
if(Product == "Super Jumbo Postcard 6 x 11.5") {
 if(myQuantity >= 1) { 
	document.getElementById('ivCoat01').className = 'rowOn';
	document.getElementById('uvCoating2L').className = 'showUV2'; 
	document.getElementById('uvCoating2').className = 'showUV2'; 
	for (var x = 2; x < uvCoat.length; x ++) {
		if(uvCoat[0].checked) { uvPrice = myQuantity * 0.03; }
		if(uvCoat[1].checked) { uvPrice = myQuantity * 0.04; }
		if(uvCoat[2].checked) { uvPrice = 0.00 * 1; }
	document.getElementById('uvPrice').value = uvPrice.toFixed(2);
		if(uvPrice <= 9.99 && uvPrice > 0) { 
			uvPrice = 10.00;
			document.getElementById('uvPrice').value = uvPrice.toFixed(2); }
		}
	} else {
	document.getElementById('uvCoating3').checked=true;
	document.getElementById('uvPrice').value = 0 * 1;
	document.getElementById('ivCoat01').className = 'rowOff';
	}
}
if(Product == "Rack Card 4 x 9") {
 if(myQuantity >= 1) { 
	document.getElementById('ivCoat01').className = 'rowOn';
	document.getElementById('uvCoating2L').className = 'showUV2'; 
	document.getElementById('uvCoating2').className = 'showUV2'; 
	for (var x = 2; x < uvCoat.length; x ++) {
		if(uvCoat[0].checked) { uvPrice = myQuantity * 0.03; }
		if(uvCoat[1].checked) { uvPrice = myQuantity * 0.04; }
		if(uvCoat[2].checked) { uvPrice = 0.00 * 1; }
	document.getElementById('uvPrice').value = uvPrice.toFixed(2);
		if(uvPrice <= 9.99 && uvPrice > 0) { 
			uvPrice = 10.00;
			document.getElementById('uvPrice').value = uvPrice.toFixed(2); }
		}
	} else {
	document.getElementById('uvCoating3').checked=true;
	document.getElementById('uvPrice').value = 0 * 1;
	document.getElementById('ivCoat01').className = 'rowOff';
	}
}
var stock = document.NML_Order.myFormat.value;
if(Product == "Flyer"){
 if(stock != "4/0 on 80# Gloss Text") {
 	if(myQuantity >= 1) { 
	document.getElementById('ivCoat01').className = 'rowOn';
	document.getElementById('uvCoating2L').className = 'showUV2'; 
	document.getElementById('uvCoating2').className = 'showUV2'; 
		for (var x = 2; x < uvCoat.length; x ++) {
		if(uvCoat[0].checked) { uvPrice = myQuantity * 0.04; }
		if(uvCoat[1].checked) { uvPrice = myQuantity * 0.06; }
		if(uvCoat[2].checked) { uvPrice = 0.00 * 1; }
		document.getElementById('uvPrice').value = uvPrice.toFixed(2);
		if(uvPrice <= 9.99 && uvPrice > 0) { 
			uvPrice = 10.00;
			document.getElementById('uvPrice').value = uvPrice.toFixed(2); }
		}
	}
	} else {
	document.getElementById('uvCoating3').checked=true;
	document.getElementById('uvPrice').value = 0 * 1;
	document.getElementById('ivCoat01').className = 'rowOff';
 }
}
if(Product == "Four Page Brochure 11 x 17"){
 if(stock != "4/0 on 80# Gloss Text") {
 	if(myQuantity >= 1) { 
	document.getElementById('ivCoat01').className = 'rowOn';
	document.getElementById('uvCoating2L').className = 'showUV2'; 
	document.getElementById('uvCoating2').className = 'showUV2'; 
		for (var x = 2; x < uvCoat.length; x ++) {
		if(uvCoat[0].checked) { uvPrice = myQuantity * 0.05; }
		if(uvCoat[1].checked) { uvPrice = myQuantity * 0.07; }
		if(uvCoat[2].checked) { uvPrice = 0.00 * 1; }
		document.getElementById('uvPrice').value = uvPrice.toFixed(2);
		if(uvPrice <= 9.99 && uvPrice > 0) { 
			uvPrice = 10.00;
			document.getElementById('uvPrice').value = uvPrice.toFixed(2); }
		}
	}
	} else {
	document.getElementById('uvCoating3').checked=true;
	document.getElementById('uvPrice').value = 0 * 1;
	document.getElementById('ivCoat01').className = 'rowOff';
 }
}
if(uvCoat[2].checked) { uvPrice = 0.00 * 1; }




var subtotal = 0;
var noTaxTotal = document.NML_Order.noTaxTotal.value;
var mailQuantity = document.NML_Order.mailQuantity.value;
var iJPrice = 0;
if(Product == "Jumbo Postcard 5.5 x 8.5" || Product == "Super Jumbo Postcard 6 x 11.5" || Product == "Standard Postcard 4.25 x 6") { 
	if(mailQuantity >= 1 && mailQuantity <= 312) { iJPrice = 25; }
	if(mailQuantity >= 313 && mailQuantity <= 2000) { iJPrice = mailQuantity * .08; }
	if(mailQuantity >= 2001 && mailQuantity <= 5000) { iJPrice = mailQuantity * .07; }
	if(mailQuantity >= 5001 && mailQuantity <= 1000) { iJPrice = mailQuantity * .06; }
	if(mailQuantity >= 10001 && mailQuantity <= 25000) { iJPrice = mailQuantity * .05; }
	if(mailQuantity >= 25000) { iJPrice = mailQuantity * .04; }
document.getElementById('inkJetPrice').value = iJPrice.toFixed(2);
}

var mQty = document.NML_Order.mailQuantity.value;
var tabPrice = 0;
var tQty;
if(Product == "Jumbo Postcard 5.5 x 8.5" || Product == "Super Jumbo Postcard 6 x 11.5" || Product == "Standard Postcard 4.25 x 6") {
	if(mailingListType == "Using My Mailing List") { mLPrice = 0; }
	if(mailingListType == "NML Tax List") { mLPrice = mailQuantity * .03; 
		if(mLPrice < 25) { mLPrice = 25; }
	}
	if(mailingListType == "NML Medical List") { mLPrice = mailQuantity * .05; 
		if(mLPrice < 50) { mLPrice = 50; }
	}
	if(mailingListType == "NML Lawyer List") { mLPrice = mailQuantity * .05; 
		if(mLPrice < 50) { mLPrice = 50; }
	}
	if(mailingListType == "Consumer List") { mLPrice = mailQuantity * .05; 
		if(mLPrice < 75) { mLPrice = 75; }
	}
	if(mailingListType == "Business List") { mLPrice = mailQuantity * .10; 
		if(mLPrice < 100) { mLPrice = 100; }
	}
document.getElementById('mListPrice').value = mLPrice.toFixed(2);
}

var typeset = document.getElementsByName("AddTypesetting");
	      for (var x = 0; x < typeset.length; x ++) {
	        if (typeset[x].checked) { tsPrice = 25.00 * 1; } else { tsPrice = 0.00 * 1; }
}
document.getElementById('typesettingPrice').value = tsPrice.toFixed(2);


var addups = document.getElementsByName("shipUPSbutton");
	      for (var x = 2; x < addups.length; x ++) {
	        if (addups[0].checked) { shipPrice = upsGround * 1; document.getElementById('shipMethod').value = "UPS Ground"; }
	        if (addups[1].checked) { shipPrice = ups2DayAir * 1; document.getElementById('shipMethod').value = "UPS 2nd Day Air"; }
	        if (addups[2].checked) { shipPrice = upsNextDayAir * 1; document.getElementById('shipMethod').value = "UPS Next Day Air"; }
		document.getElementById('shipPrice').value = shipPrice.toFixed(2);
}

var Shipping = document.NML_Order.Shipping.value;
	if(Shipping == "+") {
			shipPrice = 0.00;
			 document.getElementById('shipPrice').value = 0; 
}

if(NMLbutton == "GONML >") {
var shipWeight = document.NML_Order.shipWeight.value;
var t_zip = document.NML_Order.t_zip.value;
var Shipping = document.NML_Order.Shipping.value;
		if(flatax == 0) {
					if(shipPrice == 0 || shipPrice == "") { document.getElementById('shipPrice').value = 0; }
//					subtotal = pPrice + tsPrice + mPrice + iJPrice + tabPrice + mLPrice + bPrice + shipPrice;
					subtotal = pPrice + uvPrice + tsPrice + mPrice + iJPrice + tabPrice + mLPrice + shipPrice;
					document.getElementById('tPrice').value = 0;
					document.getElementById('noTaxTotal').value = subtotal.toFixed(2);
		} else {
					if(shipPrice == 0 || shipPrice == "") { document.getElementById('shipPrice').value = 0; }
//					stateTax = pPrice + tsPrice + iJPrice + tabPrice + mLPrice + bPrice + shipPrice;
					stateTax = pPrice + uvPrice + tsPrice + iJPrice + tabPrice + mLPrice + shipPrice;
					document.getElementById('stateTax').value = stateTax.toFixed(2);
					tPrice = flatax * stateTax;
					document.getElementById('tPrice').value = tPrice.toFixed(2);
//					subtotal = pPrice + tsPrice + mPrice + iJPrice + tabPrice + mLPrice + bPrice + shipPrice + tPrice;
					subtotal = pPrice + uvPrice + tsPrice + mPrice + iJPrice + tabPrice + mLPrice + shipPrice + tPrice;
					document.getElementById('noTaxTotal').value = subtotal.toFixed(2);
		}
	}
}

