<!--
// A3 order form only at present
// A3 size rate for single side = 1.8
// A3 size rate for double side = 2.8
function updatePaperChoices_A3A4Leaflets()
{
	//if the user chooses full colour from the colour menu, then the economy option disappears from the paper menu
	
	if (document.frmPrintOrder.frmColours.options[document.frmPrintOrder.frmColours.selectedIndex].text == "Full colour")
	{		
		document.frmPrintOrder.frmStock.options.length = 0;
  		document.frmPrintOrder.frmStock.options[document.frmPrintOrder.frmStock.options.length] = new Option('150gsm art paper','150');				
		document.frmPrintOrder.frmStock.options[document.frmPrintOrder.frmStock.options.length] = new Option('170gsm art paper','170');
	  	document.frmPrintOrder.frmStock.options[document.frmPrintOrder.frmStock.options.length] = new Option('200gsm art paper','200');	
  		document.frmPrintOrder.frmStock.options[document.frmPrintOrder.frmStock.options.length] = new Option('300gsm art paper','300');					
	}
	else
	{
		document.frmPrintOrder.frmStock.options.length = 0;
		document.frmPrintOrder.frmStock.options[document.frmPrintOrder.frmStock.options.length] = new Option('80gsm bond paper','80');
	  	document.frmPrintOrder.frmStock.options[document.frmPrintOrder.frmStock.options.length] = new Option('100gsm bond paper','100');	
  		document.frmPrintOrder.frmStock.options[document.frmPrintOrder.frmStock.options.length] = new Option('150gsm art paper','150');				
		document.frmPrintOrder.frmStock.options[document.frmPrintOrder.frmStock.options.length] = new Option('170gsm art paper','170');
	  	document.frmPrintOrder.frmStock.options[document.frmPrintOrder.frmStock.options.length] = new Option('200gsm art paper','200');	
  		document.frmPrintOrder.frmStock.options[document.frmPrintOrder.frmStock.options.length] = new Option('300gsm art paper','300');						
	}
}


function setCheckedValue(radioObj, newValue) {
	if(!radioObj)
		return;
	var radioLength = radioObj.length;
	if(radioLength == undefined) {
		radioObj.checked = (radioObj.value == newValue.toString());
		return;
	}
	for(var i = 0; i < radioLength; i++) {
		radioObj[i].checked = false;
		if(radioObj[i].value == newValue.toString()) {
			radioObj[i].checked = true;
		}
	}
}

