

   var columnSize=              "15%";
   var titleColumnSize=         "30%";
   
   var beginRow=                1;
   var dataCell=                2;
   var endRow=                  3;
   var closeRowCloseTable=      4;
   var openRowCloseRow=         5;  
   var openRowCloseR_CloseT=    6;
//  var top                    = 7;
//   var middle                 = 8;
//   var bottom                 = 9;


function price(cost) {
   var price = new Array();
      
   price['1003']=".03";
   price['1005']=".05";
   price['1007']=".07";
   price['1008']=".08";
   price[1010]=".10";
   price[1014]=".14";
   price[1040]=".40";
   price[1050]=".50";
   price[1055]=".55";
   price[1062]=".62";
   price[1075]=".75";
   price[1079]=".79";
   price[1080]=".80";
   price[1089]=".89";
   price[1090]=".90";
   price[1140]="1.40";
   price[1750]="7.50";
   
   price[0]="0.00";
   price[3]="3.00";
   price[5]="5.00";
   price[7]="7.00";
   price[9]="9.00";
   price[10]="10.00";
   price[13]="13.00";
   price[15]="15.00";
   price[17]="17.00";
   price[22]="22.00";
   price[30]="30.00";
   price[33]="33.00";
   price[35]="35.00";
   price[38]="38.00";
   price[40]="40.00";
   price[43]="43.00";
   price[45]="45.00";
   price[49]="49.00";
   price[49.5]="49.50";
   price[50]="50.00";
   price[55]="55.00";
   price[60]="60.00";
   price[68]="68.00";
   price[69]="69.00";
   price[69.5]="69.50";
   price[70]="70.00";
   price[75]="75.00";
   price[79]="79.00";
   price[85]="85.00";
   price[89]="89.00";
   price[90]="90.00";
   price[95]="95.00";
   price[100]="100.00";
   price[108]="108.00";
   price[110]="110.00";
   price[119]="119.00";
   price[120]="120.00";
   price[140]="140.00";
   price[145]="145.00";
   price[169]="169.00";
   price[180]="180.00";
   price[189]="189.00";
   price[200]="200.00";
   price[222]="222.00";
   price[239]="239.00";
   price[289]="289.00";
   price[339]="339.00";
   price[340]="340.00";
   price[350]="340.00";
   price[459]="459.00";
   price[489]="489.00";
   price[668]="668.00";
   
   return price[cost];
}


function printPrice(cost){
   var temp= price(cost);
   var prettyPrice= "$" + temp;
   return prettyPrice;
}


function quantity(num){
   var quantity = new Array();
   
   quantity[1]="25";
   quantity[2]="50";
   quantity[3]="75";
   quantity[4]="100";
   quantity[5]="150";
   quantity[6]="200";
   quantity[7]="250";
   quantity[8]="300";
   quantity[9]="350";
   quantity[10]="400";
   quantity[11]="450";
   quantity[12]="500";
   quantity[13]="750";
   quantity[14]="1000";
   quantity[15]="Other";
  
   return quantity[num];
}


////////////////////////////////////////////////////////////////
///////////////////////// Order Forms //////////////////////////
////////////////////////////////////////////////////////////////

var A1 = new Array(40,68,108,162,227);
var A2 = new Array(22,33,49.5,80,115);
var B1 = new Array(45,89,162,222,389);
var B2 = new Array(79,119,189,339,489);
var B3 = new Array(89,140,222,372,668);
var B4 = new Array(41.5,80,146,198,350);  // black
var B5 = new Array(63,107,170,305,440);
var B6 = new Array(80,126,200,335,601);
var B7 = new Array(36,71,130,178,311);  // blank
var B8 = new Array(56,95,149,261,391);
var B9 = new Array(71,112,178,298,534);
var C1 = new Array(0,95,140,180);
var C2 = new Array(0,80.75,119,153);

var Action = new Array(A1,A2,B1,B2,B3,B4,B5,B6,B7,B8,B9,C1,C2);


var label= new Array("Change Catagory", "Stationery", "Business Cards", "Brochures", "Flyers", "Postcards", "Labels", "Forms/Internal Documents");
var catagory= new Array("Change Catagory", "OF_Letterhead.html", "OF_BusinessCards.html", "OF_Brochures.html", "OF_Flyers.html", "OF_Postcards.html", "OF_Labels.html", "OF_Forms.html");
var size= new Array("", "475", "350", "475", "300", "200", "300", "475");

function updatePr(obj) {
	var precision = 4;   
	var qty = obj.form.postcard_qt.options[obj.form.postcard_qt.selectedIndex].value;
	obj.form.orignal.value = parseFloat(qty);
	var cost = parseFloat(qty);
	cost += parseFloat(obj.form.special.value);
	if (cost >= 100){precision = 5;}
	obj.form.stItem.value = ("$" + cost.toPrecision(precision));
	//qty += obj.form.special.value;
	return shipping(obj, cost);
}

