    function newWindow(strURL) {

     showImage = window.open(strURL,'newWin', 'width=500, height=600, left=100, top=100, scrollbars=no')
    }

function validateInput(){


	var Amp = frm_flash.valAmp.value;
	var ABF = frm_flash.valABF.value;
        var Volt = frm_flash.valVolt.value;

  	if (ABF == "") {
  		alert("Fault Current must have a value");
  		return false;
  		}

  	if (Amp == "") {
  		alert("Arc duration must have a value");
  		return false;
  		}

  	if (isNaN(ABF)) {
  		alert("Fault Current must be numeric");
  		return false;
  		}

  	if (isNaN(Amp)) {
  		alert("Arc duration must be numeric");
  		return false;
  		}

  	if ((ABF > 50) || (ABF < 16))	 {
  		alert("Fault Current Values must be from 16kA to 50kA.\nContact us for Fault Currents that are not in this range");
  		return false;
  		}

  	if ((Amp > 1) || (Amp <=0.01)) {
  		alert("Arc duration should be above 0.01 seconds. Upper limit is set at 1sec");
  		return false;
  		}

        if (Volt == "") {
                alert("System Voltage must have a value");
                return false;
                }

        if (isNaN(Volt)) {
                alert("System Voltage must be numeric");
                return false;
                }

        if ((Volt > 600) || (Volt < 280)) {
         alert("Contact us for system voltages greater than 600 Volt or less then 280 Volt");
                return false;
                }

}

function sqRt(form, numero) {
var Time = form.num.value;
        if ((Time > 10) || (Time < 0.01)) {
                alert("Fault duration values must be within 0.01 to 10sec.");
                return false;
                }

        if (isNaN(Time)) {
                alert("Time duration must be numeric");
                return false;
                }
var ans = Math.sqrt(Time) * numero;
ans = round(ans,2);
form.answer.value = ans;
}

function round(number,X) {
// rounds number to X decimal places, defaults to 2
X = (!X ? 2 : X);
return Math.round(number*Math.pow(10,X))/Math.pow(10,X);
}
