  function calcTotal(){
    quantity = document.frmCalc.scanQuantity.value;
    resolution = document.frmCalc.outputRes.value;
	fileSize = Math.ceil(Math.round((document.frmCalc.outputWidth.value * document.frmCalc.outputHeight.value * document.frmCalc.outputRes.value * document.frmCalc.outputRes.value * 3) / (1024 * 1024) * 100) / 100);
	totalFileSize = fileSize * quantity;

	document.frmCalc.TotalFileSize.value = totalFileSize;
	  
	if (fileSize <= 50) {ScanPrice1 = Math.ceil(Math.round((fileSize * 0.50) * 100) / 100);}
	if (fileSize > 50 & fileSize <= 100) {ScanPrice1 = Math.ceil(Math.round((fileSize * 0.45) * 100) / 100);}
	if (fileSize > 100 & fileSize <= 300) {ScanPrice1 = Math.ceil(Math.round((fileSize * 0.40) * 100) / 100);}
	if (fileSize > 300 & fileSize <= 600) {ScanPrice1 = Math.ceil(Math.round((fileSize * 0.35) * 100) / 100);}
	if (fileSize > 600 & fileSize <= 1000) {ScanPrice1 = Math.ceil(Math.round((fileSize * 0.30) * 100) / 100);}
	if (fileSize > 1000 & fileSize <= 10000) {ScanPrice1 = Math.ceil(Math.round((fileSize * 0.25) * 100) / 100);}
	if (totalFileSize > 10000) {
			alert("Please contact our Customer Service for a special quote.");
			return false;
	}
	
	if (totalFileSize <= 50) {ScanPrice2 = Math.ceil(Math.round((fileSize * 0.50) * 100) / 100);}
	if (totalFileSize > 50 & totalFileSize <= 100) {ScanPrice2 = Math.ceil(Math.round((fileSize * 0.45) * 100) / 100);}
	if (totalFileSize > 100 & totalFileSize <= 300) {ScanPrice2 = Math.ceil(Math.round((fileSize * 0.40) * 100) / 100);}
	if (totalFileSize > 300 & totalFileSize <= 600) {ScanPrice2 = Math.ceil(Math.round((fileSize * 0.35) * 100) / 100);}
	if (totalFileSize > 600 & totalFileSize <= 1000) {ScanPrice2 = Math.ceil(Math.round((fileSize * 0.30) * 100) / 100);}
	if (totalFileSize > 1000 & totalFileSize <= 10000) {ScanPrice2 = Math.ceil(Math.round((fileSize * 0.25) * 100) / 100);}
	if (totalFileSize > 10000) {
			alert("Please contact our Customer Service for a special quote.");
			return false;
	}

	savings = ScanPrice2 / ScanPrice1;

	if (document.frmCalc.scanQuantity.value > 1) {
			document.frmCalc.FormSavings.value = 100 - Math.round(savings * 100) + '%';
	} else {
			document.frmCalc.FormSavings.value = 0 + '%';
	}				

	document.frmCalc.FormQuantity.value = quantity + ' Scans';
	document.frmCalc.ScanPrice1.value = '$ ' + ScanPrice1;
	document.frmCalc.ScanPrice2.value = '$ ' + ScanPrice2;
    document.frmCalc.TotalScanPrice.value = '$ ' + (ScanPrice2 * quantity)

    return false;
   }