function calculatePr(obj){
	var precision = 4;
	var num = obj.form.orignal.value;
	var addnum = obj.form.shipPr.value;
	var additional = obj.form.special.value;
	var total = (parseFloat(num) + parseFloat(addnum) + parseFloat(additional));
	obj.form.amount.value = total;	
	if (total > 0){
		total += parseFloat(obj.form.shipping.value);
		if (total >= 100){precision = 5;}
	}
	obj.form.stTot.value = ("$" + total.toPrecision(precision));
}

function updateSelList(obj, add, num, id){
	if (add) {
		for (var i = 0; i < obj.form.elements['postcard_qt'].length; i++)
		{
			var orig = obj.form.elements['postcard_qt'].options[i].value;
			obj.form.elements['postcard_qt'].options[i].value = (parseFloat(num) + parseFloat(orig));
		}
		var orig = obj.form.orignal.value;
		obj.form.orignal.value = (parseFloat(num) + parseFloat(orig));
	}
	else {
		for (var i = 0; i < obj.form.elements['postcard_qt'].length; i++)
		{
			var orig = obj.form.elements['postcard_qt'].options[i].value;
			obj.form.elements['postcard_qt'].options[i].value = (parseFloat(orig) - parseFloat(num));
		}		
		var orig = obj.form.orignal.value;
		obj.form.orignal.value = parseFloat(orig) - parseFloat(num);
	}	
	
}

function updateQuantity(obj, index, name)
{
	for (var i = 0; i < obj.form.elements[name].length; i++)
	{
		obj.form.elements[name].options[i].value = Action[index][i];
	}	
}

function updateB(obj, iBack, index) {
	obj.form.special.value = index;
	obj.form.back.value = iBack;
	updateStockNum(obj);
	endBasePrChg(obj);
}

function frontStyle(obj, takeAction){    

	updateQuantity(obj, takeAction,'postcard_qt');
	
 	if (!(obj.form.elements['fto'].value==1?true:false)){updateSelList(obj,true, 19, 'fto');}
	if (!(obj.form.elements['fb'].value==1?true:false)){updateSelList(obj,true, 10, 'fb');}
	
	endBasePrChg(obj);
}


function basePrChg(obj, name) {
	var index = obj.form.elements[name].options[obj.form.elements[name].selectedIndex].id;
	updateQuantity(obj, 'postcard_qt', index);
}

function endBasePrChg(obj){
	updatePr(obj);
	calculatePr(obj);	
}

function paperUp(obj, name){
	var index = obj.form.elements[name].options[obj.form.elements[name].selectedIndex].value;
	var spc = parseFloat(index).toPrecision(3);
	obj.form.paper.value = '$' + spc;
	obj.form.special.value = index;
	endBasePrChg(obj);
}

function adj(obj, num, id){    
	var takeAction = (obj.form.elements[id].value==1?true:false);	
	if (takeAction) {
		updateSelList(obj,true, num, id);
		obj.form.elements[id].value = 0;
	}
	else {
		updateSelList(obj, false, num, id);
		obj.form.elements[id].value = 1;
	}	
	calculatePr(obj);
	updatePr(obj);
}

function updateStockNum(obj){
	var str = obj.form.card.value;
	str += obj.form.up.value;
	str += obj.form.back.value;
	str += obj.form.prod.value;
	str += obj.form.file.value;	
	obj.form.item_number.value = str;
}

function loadForm(obj)
{
	var catagory = obj.form.selection.options[obj.form.selection.selectedIndex].label;
	var newpage = catagory + ".html";
	location.href=newpage;
}

function changeQt(id, type, obj){	 
	var updateTot = updatePr(obj);
	var index = obj.form.postcard_qt.options[obj.form.postcard_qt.selectedIndex].label;
	obj.form.item_name.value = id + index + " Qty";
		
	obj.form.card.value = type;

	updateStockNum(obj);
	if (updateTot){calculatePr(obj);}
}

function changeSz(obj){
	var label = obj.form.postcard_sz.options[obj.form.postcard_sz.selectedIndex].label;
	
	if (label == 'szPr4'){
		obj.form.postcard_qt.options[0].value = 30;
		obj.form.postcard_qt.options[1].value = 55;
		obj.form.postcard_qt.options[2].value = 100;
		obj.form.postcard_qt.options[3].value = 180;
	}
	else if(label == 'szPr2'){
		obj.form.postcard_qt.options[0].value = 60;
		obj.form.postcard_qt.options[1].value = 110;
		obj.form.postcard_qt.options[2].value = 200;
		obj.form.postcard_qt.options[3].value = 340;
	}
	
	if (updatePr(obj)){calculatePr(obj);}
	
	var num = obj.form.postcard_sz.options[obj.form.postcard_sz.selectedIndex].value;	
	obj.form.up.value = num;
	updateStockNum(obj);
}

