// JavaScript Document<script language="JavaScript">
function format (expr, decplaces) {
var str = "" + Math.round (eval (expr) * Math.pow(10,decplaces))           //(eval (expr) * Math.pow(10.decplaces)
while (str.length <= decplaces) {
	str = "0" + str
	}
	var decpoint = str.length - decplaces
	return str.substring(0,decpoint) + "." + str.substring(decpoint,str.length);
	}
function calcDrive() {
//	alert (document.calc.txtDaysStorage.value)
	document.calc.txtDriveNeeded.value = format(((parseInt(document.calc.cboNoCameras.value) * parseInt(document.calc.cboFPS.value) * parseInt(document.calc.cboHoursPerDay.value) * 3600 * 3 ) / 1000000 ) * ((parseInt(document.calc.txtDaysStorage.value) / 7) * parseInt(document.calc.cboDaysPerWeek.value)),0)  + ' Gigabytes' // + parseInt(document.calc.cboMotion)
}

