function calc() {
var iTot = 0;
var mTot = 0;
	document.forms["add_cart1"].elements["quantity"].value = document.forms["add_cart1"].elements["quantity_250_500_10000"].value;


	if (document.forms["add_cart1"].elements["quantity"].type=="select-one")
	{ var quantity = document.forms["add_cart1"].elements["quantity"].options[document.forms["add_cart1"].elements["quantity"].selectedIndex].value; }
	else
	{ var quantity = document.forms["add_cart1"].elements["quantity"].value; }

	if (document.forms["add_cart1"].elements["papertype_folders"].type=="select-one")
	{ var papertype_folders = document.forms["add_cart1"].elements["papertype_folders"].options[document.forms["add_cart1"].elements["papertype_folders"].selectedIndex].value; }
	else
	{if (document.forms["add_cart1"].elements["papertype_folders"].length>0)
{

	for (var i=0; i < document.forms["add_cart1"].elements["papertype_folders"].length; i++)
	{if (document.forms["add_cart1"].elements["papertype_folders"][i].checked)
	{var papertype_folders =i ;
	break;}}
}else
{
	var papertype_folders =0;
	}}

	if (document.forms["add_cart1"].elements["coating"].type=="select-one")
	{ var coating = document.forms["add_cart1"].elements["coating"].options[document.forms["add_cart1"].elements["coating"].selectedIndex].value; }
	else
	{if (document.forms["add_cart1"].elements["coating"].length>0)
{

	for (var i=0; i < document.forms["add_cart1"].elements["coating"].length; i++)
	{if (document.forms["add_cart1"].elements["coating"][i].checked)
	{var coating =i ;
	break;}}
}else
{
	var coating =0;
	}}

	if (document.forms["add_cart1"].elements["proof_onlyhardcopy"].type=="select-one")
	{ var proof_onlyhardcopy = document.forms["add_cart1"].elements["proof_onlyhardcopy"].options[document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex].value; }
	else
	{if (document.forms["add_cart1"].elements["proof_onlyhardcopy"].length>0)
{

	for (var i=0; i < document.forms["add_cart1"].elements["proof_onlyhardcopy"].length; i++)
	{if (document.forms["add_cart1"].elements["proof_onlyhardcopy"][i].checked)
	{var proof_onlyhardcopy =i ;
	break;}}
}else
{
	var proof_onlyhardcopy =0;
	}}

	if (document.forms["add_cart1"].elements["turnaround1235_recon"].type=="select-one")
	{ var turnaround1235_recon = document.forms["add_cart1"].elements["turnaround1235_recon"].options[document.forms["add_cart1"].elements["turnaround1235_recon"].selectedIndex].value; }
	else
	{if (document.forms["add_cart1"].elements["turnaround1235_recon"].length>0)
{

	for (var i=0; i < document.forms["add_cart1"].elements["turnaround1235_recon"].length; i++)
	{if (document.forms["add_cart1"].elements["turnaround1235_recon"][i].checked)
	{var turnaround1235_recon = document.forms["add_cart1"].elements["turnaround1235_recon"][i].value;

	var index_turnaround = i;
	break;}}
}else
{
	var turnaround1235_recon = document.forms["add_cart1"].elements["turnaround1235_recon"].value;

	var index_turnaround = 0;
	}}

	if (quantity > 0 && quantity <=250)
	{
		turnaround1235_recon = index_turnaround;
iTot = iTot + (.85*(963.82+((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/0.982)*963.82)-((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.2)*963.82))*itemInfo[1][6][turnaround1235_recon]+(itemInfo[1][4][document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex]*2) + itemInfo[1][1][document.forms["add_cart1"].elements["coating"].selectedIndex] +2.64);
		mTot = mTot + iTot /quantity;
	}


	if (quantity > 250 && quantity <=500)
	{
		turnaround1235_recon = index_turnaround;
iTot = iTot + (.85*(1160.0+((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.088)*1160.0)-((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.2)*1160.0))*itemInfo[1][6][turnaround1235_recon]+(itemInfo[1][4][document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex]*2) + itemInfo[1][1][document.forms["add_cart1"].elements["coating"].selectedIndex]+2.64)*1.1;
		mTot = mTot + iTot /quantity;
	}


	if (quantity > 500 && quantity <=1000)
	{
		turnaround1235_recon = index_turnaround;
iTot = iTot + (.815*(1441.47+((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.173)*1441.47)-((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.2)*1441.7))*itemInfo[1][6][turnaround1235_recon]+(itemInfo[1][4][document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex]*2)+itemInfo[1][1][document.forms["add_cart1"].elements["coating"].selectedIndex]+2.64)*1.1;
		mTot = mTot + iTot /quantity;
	}


	if (quantity > 1000 && quantity <=2000)
	{
		turnaround1235_recon = index_turnaround;
iTot = iTot + (.85*(1859.41+((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.113)*1859.41)-((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.2)*1859.41))*itemInfo[1][6][turnaround1235_recon]+(itemInfo[1][4][document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex]*2)+itemInfo[1][1][document.forms["add_cart1"].elements["coating"].selectedIndex]+2.64)*1.1;
		mTot = mTot + iTot /quantity;
	}


	if (quantity > 2000 && quantity <=3000)
	{
		turnaround1235_recon = index_turnaround;
iTot = iTot + (.85*(2378.0+((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.153)*2378.0)-((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.2)*2378.0))*itemInfo[1][6][turnaround1235_recon]+(itemInfo[1][4][document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex]*2) + itemInfo[1][1][document.forms["add_cart1"].elements["coating"].selectedIndex]+2.64)*1.1;
		mTot = mTot + iTot /quantity;
	}


	if (quantity > 3000 && quantity <=4000)
	{
		turnaround1235_recon = index_turnaround;
iTot = iTot + (.85*(2499.12+((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.065)*2499.12)-((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.2)*2499.12))*itemInfo[1][6][turnaround1235_recon]+(itemInfo[1][4][document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex]*2) + itemInfo[1][1][document.forms["add_cart1"].elements["coating"].selectedIndex]+2.64)*1.1;
		mTot = mTot + iTot /quantity;
	}


	if (quantity > 4000 && quantity <=5000)
	{
		turnaround1235_recon = index_turnaround;
iTot = iTot + (.85*(2828.35+((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.075)*2828.35)-((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.2)*2828.35))*itemInfo[1][6][turnaround1235_recon]+(itemInfo[1][4][document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex]*2) + itemInfo[1][1][document.forms["add_cart1"].elements["coating"].selectedIndex]+2.64)*1.1;
		mTot = mTot + iTot /quantity;
	}


	if (quantity > 5000 && quantity <=7000)
	{
		turnaround1235_recon = index_turnaround;
iTot = iTot + (.85*(3328+((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.147)*3328)-((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.2)*3328))*itemInfo[1][6][turnaround1235_recon]+(itemInfo[1][4][document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex]*2) + itemInfo[1][1][document.forms["add_cart1"].elements["coating"].selectedIndex]+2.64)*1.1;
		mTot = mTot + iTot /quantity;
	}


	if (quantity > 7000 && quantity <=8000)
	{
		turnaround1235_recon = index_turnaround;
iTot = iTot + (.85*(3600+((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.147)*3600)-((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.2)*3600))*itemInfo[1][6][turnaround1235_recon]+(itemInfo[1][4][document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex]*2) + itemInfo[1][1][document.forms["add_cart1"].elements["coating"].selectedIndex]+2.64)*1.1;
		mTot = mTot + iTot /quantity;
	}


	if (quantity > 8000 && quantity <=9000)
	{
		turnaround1235_recon = index_turnaround;
iTot = iTot + (.85*(3989+((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.147)*3989)-((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.2)*3789))*itemInfo[1][6][turnaround1235_recon]+(itemInfo[1][4][document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex]*2) + itemInfo[1][1][document.forms["add_cart1"].elements["coating"].selectedIndex]+2.64)*1.1;
		mTot = mTot + iTot /quantity;
	}


	if (quantity > 9000)
	{
		turnaround1235_recon = index_turnaround;
iTot = iTot + (.85*(4357.47+((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.147)*4357.47)-((itemInfo[1][0][document.forms["add_cart1"].elements["papertype_folders"].selectedIndex]/1.2)*4357.47))*itemInfo[1][6][turnaround1235_recon]+(itemInfo[1][4][document.forms["add_cart1"].elements["proof_onlyhardcopy"].selectedIndex]*2) + itemInfo[1][1][document.forms["add_cart1"].elements["coating"].selectedIndex]+2.64)*1.1;
		mTot = mTot + iTot /quantity;
	}

if(iTot == 0)
{
tTot = iTot;
document.getElementById("sptotal").innerHTML = 'Free';
document.forms["add_cart1"].elements["total"].value = '$0.00';
document.forms["add_cart1"].elements["price"].value = '$0.00';
document.getElementById("spprice").innerHTML = 'Free';
}
else
{
if (document.forms["add_cart1"].elements["price_factor"].value == 1)
{
        tTot = Math.round(iTot * 100) / 100 + .00001;
	    var price_factor = 1;
        tTot = tTot*price_factor;var totX = "" + tTot;
	    totX = totX.substring(0,totX.indexOf(".") + 3);
	    if(totX > 0 )
        {
            document.getElementById("sptotal").innerHTML = "$" + totX;
        }
        else
        {
            document.getElementById("sptotal").innerHTML = "Free";}
	        document.forms["add_cart1"].elements["total"].value = "$" + totX;

	        pTot = (tTot/quantity);
	        var totX = "" + pTot;
	        totX = totX.substring(0,totX.indexOf(".") + 4);
	        document.forms["add_cart1"].elements["price"].value = "$" + totX;
	        if(totX > 0 )
            {
                document.getElementById("spprice").innerHTML =  "$" + totX;
            }
            else
            {
                document.getElementById("spprice").innerHTML =  "Free";
             }

}
else
{
tTot = Math.round(iTot * 100) / 100 + .00001;
	var maxDisc = 0;
var price_factor = document.forms["add_cart1"].elements["price_factor"].value;
var calculatedDisc;
var discountedTotal;
var iDiscount;
var youSave;
var displayDisc;

calculatedDisc = tTot*(1-price_factor);
if(calculatedDisc > maxDisc && maxDisc > 0 )
{
    discountedTotal=tTot-maxDisc;
    iDiscount = maxDisc;
    displayDisc = "" + (Math.round(iDiscount* 100) / 100 + .001);
    displayDisc = displayDisc.substring(0, displayDisc.indexOf(".") + 3);
    document.getElementById("idYouSave").innerHTML = "$" + displayDisc;}
else
{
    discountedTotal=tTot*price_factor;
    iDiscount = (1-price_factor)*100;
displayDisc = "" + (Math.round(calculatedDisc* 100) / 100 + .001);
displayDisc = displayDisc.substring(0, displayDisc.indexOf(".") + 3);
document.getElementById("idYouSave").innerHTML ="" + Math.round(iDiscount) + "%" ;
document.getElementById("idYouSaveNew").innerHTML =  "- $" + displayDisc ;
}
var xDiscountedTotal = "" + discountedTotal;


	
xDiscountedTotal = xDiscountedTotal.substring(0,xDiscountedTotal.indexOf(".") + 3);
document.getElementById("idNowOnly").innerHTML = "$" + xDiscountedTotal;
	var totX = "" + tTot;
	totX = totX.substring(0,totX.indexOf(".") + 3);
	if(totX > 0 )
{
document.getElementById("sptotal").innerHTML = "$" + totX;}
else
{
document.getElementById("sptotal").innerHTML = "Free";}


	document.forms["add_cart1"].elements["total"].value = "$" + totX;

	pTot = (tTot/quantity);
	var totX = "" + pTot;
	totX = totX.substring(0,totX.indexOf(".") + 4);
pTot = (discountedTotal/quantity);
totX = "" + pTot;
totX = totX.substring(0,totX.indexOf(".") + 4);
	document.forms["add_cart1"].elements["price"].value = "$" + totX;
	if(totX > 0 )
{
document.getElementById("spprice").innerHTML =  "$" + totX;}
else
{
document.getElementById("spprice").innerHTML =  "Free";}

}
}
}