function updateSp(obj, additionalChg, iNum) {
	obj.form.shipPr.value = parseFloat(price(additionalChg));
	obj.form.stPrt.value = ("$" + price(additionalChg));
	calculatePr(obj);
	obj.form.prod.value = iNum;
	updateStockNum(obj);
}

function shipping(obj, qty){	
    var update = true;
	
	if (qty < 20){obj.form.shipping.value = 3;}
	else if (qty >= 20 && qty < 50){obj.form.shipping.value = 5;}
	else if (qty >= 50 && qty < 100){obj.form.shipping.value = 7;}
	else if (qty >= 100 && qty < 200){obj.form.shipping.value = 9;}
	else if (qty >= 200 && qty < 300){obj.form.shipping.value = 13;}
	else if (qty >= 300 && qty < 400){obj.form.shipping.value = 17;}
	else if (qty >= 400 && qty < 500){obj.form.shipping.value = 22;}
	else if (qty >= 500 && qty < 600){obj.form.shipping.value = 27;}		
	else if (qty >= 600 && qty < 800){obj.form.shipping.value = 35;}		
	else {obj.form.stShp.value = 0; alert("Please Call or Email for quote");update = false;}		
	
	obj.form.stShp.value = ("$" + price(obj.form.shipping.value));
								
	return update;
}

function updateFl(obj, iFile) {
	obj.form.file.value = iFile;
	updateStockNum(obj);
}


function updateBrochLabel(obj, num){
	var label_1 = obj.form.BrochureFolds.options[obj.form.BrochureFolds.selectedIndex].label;
	label_1 += obj.form.brochurePaperSelection.options[obj.form.brochurePaperSelection.selectedIndex].label;
	obj.form.up.value = (num == 0?'C':num == 3?'K':'B');
	obj.form.back.value = label_1;
}


function openWin(file){
	var newpage = file + ".html";
	window.open(newpage,'_blank');
	
	return false;
}

function fold(obj, name){
	var num = obj.form.brocher_inside[0].checked?obj.form.brocher_inside[0].value:
	          obj.form.brocher_inside[1].checked?obj.form.brocher_inside[1].value:
			  obj.form.brocher_inside[2].value;
	brochureChoice(obj, parseInt(num))
}

function brochureChoice(obj, num){	
    updateBrochLabel(obj, num);
	var newId = (parseInt(obj.form.BrochureFolds.options[obj.form.BrochureFolds.selectedIndex].value) + parseInt(num));
	obj.form.BrochureFolds.options[obj.form.BrochureFolds.selectedIndex].id = (newId + "");
	basePrChg(obj,'BrochureFolds'); endBasePrChg(obj);
}

function updateStationery(obj){
	obj.form.card.value = (obj.form.lethead.id + obj.form.notep.id);
	obj.form.back.value = "";
	obj.form.item_name.value = obj.form.leth.value + "  \n" + obj.form.notep.value;
	var precision = 4;   
	var qty = parseFloat(obj.form.notePr.value) + parseFloat(obj.form.lethead.value);
	obj.form.orignal.value = parseFloat(qty);
	var cost = parseFloat(qty);
	if (cost >= 100){precision = 5;}
	obj.form.stItem.value = ("$" + cost.toPrecision(precision));
	if (shipping(obj, qty)){calculatePr(obj);}
}


function changeLH(id, obj){	 
	var index = obj.form.letter.options[obj.form.letter.selectedIndex].value;	
	if (index > 0){ 
		var x = obj.form.letColor[0].checked?obj.form.letColor[0].id:obj.form.letColor[1].id;
		for (var i = 0; i < obj.form.elements['letter'].length; i++)
		{
			obj.form.elements['letter'].options[i].value = Action[x][i];
		}

		obj.form.lethead.id = "LH";
		obj.form.leth.value = id + obj.form.letter.options[obj.form.letter.selectedIndex].label + " Qty";
	}
	else {
		obj.form.lethead.id = "";
		obj.form.leth.value = "";
	}
	obj.form.lethead.value = obj.form.letter.options[obj.form.letter.selectedIndex].value;

	updateStockNum(obj);
	//if (updateTot){calculatePr(obj);}
	
	updateStationery(obj);
}


