//calculate the press pricefunction calc_press(formnum) {//set inputs neededvar finished = formnum.finished.value;var xup = formnum.xup.value;var press = formnum.press.value;var brand = formnum.brand.value;var weight = formnum.weight.value;var size = formnum.size.value;var businesscard = formnum.businesscard.checked;var heavy = formnum.heavy.checked;var work_turn = formnum.work_turn.checked;var cuts = formnum.cuts.checked;var converted = formnum.converted.checked;var totalside1 = formnum.finalside1.value;var totalside2 = formnum.totalside2.value;var pms = formnum.pms.value;var standard = formnum.standard.value;var metallic = formnum.metallic.value;var score =formnum.score.value;var fold = formnum.fold.value;var pads = formnum.pads.value;var paperprice = formnum.paperprice.value;var cover = formnum.cover.value;var main = 0;var booklet_pricing = 0;var numbering = 0;if(formnum.typeis.value.match("bookletinside")) {var numpages = formnum.numpages.value;}finished = finished*1;xup = xup*1;cover = cover*1;totalside1 = totalside1*1;totalside2 = totalside2*1;paperprice = paperprice*1;	//next is to get DI pricing correctif(totalside2 > totalside1) {	var sideholder = totalside1;	totalside1 = totalside2;	totalside2 = sideholder;}var pressprice = 0;var foldprice = 0;var convertprice = 0;var papertotal = 0;var presstotal = 0;var foldnum = 0;var foldtotal = 0;var scoretotal = 0;var padtotal = 0;var setuptotal = 0;var cuttotal = 0;var total = 0;var pressnum = 0;	  //for carbonless we multiply by the number of sheets	  if(weight == "2-Part") {	  finished = finished*2;	  }	  if(weight == "3-Part") {	   finished = finished*3;	  }	  if(weight == "4-Part") {	   finished = finished*4;	   }pressnum = finished/xup;if(formnum.typeis.value.match("notepads")) {	var padsper = 0;	if(formnum.pads.value.match("25 Sheet Pads")) {		padsper = 25;	}	if(formnum.pads.value.match("50 Sheet Pads")) {		padsper = 50;	}	if(formnum.pads.value.match("100 Sheet Pads")) {		padsper = 100;	}		pressnum = finished*padsper/xup}//Calcualte paper pricing before rounding pressnum - because paper price is liner and doesn't get rounded//Also must do before pressnum gets changed by work_turn//calculate paper costpapertotal = Math.ceil(pressnum*paperprice/1000);//above works because paperprice is linear - i also could've just used pressnum in papertotal calc, but i think i changed it so i avoided it for the calcif(pressnum <= 500) {papertotal = Math.ceil(pressnum*paperprice/1000);papertotal = Math.ceil(papertotal*1.25);}if(pressnum <= 250) {papertotal = Math.ceil(pressnum*paperprice/1000);papertotal = Math.ceil(papertotal*1.5);}if(pressnum >= 5000) {papertotal = Math.ceil(pressnum*paperprice/1000);papertotal = Math.ceil(papertotal*1.0);}if(press == "GTO"){papertotal = Math.ceil(papertotal*1.1);}//this paper pricing doesn't work for adhesive stocks - which pricing gets rounded to 100'sif(brand == "Adhesive Stocks"){//notice can't use pressnum, have to use orig calc for it//the over 10 comes because i mulitiplied by 10 to get per 1k in paperprice for adhesivepapertotal = Math.ceil(eval(finished/(xup*100)))*paperprice/10;}//pricing for business cards is different ********************************* start of BC pricing ********************************* if( businesscard ){if(brand.match("Gloss Coated - House") || brand.match("Cougar Bright White")){//$8 per 500 on one of these paperspapertotal = Math.ceil(finished/500)*8;//but only $6 if 80# cougar whiteif(weight == "80# Cover" && brand.match("Cougar Bright White") && formnum.papercolor.value.match("White")){papertotal = Math.ceil(finished/500)*6;}if(weight == "130# Cover" && brand.match("Cougar Bright White")) {papertotal = Math.ceil(finished/500)*15;}}else if(pressnum > 250) {// these are special papers - so for $8 per 500 for this many press sheetspapertotal = Math.ceil(finished/500)*8;//notice special papers under 250 press sheets the pricing doesn't changeif (brand.match("Kallima C1S Cover") || brand.match("Cougar Bright White") || brand.match("Classic Linen") || brand.match("Classic Crest") || brand.match("Royal Fiber") || brand.match("Genesis") ){papertotal = Math.ceil(finished/500)*12;if (brand.match("Classic Crest") && weight.match("110# Cover")) {papertotal = Math.ceil(finished/500)*15;}}}}// end of BC pricing ********* end of BC pricing *******	//work and turn	if(work_turn) {		pressnum = pressnum*2;		totalside2 = 0;	}	  if (pressnum <= 250) {	  pressnum = 250;	  }	  else if (pressnum <=500) {	  pressnum = 500;	  }	  else if (pressnum <=1000) {	  pressnum = 1000;	  }	  else if (pressnum <=1500) {	  pressnum = 1500;	  }	  else if (pressnum <=2000) {	  pressnum = 2000;	  }	  else if (pressnum <=2500) {	  pressnum = 2500;	  }	  else if (pressnum <=3000) {	  pressnum = 3000;	  }	  else if (pressnum <=3500) {	  pressnum = 3500;	  }	  else if (pressnum <=4000) {	  pressnum = 4000;	  }	  else if (pressnum <=4500) {	  pressnum = 4500;	  }	  else if (pressnum <=5000) {	  pressnum = 5000;	  }	   else if (pressnum <=6000) {	  pressnum = 6000;	  }	   else if (pressnum <=7000) {	  pressnum = 7000;	  }	   else if (pressnum <=8000) {	  pressnum = 8000;	  }	   else if (pressnum <=9000) {	  pressnum = 9000;	  }	   else if (pressnum <=10000) {	  pressnum = 10000;	  }	  else if (pressnum <=12000) {	  pressnum = 12000;	  }	  else if (pressnum <=14000) {	  pressnum = 14000;	  }	  else if (pressnum <=15000) {	  pressnum = 15000;	  }	  else if (pressnum <=16000) {	  pressnum = 16000;	  }	  else if (pressnum <=18000) {	  pressnum = 18000;	  }	   else if (pressnum <=20000) {	  pressnum = 20000;	  }if (press == "AB DICK"){	if(pressnum > 20000) {	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy))) {	pressprice = Math.ceil(14*pressnum/1000);	}	else {	pressprice = Math.ceil(21*pressnum/1000);	}	}switch(pressnum) {	case 250:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 25;	}	else 	{	pressprice = 35;	}	break;	case 500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 30;	}	else 	{	pressprice = 44;	}	break;	case 1000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 36;	}	else 	{	pressprice = 50;	}	break;	case 1500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 45;	}	else 	{	pressprice = 63;	}	break;	case 2000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 58;	}	else 	{	pressprice = 81;	}	break;	case 2500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 70;	}	else 	{	pressprice = 98;	}	break;	case 3000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 81;	}	else 	{	pressprice = 114;	}	break;	case 3500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 87;	}	else 	{	pressprice = 121;	}	break;	case 4000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 91;	}	else 	{	pressprice = 128;	}	break;	case 4500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 96;	}	else 	{	pressprice = 134;	}	break;	case 5000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 100;	}	else 	{	pressprice = 140;	}	break;	case 6000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 114;	}	else 	{	pressprice = 162;	}	break;	case 7000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 126;	}	else 	{	pressprice = 182;	}	break;	case 8000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 136;	}	else 	{	pressprice = 200;	}	break;	case 9000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 145;	}	else 	{	pressprice = 216;	}	break;	case 10000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 150;	}	else 	{	pressprice = 230;	}	break;		case 12000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 180;	}	else 	{	pressprice = 276;	}	break;		case 14000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 210;	}	else 	{	pressprice = 322;	}	break;	case 15000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 225;	}	else 	{	pressprice = 345;	}	break;			case 16000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 240;	}	else 	{	pressprice = 368;	}	break;		case 18000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 270;	}	else 	{	pressprice = 414;	}	break;	case 20000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 280;	}	else 	{	pressprice = 420;	}	break;	}}if (press == "GTO"){	if(pressnum > 20000) {	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy))) {	pressprice = Math.ceil(19*pressnum/1000);	}	else {	pressprice = Math.ceil(25*pressnum/1000);	}	}switch(pressnum) {	case 250:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 45;	}	else 	{	pressprice = 55;	}	break;	case 500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 45;	}	else 	{	pressprice = 55;	}	break;	case 1000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 55;	}	else 	{	pressprice = 65;	}	break;	case 1500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 65;	}	else 	{	pressprice = 80;	}	break;	case 2000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 75;	}	else 	{	pressprice = 90;	}	break;	case 2500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 85;	}	else 	{	pressprice = 105;	}	break;	case 3000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 93;	}	else 	{	pressprice = 118;	}	break;	case 3500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 101;	}	else 	{	pressprice = 130;	}	break;	case 4000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 109;	}	else 	{	pressprice = 143;	}	break;	case 4500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 117;	}	else 	{	pressprice = 154;	}	break;	case 5000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 125;	}	else 	{	pressprice = 165;	}	break;	case 6000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 140;	}	else 	{	pressprice = 185;	}	break;	case 7000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 154;	}	else 	{	pressprice = 203;	}	break;	case 8000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 167;	}	else 	{	pressprice = 220;	}	break;	case 9000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 178;	}	else 	{	pressprice = 236;	}	break;	case 10000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 190;	}	else 	{	pressprice = 250;	}	break;		case 12000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 228;	}	else 	{	pressprice = 300;	}	break;		case 14000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 266;	}	else 	{	pressprice = 350;	}	break;	case 15000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 285;	}	else 	{	pressprice = 375;	}	break;		case 16000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 304;	}	else 	{	pressprice = 400;	}	break;		case 18000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 342;	}	else 	{	pressprice = 450;	}	break;	case 20000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 380;	}	else 	{	pressprice = 500;	}	break;	}}if (press == "DI"){switch(totalside2){case 0:if(pressnum > 20000) {	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy))) {	pressprice = Math.ceil(45*pressnum/1000);	}	else {	pressprice = Math.ceil(54.5*pressnum/1000);	}}switch(pressnum) {	case 250:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 245;	}	else 	{	pressprice = 245;	}	break;	case 500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 245;	}	else 	{	pressprice = 300;	}	break;	case 1000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 300;	}	else 	{	pressprice = 430;	}	break;	case 1500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 350;	}	else 	{	pressprice = 471;	}	break;	case 2000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 393;	}	else 	{	pressprice = 511;	}	break;	case 2500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 425;	}	else 	{	pressprice = 550;	}	break;	case 3000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 454;	}	else 	{	pressprice = 600;	}	break;	case 3500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 480;	}	else 	{	pressprice = 643;	}	break;	case 4000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 505;	}	else 	{	pressprice = 685;	}	break;	case 4500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 528;	}	else 	{	pressprice = 720;	}	break;	case 5000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 550;	}	else 	{	pressprice = 750;	}	break;	case 6000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 600;	}	else 	{	pressprice = 784;	}	break;	case 7000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 643;	}	else 	{	pressprice = 816;	}	break;	case 8000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 685;	}	else 	{	pressprice = 846;	}	break;	case 9000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 720;	}	else 	{	pressprice = 874;	}	break;	case 10000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 750;	}	else 	{	pressprice = 900;	}	break;		case 12000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 786;	}	else 	{	pressprice = 940;	}	break;		case 14000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 825;	}	else 	{	pressprice = 985;	}	break;	case 15000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 840;	}	else 	{	pressprice = 1005;	}	break;		case 16000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 850;	}	else 	{	pressprice = 1020;	}	break;		case 18000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 875;	}	else 	{	pressprice = 1058;	}	break;	case 20000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 900;	}	else 	{	pressprice = 1090;	}	break;	}break;case 1:if(pressnum > 20000) {	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy))) {	pressprice = Math.ceil(58.25*pressnum/1000);	}	else {	pressprice = Math.ceil(67.5*pressnum/1000);	}}switch(pressnum) {	case 250:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 290;	}	else 	{	pressprice = 290;	}	break;	case 500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 290;	}	else 	{	pressprice = 360;	}	break;	case 1000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 350;	}	else 	{	pressprice = 440;	}	break;	case 1500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 405;	}	else 	{	pressprice = 515;	}	break;	case 2000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 453;	}	else 	{	pressprice = 585;	}	break;	case 2500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 495;	}	else 	{	pressprice = 650;	}	break;	case 3000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 535;	}	else 	{	pressprice = 695;	}	break;	case 3500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 568;	}	else 	{	pressprice = 738;	}	break;	case 4000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 600;	}	else 	{	pressprice = 773;	}	break;	case 4500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 627;	}	else 	{	pressprice = 798;	}	break;	case 5000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 650;	}	else 	{	pressprice = 825;	}	break;	case 6000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 705;	}	else 	{	pressprice = 888;	}	break;	case 7000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 755;	}	else 	{	pressprice = 945;	}	break;	case 8000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 795;	}	else 	{	pressprice = 995;	}	break;	case 9000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 837;	}	else 	{	pressprice = 1038;	}	break;	case 10000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 875;	}	else 	{	pressprice = 1075;	}	break;				case 12000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 955;	}	else 	{	pressprice = 1142;	}	break;		case 14000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1020;	}	else 	{	pressprice = 1210;	}	break;	case 15000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1050;	}	else 	{	pressprice = 1245;	}	break;				case 16000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1085;	}	else 	{	pressprice = 1266;	}	break;		case 18000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1132;	}	else 	{	pressprice = 1305;	}	break;	case 20000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1165;	}	else 	{	pressprice = 1350;	}	break;	}break;case 4:if(pressnum > 20000) {	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy))) {	pressprice = Math.ceil(86.75*pressnum/1000);	}	else {	pressprice = Math.ceil(95*pressnum/1000);	}}switch(pressnum) {	case 250:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 440;	}	else 	{	pressprice = 440;	}	break;	case 500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 440;	}	else 	{	pressprice = 540;	}	break;	case 1000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 520;	}	else 	{	pressprice = 735;	}	break;	case 1500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 590;	}	else 	{	pressprice = 830;	}	break;	case 2000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 655;	}	else 	{	pressprice = 915;	}	break;	case 2500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 715;	}	else 	{	pressprice = 990;	}	break;	case 3000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 770;	}	else 	{	pressprice = 1075;	}	break;	case 3500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 820;	}	else 	{	pressprice = 1153;	}	break;	case 4000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 866;	}	else 	{	pressprice = 1225;	}	break;	case 4500:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 908;	}	else 	{	pressprice = 1290;	}	break;	case 5000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 950;	}	else 	{	pressprice = 1350;	}	break;	case 6000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1025;	}	else 	{	pressprice = 1405;	}	break;	case 7000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1097;	}	else 	{	pressprice = 1458;	}	break;	case 8000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1166;	}	else 	{	pressprice = 1505;	}	break;	case 9000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1235;	}	else 	{	pressprice = 1552;	}	break;	case 10000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1300;	}	else 	{	pressprice = 1600;	}	break;		case 12000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1400;	}	else 	{	pressprice = 1666;	}	break;		case 14000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1500;	}	else 	{	pressprice = 1732;	}	break;	case 15000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1550;	}	else 	{	pressprice = 1765;	}	break;		case 16000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1590;	}	else 	{	pressprice = 1800;	}	break;		case 18000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1665;	}	else 	{	pressprice = 1855;	}	break;	case 20000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	pressprice = 1735;	}	else 	{	pressprice = 1900;	}	break;	}break;}}//calculate press pricing.presstotal = pressprice*totalside1 + pressprice*totalside2;if (press == "DI"){	presstotal = pressprice;}//booklet pricing for the press is differentif(formnum.typeis.value.match("bookletinside")) {	if(formnum.totalside1.value.match("full color")) {	booklet_price(formnum.numpages.value, formnum.quantity.value, formnum)			booklet_making(formnum.numpages.value, formnum.quantity.value, formnum)	}	if(formnum.totalside1.value.match("black")) {	booklet_price_black(formnum.numpages.value, formnum.quantity.value, formnum)	booklet_making(formnum.numpages.value, formnum.quantity.value, formnum)	}	if(formnum.totalside1.value.match("mixed")) {		booklet_price(formnum.numpages.value, formnum.quantity.value, formnum)		var coverprice = formnum.presstotal.value;		coverprice = coverprice*4/numpages;		booklet_price_black(formnum.numpages.value, formnum.quantity.value, formnum)		booklet_making(formnum.numpages.value, formnum.quantity.value, formnum)	}	var pressprice = formnum.presstotal.value;	presstotal = pressprice;	var booklet_pricing = formnum.booklet.value;	if(formnum.totalside1.value.match("mixed")) {	pressprice = pressprice*(numpages-4)/numpages;	presstotal = Math.ceil(pressprice+coverprice);	formnum.presstotal.value = presstotal;	}}// end of presspricing// end of presspricing// *******************// *******************// end of presspricing// end of presspricing// round finished 	  if (finished <= 250) {	  finished = 250;	  }	  else if (finished <=500) {	  finished = 500;	  }	  else if (finished <=1000) {	  finished = 1000;	  }	  else if (finished <=1500) {	  finished = 1500;	  }	  else if (finished <=2000) {	  finished = 2000;	  }	  else if (finished <=2500) {	  finished = 2500;	  }	  else if (finished <=3000) {	  finished = 3000;	  }	  else if (finished <=3500) {	  finished = 3500;	  }	  else if (finished <=4000) {	  finished = 4000;	  }	  else if (finished <=4500) {	  finished = 4500;	  }	  else if (finished <=5000) {	  finished = 5000;	  }	   else if (finished <=6000) {	  finished = 6000;	  }	   else if (finished <=7000) {	  finished = 7000;	  }	   else if (finished <=8000) {	  finished = 8000;	  }	   else if (finished <=9000) {	  finished = 9000;	  }	   else if (finished <=10000) {	  finished = 10000;	  }	  else if (finished <=12000) {	  finished = 12000;	  }	  else if (finished <=14000) {	  finished = 14000;	  }	  else if (finished <=15000) {	  finished = 15000;	  }	  else if (finished <=16000) {	  finished = 16000;	  }	  else if (finished <=18000) {	  finished = 18000;	  }	   else if (finished <=20000) {	  finished = 20000;	  }	  	  	  //scoring uses same pricing as ab-dickscore = eval(score);if (score !=0) {switch(pressnum) {	case 250:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 25;	}	else 	{	scoretotal = 35;	}	break;	case 500:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 30;	}	else 	{	scoretotal = 44;	}	break;	case 1000:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 36;	}	else 	{	scoretotal = 50;	}	break;	case 1500:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 45;	}	else 	{	scoretotal = 63;	}	break;	case 2000:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 58;	}	else 	{	scoretotal = 81;	}	break;	case 2500:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 70;	}	else 	{	scoretotal = 98;	}	break;	case 3000:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 81;	}	else 	{	scoretotal = 114;	}	break;	case 3500:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 87;	}	else 	{	scoretotal = 121;	}	break;	case 4000:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 91;	}	else 	{	scoretotal = 128;	}	break;	case 4500:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 96;	}	else 	{	scoretotal = 134;	}	break;	case 5000:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 100;	}	else 	{	scoretotal = 140;	}	break;	case 6000:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 114;	}	else 	{	scoretotal = 162;	}	break;	case 7000:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 126;	}	else 	{	scoretotal = 182;	}	break;	case 8000:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 136;	}	else 	{	scoretotal = 200;	}	break;	case 9000:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 145;	}	else 	{	scoretotal = 216;	}	break;	case 10000:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 150;	}	else 	{	scoretotal = 230;	}	break;	case 12000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	scoretotal = 180;	}	else 	{	scoretotal = 276;	}	break;		case 14000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	scoretotal = 210;	}	else 	{	scoretotal = 322;	}	break;	case 15000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	scoretotal = 225;	}	else 	{	scoretotal = 345;	}	break;			case 16000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	scoretotal = 240;	}	else 	{	scoretotal = 368;	}	break;		case 18000:	if( size == "8.5 x 11"  || size ==  "9 x 12" || (size == "8.5 x 14" && !(heavy)))	{	scoretotal = 270;	}	else 	{	scoretotal = 414;	}	break;	case 20000:	if( (size== "8.5 x 11") || (size== "9 x 12") || ((size== "8.5 x 14")&& (!heavy)))	{	scoretotal = 280;	}	else 	{	scoretotal = 420;	}	break;	}		scoretotal = scoretotal*eval(score);	}//to get pricing for folds and envelopesif (fold != "None" || converted) {switch(finished){case 250:foldprice = 12;convertprice = 23;break;case 500:foldprice = 12;convertprice = 44;break;case 1000:foldprice = 19;convertprice = 89;break;case 1500:foldprice = 28;convertprice = 132;break;case 2000:foldprice = 34;convertprice = 141;break;case 2500:foldprice = 42;convertprice = 164;break;case 3000:foldprice = 49;convertprice = 185;break;case 3500:foldprice = 57;convertprice = 216;break;case 4000:foldprice = 64;convertprice = 228;break;case 4500:foldprice = 70;convertprice = 257;break;case 5000:foldprice = 76;convertprice = 270;break;case 6000:foldprice = 89;convertprice = 309;break;case 7000:foldprice = 102;convertprice = 360;break;case 8000:foldprice = 115;convertprice = 362;break;case 9000:foldprice = 128;convertprice = 405;break;case 10000:foldprice = 140;convertprice = 417;break;case 12000:foldprice = 168;convertprice = 501;break;case 14000:foldprice = 196;convertprice = 584;break;case 15000:foldprice = 210;convertprice = 542;break;case 16000:foldprice = 214;convertprice = 575;break;case 18000:foldprice = 252;convertprice = 650;break;case 20000:foldprice = 280;convertprice = 651;break;}}if(finished > 20000) {	foldprice = Math.ceil(14*finished/1000);if(finished < 25000) {	convertprice = Math.ceil(21.70*finished/1000);}if(finished < 50000) {	convertprice = Math.ceil(18.2*finished/1000);}if(finished < 100000) {	convertprice = Math.ceil(16.21*finished/1000);}if(finished >= 100000) {	convertprice = Math.ceil(13.17*finished/1000);}}if(formnum.typeis.value.match("form")) {if (formnum.numbering.checked){	if(pressnum > 20000) {	numbering = Math.ceil(19*pressnum/1000);	}switch(pressnum) {	case 250:	numbering = 45;	break;	case 500:	numbering = 45;	break;	case 1000:	numbering = 55;	break;	case 1500:	numbering = 65;	break;	case 2000:	numbering = 75;	break;	case 2500:	numbering = 85;	break;	case 3000:	numbering = 93;	break;	case 3500:	numbering = 101;	break;	case 4000:	numbering = 109;	break;	case 4500:	numbering = 117;	break;	case 5000:	numbering = 125;	break;	case 6000:	numbering = 140;	break;	case 7000:	numbering = 154;	break;	case 8000:	numbering = 167;	break;	case 9000:	numbering = 178;	break;	case 10000:	numbering = 190;	break;		case 12000:	numbering = 228;	break;		case 14000:	numbering = 266;	break;	case 15000:	numbering = 285;	break;		case 16000:	numbering = 304;	break;		case 18000:	numbering = 342;	break;	case 20000:	numbering = 380;	break;	}}}//determine fold numberswitch(fold){case "Letter":foldnum = 1;break;case "Fan":foldnum = 1;break;case "Double Parallel":foldnum = 1;break;case "Single":foldnum = 1;break;case "French":foldnum = 2;break;case "Accordian":foldnum = 2;break;case "Map":foldnum = 2;break;case "Double Letter":foldnum = 2;break;case "Gate":foldnum = 2;break;case "None":foldnum = 0;break;}foldtotal = foldprice*foldnum;// lets make some padsif (pads != "None") {switch(pads){case "25 Sheet Pads":padtotal =Math.ceil(finished/25)*.25;break;case "50 Sheet Pads":padtotal =Math.ceil(finished/50)*.25;break;case "100 Sheet Pads":padtotal =Math.ceil(finished/100)*.35;break;case "Carbonless":padtotal =Math.ceil(finished/100)*.25;// $10 minimum charge on padding carbonlessif(padtotal <= 10) {padtotal = 10;}break;}}//price setup totalspms = eval(pms);standard = eval(standard);metallic = eval(metallic);if (pms != 0 || standard != 0 || metallic !=0) {setuptotal = Math.ceil(pms*28+standard*22+metallic*33);if (press == "DI") {	setuptotal = 0;}}// cuttotalif(cuts) {cuttotal = Math.ceil((finished/xup)/cover)*xup*4*.6;if (businesscard){cuttotal = Math.ceil(finished/500)*3;}}if (!converted) {	convertprice = 0;}//change papertotal for lh and notepads if bleed on certain papersif(formnum.typeis.value.match("lh") || formnum.typeis.value.match("notepads")) {	if(formnum.brand.value.match("Exact Color Offset") || formnum.brand.value.match("Classic Crest") || formnum.brand.value.match("Classic Linen") || formnum.brand.value.match("Royal Fiber") || formnum.brand.value.match("Genesis")) {		if(formnum.bleed.value.match("bleed")) {		papertotal = papertotal*1.4;		}	}}if(formnum.typeis.value.match("bookletinside")) {	var numpages=formnum.numpages.value;	papertotal = papertotal*numpages/4;	formnum.papertotal.value = papertotal;	}total = Math.ceil(setuptotal*1 + papertotal*1 + presstotal*1 + cuttotal*1 + foldtotal*1 + convertprice*1 + scoretotal*1 + padtotal*1 + booklet_pricing*1+numbering*1);var side1set1 = 1;var side1set2 = 1;var side2set1 = 1;var side2set2 = 1;var weightset = 0;var colorset = 0;// check side 1 first colorif(formnum.totalside1.value.match("1")) {	side1set2 = 1;	if(formnum.side1color1.value.match("Select Color")) {		side1set1 = 0;	}	if(formnum.side1color1.value.match("Pantone Match")) {		if(formnum.side1pms1.value.match("Enter PMS")) {			side1set1 = 0;		}		else {			side1set1 = 1;		}	}	if(!formnum.side1color1.value.match("Pantone Match") && !formnum.side1color1.value.match("Select Color")) {		side1set1 = 1;	}}// if two colorsif(formnum.totalside1.value.match("2")) {	if(formnum.side1color1.value.match("Select Color")) {		side1set1 = 0;	}	if(formnum.side1color1.value.match("Pantone Match")) {		if(formnum.side1pms1.value.match("Enter PMS")) {			side1set1 = 0;		}		else {			side1set1 = 1;		}	}	if(!formnum.side1color1.value.match("Pantone Match") && !formnum.side1color1.value.match("Select Color")) {		side1set1 = 1;	}//side 1 second color	if(formnum.side1color2.value.match("Select Color")) {		side1set2 = 0;	}	if(formnum.side1color2.value.match("Pantone Match")) {		if(formnum.side1pms2.value.match("Enter PMS")) {			side1set2 = 0;		}		else {			side1set2 = 1;		}	}	if(!formnum.side1color2.value.match("Pantone Match") && !formnum.side1color2.value.match("Select Color")) {		side1set2 = 1;	}}// check side 2 first colorif(formnum.totalside2.value.match("1")) {		side2set2 = 1;	if(formnum.side2color1.value.match("Select Color")) {		side2set1 = 0;	}	if(formnum.side2color1.value.match("Pantone Match")) {		if(formnum.side2pms1.value.match("Enter PMS")) {			side2set1 = 0;		}		else {			side2set1 = 1;		}	}	if(!formnum.side2color1.value.match("Pantone Match") && !formnum.side2color1.value.match("Select Color")) {		side2set1 = 1;	}}// if two colorsif(formnum.totalside2.value.match("2")) {	if(formnum.side2color1.value.match("Select Color")) {		side2set1 = 0;	}	if(formnum.side2color1.value.match("Pantone Match")) {		if(formnum.side2pms1.value.match("Enter PMS")) {			side2set1 = 0;		}		else {			side2set1 = 1;		}	}	if(!formnum.side2color1.value.match("Pantone Match") && !formnum.side2color1.value.match("Select Color")) {		side2set1 = 1;	}//side 1 second color	if(formnum.side2color2.value.match("Select Color")) {		side2set2 = 0;	}	if(formnum.side2color2.value.match("Pantone Match")) {		if(formnum.side2pms2.value.match("Enter PMS")) {			side2set2 = 0;		}		else {			side2set2 = 1;		}	}	if(!formnum.side2color2.value.match("Pantone Match") && !formnum.side2color2.value.match("Select Color")) {		side2set2 = 1;	}}if(!formnum.weight.value.match("Select Weight")) {	weightset = 1;}if(!formnum.papercolor.value.match("Select Color")) {	colorset = 1;}if(formnum.names.value > 10) {	side1set1 = 0;}if(side1set1 == 1 && side1set2 == 1 && side2set1 == 1 && side2set2 == 1 && weightset == 1 && colorset == 1) {	formnum.total.value = total;}else {	formnum.total.value = "- -";}if(isNaN(total)) {	formnum.total.value = "- -";}}