// This script is intended to work in conjunction with labcalculator.js which creates the LabCalc global object

LabCalc.calculate = function () {
	// Get input 
	var x = document.calculator.input1.value;
	
	try {
	// Calculate result
	var y = eval(x);
	}
	catch(exception) {
		alert(exception);
		return;
	}
	
	// display result(s) in output1 element
	document.calculator.output1.value=y;
	// Update ticker
	LabCalc.updateTicker(x,y);
}
