// JavaScript Documentfunction directmail(form) {var quantity = form.quantity.value;var type =	form.type.value;var size = form.size.value;var location = form.location.value;var nonprofit = form.nonprofit.value;var barcode = form.barcode.value;var insert = form.insert.value;var mailingrate = 0;var barcoderate = 0;var insertrate = 0;//Non profits firstif (nonprofit.match("yes")) {	//break by loction	if(location.match("city")) {		//now by size				if(size.match("small")) {			mailingrate = .127;		}				else {			mailingrate = .212;		}	}	else if(location.match("state")) {		//now by size				if(size.match("small")) {			mailingrate = .142;		}				else {			mailingrate = .269;		}	}	else if(location.match("usa")) {		//now by size				if(size.match("small")) {			mailingrate = .161;		}				else {			mailingrate = .354;		}	}	else {		mailingrate = 0;	}}//Now for standard if (nonprofit.match("no")) {	//break by loction	if(location.match("city")) {		//now by size				if(size.match("small")) {			mailingrate = .218;		}				else {			mailingrate = .335;		}	}	else if(location.match("state")) {		//now by size				if(size.match("small")) {			mailingrate = .233;		}				else {			mailingrate = .392;		}	}	else if(location.match("usa")) {		//now by size				if(size.match("small")) {			mailingrate = .252;		}				else {			mailingrate = .477;		}	}	else {		mailingrate = 0;	}}//imprint, barcode, etc if(barcode.match("yes")) {	if(type.match("postcard")) {		barcoderate = .06;	}	else {		barcoderate = .08;	}}else {	barcoderate = 0;}//insertif(insert.match("0")) {	insertrate = 0;}else if(insert.match("1")) {	insertrate = 0.05;}else if(insert.match("2")) {	insertrate = 0.075;}else if(insert.match("3")) {	insertrate = 0.085;}else if(insert.match("4")) {	insertrate = 0.1;}else {		insertrate = 0;}//totalvar sorttotal = quantity*(barcoderate + insertrate);var mailtotal = quantity*mailingrate;if(sorttotal.toFixed) {sorttotal = sorttotal.toFixed(2);mailtotal = mailtotal.toFixed(2);}if(sorttotal.toPrecision) {sorttotal = sorttotal.toPrecision(4);mailtotal = mailtotal.toPrecision(4);}	    if (document.getElementById) {		document.getElementById("sortprice").innerHTML = '<br><h2>$' + sorttotal + '</h2>';		document.getElementById("mailprice").innerHTML = '<h2>$' + mailtotal + '</h2>';	}	else if(document.all) {		document.all["sortprice"].innerHTML = '<br><h2>$' + sorttotal + '</h2>';		document.all["mailprice"].innerHTML = '<h2>$' + mailtotal + '</h2>';		}}