function changeNP(id, obj){	 
	//var updateTot = updatePr(obj);
	var index = obj.form.note.value;
	
	var size = obj.form.noteSz.options[obj.form.noteSz.selectedIndex].value;
	var cost = obj.form.pages[0].checked?obj.form.pages[0].value:obj.form.pages[1].value;	
	var qty = obj.form.pages[0].checked?obj.form.pages[0].id:obj.form.pages[1].id;
	
	if (size == 2 && index < 20)
	{alert("Min order quantity is 20."); obj.form.note.value = 20; index = 20;}
	else if (size == 4 && index < 24)
	{alert("Min order quantity is 24."); obj.form.note.value = 24; index = 24;}
	
	if (size != 0){
		var subTot = (parseFloat(cost) * parseFloat(qty))*parseFloat(index);	
		subTot += (index * .5);	
		subTot += (size == 2?index*1.6:index*.65);
		obj.form.notePr.value = subTot;
		obj.form.notep.id = 'NP';
		obj.form.notep.value = id + index + " Qty";
	}else{obj.form.notePr.value = 0.0;
		obj.form.notep.id = "";
		obj.form.notep.value = "";}
	
	
	updateStationery(obj);
}

//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////

function popup(mylink, windowname, myWidth, myHeight){
   var newWindow;
   if (! window.focus)return true; 
   var href;
   
   if (typeof(mylink) == 'string')
      href=mylink;
   else
      href=mylink.href;
      
   if (!newWindow || newWindow.closed){
      newWindow = window.open(href, windowname, 'status, height=myHeight,width=myWidth,scrollbar=no');
   } else {
      newWindow.focus();
   }
   
   return false;
 }


function printHeader(selectedItem)
{
	var header;	
	if (document.all){header= window.document.CatagoryName;}
	else if (document.getElementById){header= document.getElementById("CatagoryName").contentWindow;}
	else{alert("bad document ID")}
	 
	header.document.write("<table width='100%' border='0'><tr><td align=\"center\"><font  size='+3' color='red'> " + selectedItem + "</font></td></tr></table>");
	header.document.close();
}

function loadCatagoryBody(selectedItem)
{
	document.getElementById("ItemNeeded").setAttribute("height", size[selectedItem]);
	
    window.frames["ItemNeeded"].location = catagory[selectedItem];  
}


   

/////////////////////////////////////////////////////////////////
///////////////////////     TABLES    ///////////////////////////
/////////////////////////////////////////////////////////////////

function createBrochureTable(){

   var tableSize=                   "85%";
   var numberOfColumns=             6;
   var tableTitle=                  "COLOR FLYER & BROCHURE PRICING";
   var tab=                         "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
   
   var name_one=                    "Flyer" + tab + "&nbsp;&nbsp; (1-side) 8.5 x 11\"";
   var name_two=                    tab + tab + tab +"(2-side) 8.5 x 11\"";
   var name_three=                  "Brochure" + "&nbsp; 8.5 x 11 (3-panel)";
   var name_four=                    tab + tab +tab +"&nbsp;8.5 x 14 (3 or 4-panel)";

   createTableHeading(tableSize, numberOfColumns,  tableTitle, 0, 0);
   tableBorder(numberOfColumns, 9); 
      
   createColTitle("Quantity", colType(beginRow));
   addColumn(quantity(2), colType(dataCell), 0);
   addColumn(quantity(4), colType(dataCell), 0);
   addColumn(quantity(7), colType(dataCell), 0);
   addColumn(quantity(12), colType(dataCell), 0);
   addColumn(quantity(14), colType(endRow), 0);
   
   tableBorder(numberOfColumns, 10); 
   createColTitle(name_one, colType(beginRow));
   addColumn(printPrice(49), colType(dataCell), 0);
   addColumn(printPrice(69), colType(dataCell), 0);
   addColumn(printPrice(119), colType(dataCell),0);
   addColumn(printPrice(189), colType(dataCell),0);
   addColumn(printPrice(289), colType(endRow), 0);
   
   tableBorder(numberOfColumns, 10); 
   
   createColTitle(name_two, colType(beginRow));
   addColumn(printPrice(69), colType(dataCell), 0);
   addColumn(printPrice(89), colType(dataCell), 0);
   addColumn(printPrice(169), colType(dataCell), 0);
   addColumn(printPrice(239), colType(dataCell),0);
   addColumn(printPrice(459), colType(endRow), 0);
   
   tableBorder(numberOfColumns, 10); 
   
   createColTitle(name_three, colType(beginRow));
   addColumn(printPrice(79), colType(dataCell), 0);
   addColumn(printPrice(119), colType(dataCell), 0);
   addColumn(printPrice(189), colType(dataCell), 0);
   addColumn(printPrice(339), colType(dataCell),0);
   addColumn(printPrice(459), colType(endRow), 0);
   
   tableBorder(numberOfColumns, 10); 
   
   createColTitle(name_four, colType(beginRow));
   addColumn(printPrice(89), colType(dataCell), 0);
   addColumn(printPrice(140), colType(dataCell), 0);
   addColumn(printPrice(222), colType(dataCell), 0);
   addColumn(printPrice(489), colType(dataCell), 0);
   addColumn(printPrice(668), colType(endRow), 0);
      
   tableBorder(numberOfColumns, 12); 

}


