function updateQuote() {
	size = document.getElementById("size").value;
	qty = Number(document.getElementById("qty").value);
	//colours = document.getElementById("colours").value;
	//printtype = document.getElementById("printtype").value;
	vectorlogo = document.getElementById("vectorlogo").value;
	total=0;
	//if (colours=="Full" && printtype=="Screen Print") {
	//	alert("Note that Full Colour is only possible with Digital Prints.");
	//	document.getElementById("printtype").selectedIndex=1;
	//	updateQuote();
	//} else {	
	if (size=="Storm" && qty==1) {
		alert("Note that the minimum quantity for storm size flags is 2.");
		document.getElementById("qty").selectedIndex=1;
		updateQuote();
	} else {
	
		//if (printtype=="Digital Print") {
			if (size=="Storm") {			
				p=450;
			} else if (size=="Standard") {
				p=950;
			}
		//}
		/*if (printtype=="Screen Print") {
			if (size=="Storm") {
				if (colours=="1") {
					switch(true) {
						case (qty==1)								: p=1376; break;
						case (qty==2)								: p=724 ; break;
						case (qty==3)    				   	: p=579 ; break;
						case (qty==4)    				   	: p=463 ; break;
						case (qty >=5 && qty<=9)    : p=370 ; break;
						case (qty >=10 && qty<=14)	: p=289 ; break;
						case (qty >=15 && qty<=19)	: p=268 ; break;
						case (qty >=20 && qty<=29)	: p=231 ; break;
						case (qty >=30 && qty<=39)	: p=202 ; break;
						case (qty >=40 && qty<=49)	: p=187 ; break;
						case (qty >=50 && qty<=99)	: p=177 ; break;
						case (qty >=100)     				: p=158 ; break;
					}
				}
				if (colours=="2") {
					switch(true) {
						case (qty==1)								: p=2101; break;
						case (qty==2)								: p=1101; break;
						case (qty==3)    				   	: p=767 ; break;
						case (qty==4)    				   	: p=680 ; break;
						case (qty >=5 && qty<=9)    : p=564 ; break;
						case (qty >=10 && qty<=14)	: p=376 ; break;
						case (qty >=15 && qty<=19)	: p=341 ; break;
						case (qty >=20 && qty<=29)	: p=318 ; break;
						case (qty >=30 && qty<=39)	: p=283 ; break;
						case (qty >=40 && qty<=49)	: p=260 ; break;
						case (qty >=50 && qty<=99)	: p=254 ; break;
						case (qty >=100)     				: p=231 ; break;
					}
				}
				if (colours=="3") {
					switch(true) {
						case (qty==1)								: p=2899 ; break;
						case (qty==2)								: p=1449 ; break;
						case (qty==3)    				   	: p=1057 ; break;
						case (qty==4)    				   	: p=898  ; break;
						case (qty >=5 && qty<=9)    : p=738  ; break;
						case (qty >=10 && qty<=14)	: p=477  ; break;
						case (qty >=15 && qty<=19)	: p=442  ; break;
						case (qty >=20 && qty<=29)	: p=419  ; break;
						case (qty >=30 && qty<=39)	: p=361  ; break;
						case (qty >=40 && qty<=49)	: p=347  ; break;
						case (qty >=50 && qty<=99)	: p=332  ; break;
						case (qty >=100)     				: p=303  ; break;
					}
				}
				if (colours=="4") {
					switch(true) {
						case (qty==1)								: p=3769 ; break;
						case (qty==2)								: p=1956 ; break;
						case (qty==3)    				   	: p=1333 ; break;
						case (qty==4)    				   	: p=1109 ; break;
						case (qty >=5 && qty<=9)    : p=898  ; break;
						case (qty >=10 && qty<=14)	: p=579  ; break;
						case (qty >=15 && qty<=19)	: p=535  ; break;
						case (qty >=20 && qty<=29)	: p=521  ; break;
						case (qty >=30 && qty<=39)	: p=448  ; break;
						case (qty >=40 && qty<=49)	: p=434  ; break;
						case (qty >=50 && qty<=99)	: p=413  ; break;
						case (qty >=100)     				: p=361  ; break;
					}
				}
				if (colours=="5") {
					switch(true) {
						case (qty==1)								: p=4639	; break;
						case (qty==2)								: p=2319	; break;
						case (qty==3)    				   	: p=1623	; break;
						case (qty==4)    				   	: p=1304 ; break;
						case (qty >=5 && qty<=9)    : p=1072 ; break;
						case (qty >=10 && qty<=14)	: p=680  ; break;
						case (qty >=15 && qty<=19)	: p=637  ; break;
						case (qty >=20 && qty<=29)	: p=622  ; break;
						case (qty >=30 && qty<=39)	: p=535  ; break;
						case (qty >=40 && qty<=49)	: p=515  ; break;
						case (qty >=50 && qty<=99)	: p=492  ; break;
						case (qty >=100)     				: p=434  ; break;
					}
				}
			} else if (size=="Standard") {
				if (colours=="1") {
					switch(true) {
						case (qty==1)								: p=2174; break;
						case (qty==2)								: p=1217; break;
						case (qty==3)    				   	: p=985 ; break;
						case (qty==4)    				   	: p=811 ; break;
						case (qty >=5 && qty<=9)    : p=753 ; break;
						case (qty >=10 && qty<=14)	: p=535 ; break;
						case (qty >=15 && qty<=19)	: p=477 ; break;
						case (qty >=20 && qty<=29)	: p=419 ; break;
						case (qty >=30 && qty<=39)	: p=361 ; break;
						case (qty >=40 && qty<=49)	: p=347 ; break;
						case (qty >=50 && qty<=99)	: p=303 ; break;
						case (qty >=100)     				: p=274 ; break;
					}
				}
				if (colours=="2") {
					switch(true) {
						case (qty==1)								: p=2899; break;
						case (qty==2)								: p=1594; break;
						case (qty==3)    				   	: p=1275; break;
						case (qty==4)    				   	: p=1043; break;
						case (qty >=5 && qty<=9)    : p=941 ; break;
						case (qty >=10 && qty<=14)	: p=637 ; break;
						case (qty >=15 && qty<=19)	: p=564 ; break;
						case (qty >=20 && qty<=29)	: p=500 ; break;
						case (qty >=30 && qty<=39)	: p=448 ; break;
						case (qty >=40 && qty<=49)	: p=405 ; break;
						case (qty >=50 && qty<=99)	: p=384 ; break;
						case (qty >=100)     				: p=355 ; break;
					}
				}
				if (colours=="3") {
					switch(true) {
						case (qty==1)								: p=3479; break;
						case (qty==2)								: p=1884; break;
						case (qty==3)    				   	: p=1449; break;
						case (qty==4)    				   	: p=1289; break;
						case (qty >=5 && qty<=9)    : p=1080; break;
						case (qty >=10 && qty<=14)	: p=724 ; break;
						case (qty >=15 && qty<=19)	: p=666 ; break;
						case (qty >=20 && qty<=29)	: p=579 ; break;
						case (qty >=30 && qty<=39)	: p=506 ; break;
						case (qty >=40 && qty<=49)	: p=471 ; break;
						case (qty >=50 && qty<=99)	: p=434 ; break;
						case (qty >=100)     				: p=419 ; break;
					}
				}
				if (colours=="4") {
					switch(true) {
						case (qty==1)								: p=4494; break;
						case (qty==2)								: p=2464; break;
						case (qty==3)    				   	: p=1956; break;
						case (qty==4)    				   	: p=1695; break;
						case (qty >=5 && qty<=9)    : p=1405; break;
						case (qty >=10 && qty<=14)	: p=898 ; break;
						case (qty >=15 && qty<=19)	: p=796 ; break;
						case (qty >=20 && qty<=29)	: p=709 ; break;
						case (qty >=30 && qty<=39)	: p=616 ; break;
						case (qty >=40 && qty<=49)	: p=564 ; break;
						case (qty >=50 && qty<=99)	: p=544 ; break;
						case (qty >=100)     				: p=500 ; break;
					}
				}
				if (colours=="5") {
					switch(true) {
						case (qty==1)								: p=5509; break;
						case (qty==2)								: p=2899; break;
						case (qty==3)    				   	: p=2174; break;
						case (qty==4)    				   	: p=2029; break;
						case (qty >=5 && qty<=9)    : p=1666; break;
						case (qty >=10 && qty<=14)	: p=1043; break;
						case (qty >=15 && qty<=19)	: p=912 ; break;
						case (qty >=20 && qty<=29)	: p=796 ; break;
						case (qty >=30 && qty<=39)	: p=695 ; break;
						case (qty >=40 && qty<=49)	: p=637 ; break;
						case (qty >=50 && qty<=99)	: p=608 ; break;
						case (qty >=100)     				: p=558 ; break;
					}
				}
			}						
		}*/
		total+=p*qty;
		
		if (vectorlogo=="No") {
			total+=750;
			document.getElementById("q_logocreation").value="R750.00";
		} else if (vectorlogo=="Unsure") {
			document.getElementById("q_logocreation").value="To Be Confirmed";
		} else {
			document.getElementById("q_logocreation").value="-";
		}
		
		total+=75;
		total+=750;	     
		document.getElementById("q_description").value=qty+" x digital print flag"+(qty>1?"s":"")+" @ R"+number_format(p);
		document.getElementById("q_printcost").value="R"+number_format(p*qty);
		document.getElementById("q_totalcost").value="R"+number_format(total);
	}
}			
function showCost() {
	updateQuote();
	document.getElementById("wizardQuote").style.display="";
}
