	am = "GEA Aircooled Systems (Pty) Ltd. 2003"

	bV  = parseInt(navigator.appVersion)
	bNS = navigator.appName=="Netscape"
	bIE = navigator.appName=="Microsoft Internet Explorer"

	function nrc(e) {
  		if (bNS && e.which > 1){
     			alert(am)
     			return false
   		} else if (bIE && (event.button >1)) {
     			alert(am)
     			return false;
   		}
	}

	document.onmousedown = nrc;
	if (document.layers) window.captureEvents(Event.MOUSEDOWN);
	if (bNS && bV<5) window.onmousedown = nrc;


	//inputs
	var exhaustSteamFlow=0;
	var exhaustSteamPressure=0;
	var exhaustSteamQuality=0;
	var airInletTemperature=0;
	var barometricPressure=0;
	var noiseLevel=0;
	var etaFan=0.65;


	function hideInputDiv(){
		//set parameter div invisible
		document.getElementById('bp_input').style.visibility='hidden';
		document.getElementById('barLabel').style.visibility='hidden';
		document.getElementById('se_input').style.visibility='hidden';
		document.getElementById('seLabel').style.visibility='hidden';
		var inputDiv=document.getElementById('inputDiv');
		inputDiv.style.visibility='hidden';
	}


	function resetBarometricPressureInputs(){
		document.getElementById('bp_input').style.visibility='visible';
		document.getElementById('barLabel').style.visibility='visible';
		document.getElementById('se_input').style.visibility='hidden';
		document.getElementById('seLabel').style.visibility='hidden';
	}


	function doFieldChanged(theInput){
		if(theInput.name=='bp_input'){
			var pressure=theInput.value-0;
			var elevation=44332.3133*(1-Math.exp(Math.log(pressure*1000/101325)/5.2561));
			document.getElementById('se_input').value=round(elevation,2);
		}else if(theInput.name=='se_input'){
			var siteElevation=theInput.value-0;
			var pressure=101.325*Math.pow((1-(22.55691*siteElevation/1000000)),5.2561);
			document.getElementById('bp_input').value=round(pressure,5);
		}
	}


	function positionDivs(){
		var inputDivWidth=575;
		var resultDivWidth=575;
		var screenWidth=document.body.offsetWidth-0;
		var screenHeight=document.body.offsetHeight-0;
		var topMargin;
		if (screenWidth<=800){
			topMargin=270 + 'px'; // was 0
		}else{
			topMargin=270 + 'px'; // was 20
		}
		// document.getElementById('inputDiv').style.left=(screenWidth/2)-(inputDivWidth/2);
		document.getElementById('inputDiv').style.visibility='visible';
		//document.getElementById('inputDiv').style.top=(screenHeight/2)-(inputDivHeight/2)-100;
		//document.getElementById('resultsDiv').style.top=(screenHeight/2)-(resultDivHeight/2)-100;
		document.getElementById('inputDiv').style.top=topMargin;
		document.getElementById('resultsDiv').style.top=topMargin;
		// document.getElementById('resultsDiv').style.left=(screenWidth/2)-(resultDivWidth/2);
	}