function createLetterHeadTable()
{
   var tableSize=                   "55%";
   var numberOfColumns=             4;
   var tableTitle=                  "LETTERHEAD/STATIONERY";   

   createTableHeading(tableSize, numberOfColumns,  tableTitle, 0, 0);
   tableBorder(numberOfColumns, 9); 
      
   createColTitle("Quantity", colType(beginRow));
   addColumn(quantity(7), colType(dataCell), columnSize);
   addColumn(quantity(12), colType(dataCell), columnSize);
   addColumn(quantity(14), colType(endRow), columnSize);
   tableBorder(numberOfColumns, 10); 
   
   createColTitle("24# Linen Bond", colType(beginRow));
   addColumn(printPrice(95), colType(dataCell), 0);
   addColumn(printPrice(140), colType(dataCell), 0);
   addColumn(printPrice(180), colType(endRow), 0);
   tableBorder(numberOfColumns, 12); 
}



function createBusinessCardTable()
{
   var tableSize=                   "85%";
   var numberOfColumns=            5;
   var tableTitle=                  "BUSINESS CARD PRICING";  
   
   var note_1=                "SHIPPING: Shipping will be added to all orders.";
   var note_2=                "FREE: U/V Coating can be added to any order for free.";
   var key_1=               " 4/0 ~ Four Color Front - Blank Back";
   var key_2=               " 4/1 ~ Four Color Front - One Color Back";
   var key_3=               " 4/4 ~ Four Color Front - Four Color Back";
   var key_4=               " EXP ~ Express Delivery Available for an additional $20 (4 business day turnaround)";

   createTableHeading(tableSize, numberOfColumns,  tableTitle, 0, 0);
   tableBorder(numberOfColumns, 9); 
   createColTitle("Quantity", colType(beginRow),2);
   addColumn("500", colType(dataCell), columnSize);
   addColumn("1000", colType(dataCell), columnSize);
   addColumn("2500", colType(dataCell), columnSize);
   addColumn("5000", colType(endRow), columnSize);
   
   tableBorder(numberOfColumns, 10); 
   createColTitle("Color *4/0 <br>[3.5 X 2.0]", colType(beginRow),2);
   addColumn("$30.00 *EXP", colType(dataCell), 0);
   addColumn("$38.00 *EXP", colType(dataCell), 0);
   addColumn("$68.00", colType(dataCell), 0);
   addColumn("$110.00", colType(endRow), 0);
   
// //  createColTitle("Black + 1 Color", colType(beginRow));
// //  addColumn(printPrice(30), colType(dataCell), 0);
// //  addColumn(printPrice(43), colType(dataCell), 0);
//  // addColumn(printPrice(69.5), colType(endRow), 0);

   tableBorder(numberOfColumns, 10);    
   createColTitle("Color *4/1 <br>[3.5 X 2.0]", colType(beginRow),2);
   addColumn("$35.00 *EXP", colType(dataCell), 0);
   addColumn("$43.00 *EXP", colType(dataCell), 0);
   addColumn("$73.00", colType(dataCell), 0);
   addColumn("$115.00", colType(endRow), 0);

   tableBorder(numberOfColumns, 10);    
   createColTitle("Color *4/4 <br>[3.5 X 2.0]", colType(beginRow),2);
   addColumn("$35.00", colType(dataCell), 0);
   addColumn("$48.00", colType(dataCell), 0);
   addColumn("$78.00", colType(dataCell), 0);
   addColumn("$120.00", colType(endRow), 0);
   
   tableBorder(numberOfColumns, 10); 
   createColTitle("Color *4/0<br>[Tent Cards 3.5 X 4.0]", colType(beginRow),2);
   addColumn("$93.75", colType(dataCell), 0);
   addColumn("$112.00", colType(dataCell), 0);
   addColumn("$157.00", colType(dataCell), 0);
   addColumn("$270.00", colType(endRow), 0);
   
   tableBorder(numberOfColumns, 10); 
   createColTitle("Color *4/1<br>[Tent Cards 3.5 X 4.0]", colType(beginRow),2);
   addColumn("$98.75", colType(dataCell), 0);
   addColumn("$117.00", colType(dataCell), 0);
   addColumn("$162.00", colType(dataCell), 0);
   addColumn("$275.00", colType(endRow), 0);
   
   tableBorder(numberOfColumns, 10); 
   createColTitle("Color *4/4<br>[Tent Cards 3.5 X 4.0]", colType(beginRow),2);
   addColumn("$118.75", colType(dataCell), 0);
   addColumn("$147.00", colType(dataCell), 0);
   addColumn("$182.00", colType(dataCell), 0);
   addColumn("$295.00", colType(endRow), 0);

   tableBorder(numberOfColumns, 11);    
   addComment("KEY:<br>"+key_1, colType(openRowCloseRow), 5);
   addComment(key_2, colType(openRowCloseRow), 5);
   addComment(key_3, colType(openRowCloseRow), 5);
   addComment(key_4, colType(openRowCloseRow), 5);
   //addComment(, colType(openRowCloseRow), 5);

   tableBorder(numberOfColumns, 14);    
   //addComment(firstComment, colType(openRowCloseRow), 5);
   addComment(note_1, colType(openRowCloseR_CloseT), 5);
}   