function calcPrintCost() {

	var sSize;
	var lSizeRate; //single default
	var iQuantity;
	var iSides;
	var iColours;
	var lSetup;
	var bArtwork;
	var lSubtotal=0.0;
	var lVAT;
	var lTotal;
	var iIndex;
	var quantity;
	var Rate;
	var sStock;
	var lPantoneCharge = 0.0;
	//var sColourType;
	var fStock;
	var fSize;
	var j;
	var i;
	var lHourlyRate = 22.00;

	iQuantity=document.frmPrintOrder.frmQuantity.value;
	sSize=document.frmPrintOrder.frmSize.value;
	iSides=document.frmPrintOrder.frmSides.value;
	
	fSize=document.frmPrintOrder.frmSize.options[document.frmPrintOrder.frmSize.selectedIndex].text;
	fStock=document.frmPrintOrder.frmStock.options[document.frmPrintOrder.frmStock.selectedIndex].text;

	if (sSize=="A3")
	{
		if (iSides=="1")
		{
			lSizeRate=1.8
		}else{
			lSizeRate=2.8
		}
	}	
	
	iColours=document.frmPrintOrder.frmColours.value;
	bArtwork=document.frmPrintOrder.frmArtwork.value;
	sStock=document.frmPrintOrder.frmStock.value;
	
	if (iColours!="3") {
		
		j=document.frmPrintOrder.frmPantones.length; //alert(j)
		for (i=0; i<j; i++){
			if(document.frmPrintOrder.frmPantones[i].checked) var sColourType = document.frmPrintOrder.frmPantones[i].value
		}
		
		if ((sColourType=="None")||(sColourType=="Full")) {
			lPantoneCharge = 0.0;
		}		if (sColourType=="1"){
			lPantoneCharge = 10.0;
		}		
		if (sColourType=="2"){
			lPantoneCharge = 20.0;
		}			}else{
		lPantoneCharge = 0.0;
		
		j=document.frmPrintOrder.frmPantones.length; //alert(j)
		for (i=0; i<j; i++){
			if ((document.frmPrintOrder.frmPantones[i].checked)== true){
				document.frmPrintOrder.frmPantones[i].checked = false;
			}
		}
	}
	

	if (bArtwork=="yes")
	{
		//setup is checking fee depending on no of colours
		if (iColours==1)
		{
			lSetup=13.0
		}		
		if (iColours==2)
		{
			lSetup=18.0
		}
		if (iColours==3)
		{
			lSetup=33.0
		}
	}else{
		lSetup = Math.round((1.1*iColours*lSizeRate*lHourlyRate)+(iColours*3));
	}
	
	//add any pantone fees
	lSetup = lSetup + lPantoneCharge
	
	quantity = iQuantity; //to sort spreadsheet variable name
	
// 	BEGIN COPY PASTE SECTION A3 LEAFLETS

// A3-A4 Leaflets			a3-a4leaflets.js		
//80 gsm prices					
					
if (sStock == "80"){					
	if (iSides == "2"){				
		if (iColours == "1"){			
			if (quantity == "500"){Rate = 	122.935	;}
			if (quantity == "1000"){Rate = 	180.785	;}
			if (quantity == "2000"){Rate = 	253.685	;}
			if (quantity == "5000"){Rate = 	322.47	;}
			if (quantity == "10000"){Rate = 	500.545	;}
			if (quantity == "20000"){Rate = 	868.025	;}
		}			
		if (iColours == "2"){			
			if (quantity == "500"){Rate = 	150.88	;}
			if (quantity == "1000"){Rate = 	205.085	;}
			if (quantity == "2000"){Rate = 	265.835	;}
			if (quantity == "5000"){Rate = 	383.22	;}
			if (quantity == "10000"){Rate = 	602.605	;}
			if (quantity == "20000"){Rate = 	1066.07	;}
		}			
		if (iColours == "3"){			
			if (quantity == "500"){Rate = 	0	;}
			if (quantity == "1000"){Rate = 	0	;}
			if (quantity == "2000"){Rate = 	0	;}
			if (quantity == "5000"){Rate = 	0	;}
			if (quantity == "10000"){Rate = 	0	;}
			if (quantity == "20000"){Rate = 	0	;}
		}			
	}				
}// end 80gsm					
					
					
//100 gsm prices					
if (sStock == "100"){					
	if (iSides == "2"){				
		if (iColours == "1"){			
			if (quantity == "500"){Rate = 	150.88	;}
			if (quantity == "1000"){Rate = 	200.225	;}
			if (quantity == "2000"){Rate = 	279.2	;}
			if (quantity == "5000"){Rate = 	355.275	;}
			if (quantity == "10000"){Rate = 	550.36	;}
			if (quantity == "20000"){Rate = 	970.085	;}
		}			
		if (iColours == "2"){			
			if (quantity == "500"){Rate = 	166.675	;}
			if (quantity == "1000"){Rate = 	241.535	;}
			if (quantity == "2000"){Rate = 	324.155	;}
			if (quantity == "5000"){Rate = 	391.725	;}
			if (quantity == "10000"){Rate = 	664.57	;}
			if (quantity == "20000"){Rate = 	1211.87	;}
		}			
		if (iColours == "3"){			
			if (quantity == "500"){Rate = 	0	;}
			if (quantity == "1000"){Rate = 	0	;}
			if (quantity == "2000"){Rate = 	0	;}
			if (quantity == "5000"){Rate = 	0	;}
			if (quantity == "10000"){Rate = 	0	;}
			if (quantity == "20000"){Rate = 	0	;}
		}			
	}				
}// end 100gsm					
					
//130 gsm art					
if (sStock == "130"){					
	if (iSides == "2"){				
		if (iColours == "1"){			
			if (quantity == "500"){Rate = 	158.17	;}
			if (quantity == "1000"){Rate = 	224.525	;}
			if (quantity == "2000"){Rate = 	291.35	;}
			if (quantity == "5000"){Rate = 	371.07	;}
			if (quantity == "10000"){Rate = 	635.41	;}
			if (quantity == "20000"){Rate = 	1044.2	;}
		}			
		if (iColours == "2"){			
			if (quantity == "500"){Rate = 	183.685	;}
			if (quantity == "1000"){Rate = 	265.835	;}
			if (quantity == "2000"){Rate = 	358.175	;}
			if (quantity == "5000"){Rate = 	431.82	;}
			if (quantity == "10000"){Rate = 	726.535	;}
			if (quantity == "20000"){Rate = 	1211.87	;}
		}			
		if (iColours == "3"){			
			if (quantity == "500"){Rate = 	269.95	;}
			if (quantity == "1000"){Rate = 	339.95	;}
			if (quantity == "2000"){Rate = 	418.925	;}
			if (quantity == "5000"){Rate = 	495	;}
			if (quantity == "10000"){Rate = 	848.035	;}
			if (quantity == "20000"){Rate = 	1311.5	;}
		}			
	}				
}// end 130gsm					
					
//150 gsm 					
if (sStock == "150"){					
	if (iSides == "2"){				
		if (iColours == "1"){			
			if (quantity == "500"){Rate = 	0	;}
			if (quantity == "1000"){Rate = 	0	;}
			if (quantity == "2000"){Rate = 	0	;}
			if (quantity == "5000"){Rate = 	0	;}
			if (quantity == "10000"){Rate = 	0	;}
			if (quantity == "20000"){Rate = 	0	;}
		}			
		if (iColours == "2"){			
			if (quantity == "500"){Rate = 	0	;}
			if (quantity == "1000"){Rate = 	0	;}
			if (quantity == "2000"){Rate = 	0	;}
			if (quantity == "5000"){Rate = 	0	;}
			if (quantity == "10000"){Rate = 	0	;}
			if (quantity == "20000"){Rate = 	0	;}
		}			
		if (iColours == "3"){			
			if (quantity == "500"){Rate = 	302.6019231	;}
			if (quantity == "1000"){Rate = 	380.1	;}
			if (quantity == "2000"){Rate = 	465.15	;}
			if (quantity == "5000"){Rate = 	554.7980769	;}
			if (quantity == "10000"){Rate = 	951.585	;}
			if (quantity == "20000"){Rate = 	1474.202308	;}
		}			
	}				
}// end 150gsm 					
					
//170 gsm 					
if (sStock == "170"){					
	if (iSides == "2"){				
		if (iColours == "1"){			
			if (quantity == "500"){Rate = 	0	;}
			if (quantity == "1000"){Rate = 	0	;}
			if (quantity == "2000"){Rate = 	0	;}
			if (quantity == "5000"){Rate = 	0	;}
			if (quantity == "10000"){Rate = 	0	;}
			if (quantity == "20000"){Rate = 	0	;}
		}			
		if (iColours == "2"){			
			if (quantity == "500"){Rate = 	0	;}
			if (quantity == "1000"){Rate = 	0	;}
			if (quantity == "2000"){Rate = 	0	;}
			if (quantity == "5000"){Rate = 	0	;}
			if (quantity == "10000"){Rate = 	0	;}
			if (quantity == "20000"){Rate = 	0	;}
		}			
		if (iColours == "3"){			
			if (quantity == "500"){Rate = 	338.8988462	;}
			if (quantity == "1000"){Rate = 	425.11	;}
			if (quantity == "2000"){Rate = 	521.095	;}
			if (quantity == "5000"){Rate = 	621.8861538	;}
			if (quantity == "10000"){Rate = 	1067.285	;}
			if (quantity == "20000"){Rate = 	1652.699615	;}
		}			
	}				
}// end 170gsm					
					
//200 gsm art board					
if (sStock == "200"){					
	if (iSides == "2"){				
		if (iColours == "1"){			
			if (quantity == "500"){Rate = 	0	;}
			if (quantity == "1000"){Rate = 	0	;}
			if (quantity == "2000"){Rate = 	0	;}
			if (quantity == "5000"){Rate = 	0	;}
			if (quantity == "10000"){Rate = 	0	;}
			if (quantity == "20000"){Rate = 	0	;}
		}			
		if (iColours == "2"){			
			if (quantity == "500"){Rate = 	0	;}
			if (quantity == "1000"){Rate = 	0	;}
			if (quantity == "2000"){Rate = 	0	;}
			if (quantity == "5000"){Rate = 	0	;}
			if (quantity == "10000"){Rate = 	0	;}
			if (quantity == "20000"){Rate = 	0	;}
		}			
		if (iColours == "3"){			
			if (quantity == "500"){Rate = 	386.0542308	;}
			if (quantity == "1000"){Rate = 	492.625	;}
			if (quantity == "2000"){Rate = 	594.685	;}
			if (quantity == "5000"){Rate = 	713.4057692	;}
			if (quantity == "10000"){Rate = 	1228.685	;}
			if (quantity == "20000"){Rate = 	1876.098077	;}
		}			
	}				
}// end 200gsm					
					
//300 gsm art board					
if (sStock == "300"){					
	if (iSides == "2"){				
		if (iColours == "1"){			
			if (quantity == "500"){Rate = 	0	;}
			if (quantity == "1000"){Rate = 	0	;}
			if (quantity == "2000"){Rate = 	0	;}
			if (quantity == "5000"){Rate = 	0	;}
			if (quantity == "10000"){Rate = 	0	;}
			if (quantity == "20000"){Rate = 	0	;}
		}			
		if (iColours == "2"){			
			if (quantity == "500"){Rate = 	0	;}
			if (quantity == "1000"){Rate = 	0	;}
			if (quantity == "2000"){Rate = 	0	;}
			if (quantity == "5000"){Rate = 	0	;}
			if (quantity == "10000"){Rate = 	0	;}
			if (quantity == "20000"){Rate = 	0	;}
		}			
		if (iColours == "3"){			
			if (quantity == "500"){Rate = 	589.803284	;}
			if (quantity == "1000"){Rate = 	648.4534615	;}
			if (quantity == "2000"){Rate = 	797.8984615	;}
			if (quantity == "5000"){Rate = 	942.8136391	;}
			if (quantity == "10000"){Rate = 	1662.767308	;}
			if (quantity == "20000"){Rate = 	2553.468018	;}
		}			
	}				
}// end 300gsm					
						
// 	END COPY PASTE SECTION A3 LEAFLETS
	
	if (Rate != 0){		lSubtotal=Math.round(Math.abs((Rate*1)+lSetup)*100)/100;
		document.frmPrintOrder.PSelected_Price.value=lSubtotal+"";
	
		lVAT=Math.round((Math.abs(lSubtotal))*0.0*100)/100;
		document.frmPrintOrder.frmVAT.value=lVAT+"";
	
		lTotal=Math.round((Math.abs(lVAT+lSubtotal))*100)/100;
		document.frmPrintOrder.frmTotal.value=lTotal+"";
	}
	else{
		document.frmPrintOrder.PSelected_Price.value="N/A online";
	
		lVAT=Math.round((Math.abs(lSubtotal))*0.0*100)/100;
		document.frmPrintOrder.frmVAT.value="Call for quote";
	
		lTotal=Math.round((Math.abs(lVAT+lSubtotal))*100)/100;
		document.frmPrintOrder.frmTotal.value="";
	}
	
	document.frmPrintOrder.Order_Summary.value= "Size:" + fSize + "; Quantity:" + quantity + ";\nStock:" + fStock + "; Sides:" + iSides + ";\nColours:" + iColours + "; Pantone Mixes: " + sColourType + ";\nArtwork Supplied: " + bArtwork;
}

//-->