// JavaScript Document
	var currentFoilType = "No";

	function changeFoilView(foilDuplexView){

		currentFoilType = foilDuplexView;

		if(currentFoilType == "No"){
			document.getElementById('foilSimplexLink').className  = "headerRowLinkSelected";
			document.getElementById('foilDuplexLink').className  = "headerRowLink";
			document.getElementById('foil_pricingChart_header').innerHTML = "(2-Color, Without Foil)";
		}
		else if(currentFoilType == "Yes"){
			document.getElementById('foilSimplexLink').className  = "headerRowLink";
			document.getElementById('foilDuplexLink').className  = "headerRowLinkSelected";
			document.getElementById('foil_pricingChart_header').innerHTML = "(2-Color, With Foil Printing)";
		}
		else{
			alert("Illegal Duplex View");
		}

		buildFoilLhPricing();
	}

	function getFoilLetterheadPriceChart(productID){

		var productObj = productLoaderObj_2color.getProductObj(productID);

		var foilPriceChartHTML = "<table cellpadding='1' cellspacing='0' width='100%'>";

		foilPriceChartHTML += "<tr><td class='priceChartColumnTitles'>Quantity</td><td class='priceChartColumnTitles'>Price</td></tr>";

		var quantitiesArr = productObj.getQuantityChoicesArr();

		for(var i=0; i<quantitiesArr.length; i++){

			foilPriceChartHTML += "<tr onMouseOver='hlPriceRow(this);' onMouseOut='dlPriceRow(this);'>";
			foilPriceChartHTML += "<td width='30%' class='priceChartTable'>" + addCommas(quantitiesArr[i]) + "</td>";

			var selOptionsObj = productObj.getSelectedOptionsObj();

			selOptionsObj.setOptionChoice("Foil Printing", currentFoilType);

			// Set Options/Quantity in Common for this Row in the Table.
			selOptionsObj.setQuantity(quantitiesArr[i]);

			// Option/Choice
			foilPriceChartHTML += "<td width='35%' class='priceChartTable'>$" + addCommas(productObj.getSubtotalOverride(selOptionsObj)) + "</td>";

			foilPriceChartHTML += "</tr>";
		}
		foilPriceChartHTML += "</table>";

		foilPriceChartHTML += "<table cellpadding='0' cellspacing='0' width='100%'><tr><td align='right' class='priceChartBottomBorder'></td></tr></table>";

		return foilPriceChartHTML;
	}


	function productLoaderErrorEvent(statusCode, statusDesc){
		alert("An Error Occured downloading Product Details. Some of the Pricing on this page may not be accurate.\n\nError Code: " + statusCode + "\nError Description: " + statusDesc);
	}
	var productLoaderObj_2color = new ProductLoader();
	productLoaderObj_2color.attatchProductLoadingErrorEvent(productLoaderErrorEvent, this);


	function load_2Color_PricingDelayed(){
		productLoaderObj_2color.attachProductLoadedEvent(202, buildFoilLhPricing);
	}


	function buildFoilLhPricing(){
		var foilPriceChartHTML = getFoilLetterheadPriceChart(202);
		document.getElementById('foilpricingChart').innerHTML = foilPriceChartHTML;
	}
	
	
	$j(document).ready(function() {
		setTimeout("load_2Color_PricingDelayed()", 2500);
	});
	
	
	