function createPostcardTable()
{
   var tableSize=                   "90%";
   var numberOfColumns=            4;
   var tableTitle=                  "POSTCARD PRICING";   
   var cr_=                      "<BR>";

   createTableHeading(tableSize, numberOfColumns,  tableTitle, 0, 0);
   
   tableBorder(numberOfColumns, 9);       
   createColTitle("Quantity", colType(beginRow));
   addColumn(quantity(4), colType(dataCell), columnSize);
   addColumn(quantity(7), colType(dataCell), columnSize);
   addColumn(quantity(12), colType(endRow), columnSize);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("4 ¼\" x 5 ½\" <BR>(4-up on a page)", colType(beginRow));
   addColumn(printPrice(35), colType(dataCell),0);
   addColumn(printPrice(55), colType(dataCell),0);
   addColumn(printPrice(100), colType(endRow),0);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("5 ½\" x 8 ½\" <BR>(2-up on a page)", colType(beginRow));
   addColumn(printPrice(60), colType(dataCell),0);
   addColumn(printPrice(110), colType(dataCell),0);
   addColumn(printPrice(200), colType(endRow),0);
   
   tableBorder(numberOfColumns, 9);    
   addComment("<BR>", colType(openRowCloseRow), 4);
   addComment("**One time $19 set-up fee additional charge.", colType(openRowCloseR_CloseT), 4);
}     


function createAddressTable()
{
   var tableSize=                   "80%";
   var numberOfColumns=             3;
   var tableTitle=                  "RETURN ADDRESS LABEL PRICING"; 
   var colsize=                     "25%";

   createTableHeading(tableSize, numberOfColumns,  tableTitle, 0, 0);
      
   tableBorder(numberOfColumns, 9);    
   createColTitle("Quantity", colType(beginRow));
   addColumn(quantity(5), colType(dataCell), colsize);
   addColumn(quantity(8), colType(endRow), colsize);
   
   tableBorder(numberOfColumns, 10);    
   createColTitle("1 x 2 5/8\"", colType(beginRow));
   addColumn(printPrice(9), colType(dataCell),0);
   addColumn(printPrice(15), colType(endRow),0);
   
   tableBorder(numberOfColumns, 12); 
}  


function createFormTable()
{
   var tableSize=                   "75%";
   var numberOfColumns=            3;
   var tableTitle=                  "Business Form Pricing b/w";  

   createTableHeading(tableSize, numberOfColumns,  tableTitle, 0, 0);
      
   tableBorder(numberOfColumns, 9);    
      
   createColTitle("Quantity", colType(beginRow));
   addColumn(quantity(7), colType(dataCell), columnSize);
   addColumn(quantity(12), colType(endRow), columnSize);
      
   tableBorder(numberOfColumns, 10);    
   
   createColTitle("1 side 8.5 x 11\"", colType(beginRow));
   addColumn(printPrice(1007), colType(dataCell),0);
   addColumn(printPrice(1005), colType(endRow),0);
      
   tableBorder(numberOfColumns, 10);    
   
   createColTitle("2 side 8.5 x 11\"", colType(beginRow));
   addColumn(printPrice(1014), colType(dataCell),0);
   addColumn(printPrice(1010), colType(endRow),0);
      
   tableBorder(numberOfColumns, 11);    
   
   addComment("<BR>", colType(openRowCloseRow), 3);
   addComment("**One time $19 set-up fee additional charge.", colType(openRowCloseR_CloseT), 3);
}      