var itemInfo = new Array(1) ;
var fieldInfo = new Array(1) ;
var pfInfo = new Array(1) ;
var baseInfo = new Array(1) ;
itemInfo[1] = new Array(7);
fieldInfo[1] = new Array(7);
pfInfo[1] = new Array(7);
var sDescArr = new Array(7);
fieldInfo[1][0] = "papertype_folders";
itemInfo[1][0] = new Array(1);
pfInfo[1][0] = new Array(1);
itemInfo[1][0][0] = 1.20;
pfInfo[1][0][0] = 'NON';
fieldInfo[1][1] = "coating";
itemInfo[1][1] = new Array(2);
pfInfo[1][1] = new Array(2);
itemInfo[1][1][0] = 0.00;
pfInfo[1][1][0] = 'NON';
itemInfo[1][1][1] = 20.00;
pfInfo[1][1][1] = 'NON';
fieldInfo[1][2] = "Slot_Orientation";
itemInfo[1][2] = new Array(3);
pfInfo[1][2] = new Array(3);
itemInfo[1][2][0] = 0.00;
pfInfo[1][2][0] = 'NON';
itemInfo[1][2][1] = 0.00;
pfInfo[1][2][1] = 'NON';
itemInfo[1][2][2] = 0.00;
pfInfo[1][2][2] = 'NON';
fieldInfo[1][3] = "Folder_BCard_Slot";
itemInfo[1][3] = new Array(4);
pfInfo[1][3] = new Array(4);
itemInfo[1][3][0] = 0.00;
pfInfo[1][3][0] = 'NON';
itemInfo[1][3][1] = 0.00;
pfInfo[1][3][1] = 'NON';
itemInfo[1][3][2] = 0.00;
pfInfo[1][3][2] = 'NON';
itemInfo[1][3][3] = 0.00;
pfInfo[1][3][3] = 'NON';
fieldInfo[1][4] = "proof_onlyhardcopy";
itemInfo[1][4] = new Array(2);
pfInfo[1][4] = new Array(2);
itemInfo[1][4][0] = 0.00;
pfInfo[1][4][0] = 'NON';
itemInfo[1][4][1] = 35.00;
pfInfo[1][4][1] = 'NON';
fieldInfo[1][5] = "quantity_250_500_10000";
itemInfo[1][5] = new Array(12);
pfInfo[1][5] = new Array(12);
itemInfo[1][5][0] = 250.00;
pfInfo[1][5][0] = 'NON';
itemInfo[1][5][1] = 500.00;
pfInfo[1][5][1] = 'NON';
itemInfo[1][5][2] = 1000.00;
pfInfo[1][5][2] = 'NON';
itemInfo[1][5][3] = 2000.00;
pfInfo[1][5][3] = 'NON';
itemInfo[1][5][4] = 3000.00;
pfInfo[1][5][4] = 'NON';
itemInfo[1][5][5] = 4000.00;
pfInfo[1][5][5] = 'NON';
itemInfo[1][5][6] = 5000.00;
pfInfo[1][5][6] = 'NON';
itemInfo[1][5][7] = 6000.00;
pfInfo[1][5][7] = 'NON';
itemInfo[1][5][8] = 7000.00;
pfInfo[1][5][8] = 'NON';
itemInfo[1][5][9] = 8000.00;
pfInfo[1][5][9] = 'NON';
itemInfo[1][5][10] = 9000.00;
pfInfo[1][5][10] = 'NON';
itemInfo[1][5][11] = 10000.00;
pfInfo[1][5][11] = 'NON';
fieldInfo[1][6] = "turnaround1235_recon";
itemInfo[1][6] = new Array(2);
pfInfo[1][6] = new Array(2);
itemInfo[1][6][0] = 0.85;
pfInfo[1][6][0] = 'NON';
itemInfo[1][6][1] = 1.00;
pfInfo[1][6][1] = 'NON';
baseInfo[1] = 0;