function createNotepadTable()
{
   var tableSize=                   "100%";
   var numberOfColumns=              3;
   var tableTitle=                  "Notepad Pricing";
   var spacing=                     "30%";
   var tab=                         "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";

   createTableHeading(tableSize, numberOfColumns,  tableTitle, 0, 0);
   
   tableBorder(numberOfColumns, 9);       
   createColTitle("Quantity", colType(beginRow));
   addColumn(quantity(1) + " pages", colType(dataCell), spacing);
   addColumn(quantity(2) + " pages", colType(endRow), spacing);
   
   tableBorder(numberOfColumns, 10);    
   createColTitle("Approx. 4 ¼\" X 5 ½\"<BR> *see note A", colType(beginRow));
   addColumn("Approx. $" + parseFloat(.12) + " per page", colType(dataCell),0);
   addColumn("Approx. $" + parseFloat(.07) + " per page", colType(endRow),0);
   
   tableBorder(numberOfColumns, 10);    
   createColTitle("Approx. 5 ½\" X 8 ½\"<BR> *see note B", colType(beginRow));
   addColumn("Approx. $" + parseFloat(.15) + " per page", colType(dataCell),0);
   addColumn("Approx. $" + parseFloat(.09) + " per page", colType(endRow),0);
   
   // Need to create a special instance here
   document.write('<TR>'+ tblBorder(5)+tblBorder(14)+tblBorder(10)+tblBorder(14)+tblBorder(11)+tblBorder(14)+tblBorder(6)+'</tr>');
   
   createColTitle("Padding", colType(beginRow));
   addComment(printPrice(1050) + " Per pad", colType(endRow), 2);
   
   document.write('<TR>'+ tblBorder(5)+tblBorder(14)+tblBorder(10)+tblBorder(14)+tblBorder(14)+tblBorder(14)+tblBorder(6)+'</tr>');
   
   createColTitle("Cutting", colType(beginRow));
   addComment("Free", colType(endRow), 2);
   document.write('<TR>'+ tblBorder(5)+tblBorder(14)+tblBorder(11)+tblBorder(14)+tblBorder(14)+tblBorder(14)+tblBorder(6)+'</tr>');
   
   addComment(tab + "* A) Min order: 12 pads <br>" + tab + "* B) Min order: 10 pads", colType(openRowCloseR_CloseT), 3);
}   


function createMiscTable()
{
   var tableSize=                   "65%";
   var numberOfColumns=              3;
   var tableTitle=                  "Additional Services Pricing";
   var spacing=                     "30%";
   var tab=                         "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";

   createTableHeading(tableSize, numberOfColumns,  tableTitle, 0, 0);
   
   tableBorder(numberOfColumns, 9);       
   createColTitle("Items", colType(beginRow));
   addColumn("Description", colType(dataCell), spacing);
   addColumn("Price", colType(endRow), spacing);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("Image Scan", colType(beginRow));
   addColumn("Includes CD", colType(dataCell), spacing);
   addColumn(printPrice(9), colType(endRow),0);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("CD Burning", colType(beginRow));
   addColumn("per disc", colType(dataCell),0);
   addColumn(printPrice(7), colType(endRow),0);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("Folding", colType(beginRow));
   addColumn("less than 200", colType(dataCell),0);
   addColumn(printPrice(5), colType(endRow),0);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("Folding", colType(beginRow));
   addColumn("more than 200", colType(dataCell),0);
   addColumn(printPrice(1003) + " per page", colType(endRow),0);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("B/W Prints", colType(beginRow));
   addColumn("1-sided", colType(dataCell),0);
   addColumn(printPrice(1008), colType(endRow),0);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("Color Prints", colType(beginRow));
   addColumn("1-sided", colType(dataCell),0);
   addColumn(printPrice(1079), colType(endRow),0);
   
   tableBorder(numberOfColumns, 12);       
}   

                               

//////////////////////////////////////////////////////////////
/////////////////////  Realtor Tables ////////////////////////
//////////////////////////////////////////////////////////////


function createFlyerTable()
{


   var tableSize=                   "85%";
   var numberOfColumns=            3;
   var tableTitle=                  "LISTING FLYERS <BR> *price is per each flyer.";   

   createTableHeading(tableSize, numberOfColumns,  tableTitle, 0, 0);
   
   tableBorder(numberOfColumns, 9);       
   createColTitle("Create own package", colType(beginRow));
   addColumn("Color", colType(dataCell), columnSize);
   addColumn("B/W", colType(endRow), columnSize);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("*1-Sided", colType(beginRow));
   addColumn("$"+price(1089), colType(dataCell));
   addColumn("$"+price(1040), colType(endRow));
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("*2-Sided", colType(beginRow));
   addColumn("$"+price(1140), colType(dataCell));
   addColumn("$"+price(1090), colType(endRow));
   
   //tableBorder(numberOfColumns, 11);       
   //addComment("<br>", colType(openRowCloseRow), 3);
   document.write('<tr>'+tblBorder(5)+tblBorder(14)+tblBorder(11)+tblBorder(14)+tblBorder(10)+tblBorder(14)+tblBorder(6)+'</tr>');
   addComment("Photo appt, design layout & photo CD", colType(beginRow), 2);
   addColumn(printPrice(15), colType(endRow));
 
    document.write('<tr>'+tblBorder(3)+tblBorder(13)+tblBorder(13)+tblBorder(13)+tblBorder(8)+tblBorder(13)+tblBorder(4)+'</tr></table>');
}   



function createReprintTable()
{
   var tableSize=                   "85%";
   var numberOfColumns=            3;
   var tableTitle=                  "LISTING FLYER REPRINTS <BR> *price is per each flyer.";   

   createTableHeading(tableSize, numberOfColumns,  tableTitle, 0, 0);
   
   tableBorder(numberOfColumns, 9);       
      
   createColTitle("Create own package", colType(beginRow));
   addColumn("Color", colType(dataCell), columnSize);
   addColumn("B/W", colType(endRow), columnSize);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("*1-Sided", colType(beginRow));
   addColumn("$"+price(1080), colType(dataCell),0);
   addColumn("$"+price(1040), colType(endRow),0);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("*2-Sided", colType(beginRow));
   addColumn("$"+price(1140), colType(dataCell),0);
   addColumn("$"+price(1090), colType(endRow),0);
   
   tableBorder(numberOfColumns, 12);       
}   



function createPackageTable()
{
   var tableSize=                   "70%";
   var numberOfColumns=            4;
   var tableTitle=                  "LISTING FLYER PACKAGES";   

   createTableHeading(tableSize, numberOfColumns,  tableTitle, 0, 0);
   
   tableBorder(numberOfColumns, 9);       
   createColTitle("Package Qty", colType(beginRow));
   addColumn(quantity(2) + " Color", colType(dataCell), columnSize);
   addColumn(quantity(3) + " Color", colType(dataCell), columnSize);
   addColumn(quantity(4) + " Color", colType(endRow), columnSize);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("1-Sided", colType(beginRow));
   addColumn(printPrice(55), colType(dataCell),0);
   addColumn(printPrice(75), colType(dataCell),0);
   addColumn(printPrice(90), colType(endRow),0);
   
   tableBorder(numberOfColumns, 10);       
   createColTitle("2-Sided", colType(beginRow));
   addColumn(printPrice(85), colType(dataCell),0);
   addColumn(printPrice(120), colType(dataCell),0);
   addColumn(printPrice(145), colType(endRow),0);
   
   tableBorder(numberOfColumns, 11);       
   addComment("*Includes Photo CD", colType(openRowCloseR_CloseT), 4);
}   


function createWebPriceTable()
{
   var tableSize=                   "70%";
   var numberOfColumns=             6;
   var tableTitle=                  "WEB Pricing"; 
   var color=                       "#2C6999";

   createTableHeading(tableSize, numberOfColumns,  tableTitle, color, 1);
   addComment(" ", colType(openRowCloseR_CloseT), 6);
   
   createTableHeading(tableSize, numberOfColumns,  "", 0, 0);
   
   createColTitle("Packages", colType(beginRow));
   addColumn("  Lite  ", colType(dataCell),0);
   addColumn(" Bronze ", colType(dataCell),0);
   addColumn(" Silver ", colType(dataCell),0);
   addColumn("  Gold  ", colType(dataCell),0);
   addColumn("Platinum", colType(endRow),0);
   
   createColTitle("Pages", colType(beginRow));
   addColumn("  Lite  ", colType(dataCell),0);
   addColumn(" Bronze ", colType(dataCell),0);
   addColumn(" Silver ", colType(dataCell),0);
   addColumn("  Gold  ", colType(dataCell),0);
   addColumn("Platinum", colType(endRow),0);
}


//////////////////////////////////////////////////////////////////////
///////////////////////////////////   OTHER        ///////////////////
//////////////////////////////////////////////////////////////////////


function insertImage(pic, wSize, hSize, shrinkPct){

   var shrink= .45;
   var picture = pic;
   
   if (shrinkPct != 0)
   {
      shrink=shrinkPct;
   }   
  
    picture = pic + ".jpg";
   
   document.write("<IMG SRC=\"" + picture + "\" WIDTH=" + wSize + " HEIGHT=" + hSize + ">");
}   


function insertImageMap(map, pic, wSize, hSize, shrinkPct){

   var shrink= .45;
   var picture = pic;
   
   if (shrinkPct != 0)
   {
      shrink=shrinkPct;
   }   

    picture = pic + ".jpg";
   
   document.write("<IMG style=\"padding-top: 15px \"  USEMAP=\"" + map + "\" BORDER=0 SRC=\"" + picture + "\" WIDTH=" + wSize + " HEIGHT=" + hSize + ">");
}   


function cssPageSelection(){

  // if (eval(screen.width) <= 800){
  //    document.write("<link href=\"Blueline800.css\" rel=\"stylesheet\" type=\"text/css\">");}
  // else{   
      document.write("<link href=\"Blueline.css\" rel=\"stylesheet\" type=\"text/css\">");//}
}      


