function showHideMatch(obj)
{
	var val = document.search.searchby.selectedIndex;
	if(val==1)
	{
		document.getElementById('match').style.display = 'none';
	}
	else
	{
		document.getElementById('match').style.display = '';
	}
}

function preloadImages() {
   if (document.images) {
      for (var i = 0; i < preloadImages.arguments.length; i++) {
         (new Image()).src = preloadImages.arguments[i];
      }
   }
}

function changeCase(frmObj) {alert();
var index;
var tmpStr;
var tmpChar;
var preString;
var postString;
var strlen;
tmpStr = frmObj.value.toLowerCase();
strLen = tmpStr.length;
if (strLen > 0)  {
for (index = 0; index < strLen; index++)  {
if (index == 0)  {
tmpChar = tmpStr.substring(0,1).toUpperCase();
postString = tmpStr.substring(1,strLen);
tmpStr = tmpChar + postString;
}
else {
tmpChar = tmpStr.substring(index, index+1);
if (tmpChar == " " && index < (strLen-1))  {
tmpChar = tmpStr.substring(index+1, index+2).toUpperCase();
preString = tmpStr.substring(0, index+1);
postString = tmpStr.substring(index+2,strLen);
tmpStr = preString + tmpChar + postString;
         }
      }
   }
}
frmObj.value = tmpStr;
}

function MM_preloadImages() { 
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

MM_preloadImages();

function mailPage(url)
{
	window.open("http://www.instrumentationindia.com/recommend/mail_page.asp?url=" + url,"mailpage",'width=450,height=410,resizable=0,scrollbars=yes,menubar=no,status=no' );
}



function showHelpWin(id)
{
	if(id == 'messagecenter')
		{
			window.open("http://www.instrumentationindia.com/help/message_center_help.asp","messagecenterhelp",'width=420,height=300,resizable=0,scrollbars=yes,menubar=no,status=no' );
		}
	if(id == 'companyprofile')
		{
			window.open("http://www.instrumentationindia.com/help/company_profile_help.asp","companyprofilehelp",'width=420,height=300,resizable=0,scrollbars=yes,menubar=no,status=no' );
		}
	if(id == 'personalprofile')
		{
			window.open("http://www.instrumentationindia.com/help/personal_profile_help.asp","personalprofilehelp",'width=420,height=300,resizable=0,scrollbars=yes,menubar=no,status=no' );
		}
	if(id == 'personalprofilej')
		{
			window.open("http://www.instrumentationindia.com/help/personal_profile_job_help.asp","personalprofilejobhelp",'width=420,height=300,resizable=0,scrollbars=yes,menubar=no,status=no' );
		}
	if(id == 'personalprofilee')
		{
			window.open("http://www.instrumentationindia.com/help/personal_profile_emp_help.asp","personalprofileemphelp",'width=420,height=300,resizable=0,scrollbars=yes,menubar=no,status=no' );
		}
	if(id == 'tradelead')
		{
			window.open("http://www.instrumentationindia.com/help/trade_lead_help.asp","tradeleadhelp",'width=420,height=300,resizable=0,scrollbars=yes,menubar=no,status=no' );
		}
	if(id == 'productcatalog')
		{
			window.open("http://www.instrumentationindia.com/help/product_catalog_help.asp","productcataloghelp",'width=420,height=300,resizable=0,scrollbars=yes,menubar=no,status=no' );
		}
	if(id == 'myresume')
		{
			window.open("http://www.instrumentationindia.com/help/my_resume_help.asp","myresumehelp",'width=420,height=300,resizable=0,scrollbars=yes,menubar=no,status=no' );
		}
}


function submitmform(val)
	{
		document.mform.type.value = val;
		document.mform.submit();
	}

function showRefineForm()
		{
			document.getElementById('refine').style.display ='';	
		}

function checkUsername()
{
	if(document.formx.user_name.value.length == 0)
	{
		//alert("Please enter User Name.");
		return false;
	}
	else
	{
		var valid = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
		var ok = "yes";
		var temp;
		for (var i=0; i<document.formx.user_name.value.length; i++) {
		temp = "" + document.formx.user_name.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1" ) 
			{
				ok = "no";
			}
		
		}

		if (ok == "no") 
			{
				//alert("Invalid entry!  Only characters and numbers are accepted!");
				//return false;

				document.formx.checkusername.value="1";
				document.formx.checkusernamevalid.value='';
				ok = "no";
				return false;
			}
		else
			{
				document.formx.checkusernamevalid.value='1';
			}

		 if (document.formx.user_name.value.length < 4)
			{
				//alert(document.formx.user_name.value.length);
				//alert("Invalid entry! User Name should be atleast 4 characters.");
				document.formx.checkusername.value="1";
				document.formx.checkusernameminlength.value='';
				ok = "no";
				return false;
			}
		else
			{
				document.formx.checkusernameminlength.value='1';
			}
			
		 if (document.formx.user_name.value.length > 12)
			{
				
				//alert("Invalid entry! User Name should be maximum 12 characters.");
				document.formx.checkusername.value="1";
				document.formx.checkusernamemaxlength.value='';
				ok = "no";
				return false;
			}
		else
			{
				document.formx.checkusernamemaxlength.value='1';
			}

		if (ok == "yes")
			{
				document.formx.checkusername.value="1";
			}
	}
}

function checkPassword ()
{
	if(document.formx.password.value.length == 0)
	{
		//alert("Please enter Password.");
		return false;
	}
	else
	{
		var ok = "no";
		if(document.formx.password.value.indexOf(" ") != -1)
			{
				//alert("Kindly enter your Password without any spaces in it.");
				document.formx.checkpassword.value = "1";
				document.formx.checkpasswordvalid.value = "";
				return false;
			}
		else
			{
				document.formx.checkpasswordvalid.value = "1";
				ok = "yes";
			}
		 if (document.formx.password.value.length < 4)
			{
				
				//alert("Invalid entry! Password should be atleast 4 characters.");
				
				document.formx.checkpassword.value = "1";
				document.formx.checkpasswordminlength.value = "";
				return false;
			}
		else
			{
				document.formx.checkpasswordminlength.value = "1";
				ok = "yes";
			}

		var pass = document.formx.password.value;
		var rpass = document.formx.rpassword.value;
		if (pass == rpass)
			{
				ok = "yes";
				document.formx.checkpassRepass.value = "1";
			}
		else
			{
				//alert("Invalid entry! Value of Password and Retype password fields are different.");
				document.formx.checkpassword.value = "1";
				document.formx.checkpassRepass.value = "";

				return false;
			}

		if (ok == "yes")
			{
				document.formx.checkpassword.value = "1";
			}
	}
}


function addToCart(id,tdid)
{
	//var tid = eval("cart" + tdid)
	window.frames["inquiry"].small_basket.id.value = id;
	window.frames["inquiry"].small_basket.submit();
	//alert(document.getElementById('cart').innerHTML);
	this.document.getElementById(tdid).innerHTML = "Added To Basket&nbsp;";

}

function addToCart1(id,tdid1,tdid2)
{
	//var tid = eval("cart" + tdid)
	window.opener.frames["inquiry"].small_basket.id.value = id;
	window.opener.frames["inquiry"].small_basket.submit();
	//alert(document.getElementById('cart').innerHTML);
	this.document.getElementById(tdid1).innerHTML = "Added To Basket&nbsp;";
	this.document.getElementById(tdid2).innerHTML = "Added To Basket&nbsp;";
	try
		{
			window.opener.document.getElementById(tdid1).innerHTML = "Added To Basket&nbsp;";
		}
	catch(x)
		{}

}


function checkStateCity1()
		{
			if(( document.formx.state.selectedIndex== -1 || document.formx.state.selectedIndex==0 ||document.formx.state.selectedIndex==1) && document.formx.new_state.value=='')
				{
				//alert('Please select State.');
				//return false;
				}
			else
				{
					document.formx.checkState.value = "1";
				}
			
			/*if((document.formx.city.selectedIndex== -1 || document.formx.city.selectedIndex==0 || document.formx.city.selectedIndex==1) && document.formx.new_city.value=='')
				{
					//alert('Please select City.');
					//return false;
				}
			else
				{
					document.formx.checkCity.value = "1";
				}*/
		}


function showForm (id,inner)
{
	document.getElementById(id).style.display='';
	document.getElementById(id).innerHTML = inner;
}

function clearField()
{
	document.search.product.value='';
}


function openWin(id)
{
	var Win = window.open("http://www.instrumentationindia.com/bizdir/show_profile.asp?company_id=" + id, "CompanyProfile",'width=620,height=500,resizable=0,scrollbars=yes,menubar=no,status=no' );
}

function validateForm ()
{
	//alert(document.formx.first_name.value.length);
	if(document.formx.first_name.value.length == 0)
	{
		alert("Please enter First Name.");
		document.formx.first_name.focus();
		return false;
	}
	if(document.formx.last_name.value.length == 0)
	{
		alert("Please enter Last Name.");
		document.formx.last_name.focus();
		return false;
	}

	if(document.formx.company_name.value.length == 0)
	{
		alert("Please enter Company Name.");
		document.formx.company_name.focus();
		return false;
	}

	if(document.formx.designation.value.length == 0)
	{
		alert("Please enter your Designation.");
		document.formx.designation.focus();
		return false;
	}
	
	if (!((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.formx.email.value))))
		{
			alert("Invalid E-mail Address! Please re-enter.")
			document.formx.email.focus();
			return false;
		}

	if(document.formx.address.value.length==0)
	{
		alert('Please enter Address.');
		document.formx.address.focus();
		return false;
	}

	if(document.formx.country.selectedIndex==0)
	{
		alert('Please select Country.');
		document.formx.country.focus();
		return false;
	}
	

	if(document.formx.state.selectedIndex==0 && document.formx.new_state.value=='')
	{
		alert('Please select State.');
		document.formx.state.focus();
		return false;
	}
	
	if(document.formx.city.selectedIndex==0 && document.formx.new_city.value=='')
	{
		alert('Please select City.');
		document.formx.city.focus();
		return false;
	}

	if(document.formx.pincode.value.length==0)
	{
		alert('Please enter Zip/Pin Code.');
		document.formx.pincode.focus();
		return false;
	}

	if(document.formx.phone1_area_code.value.length==0)
	{
		alert('Please enter Phone Area Code.');
		document.formx.phone1_area_code.focus();
		return false;
	}

	if(document.formx.phone1_phone_no.value.length==0)
	{
		alert('Please enter Phone Number.');
		document.formx.phone1_phone_no.focus();
		return false;
	}

	if(document.formx.user_name.value.length == 0)
	{
		alert("Please enter User Name.");
		document.formx.user_name.focus();
		return false;
	}
	else
	{
		var valid = "abcdefghijklmnopqrstuvwxyz0123456789"
		var ok = "yes";
		var temp;
		for (var i=0; i<document.formx.user_name.value.length; i++) {
		temp = "" + document.formx.user_name.value.substring(i, i+1);
		if (valid.indexOf(temp) == "-1" ) ok = "no";
		}

		if (ok == "no") 
			{
				alert("Invalid entry!  Only characters and numbers are accepted!");
				return false;
			}

		 if (document.formx.user_name.value.length < 4)
			{
				
				alert("Invalid entry! User Name should be atleast 4 characters.");
				return false;
			}
	}

	if(document.formx.password.value.length == 0)
	{
		alert("Please enter Password.");
		document.formx.password.focus();
		return false;
	}
	else
	{
		if(document.formx.password.value.indexOf(" ") != -1)
			{
				alert("Kindly enter your Password without any spaces in it.")
				return false;
		}
		 if (document.formx.password.value.length < 4)
			{
				
				alert("Invalid entry! Password should be atleast 4 characters.");
				return false;
			}
	}
	
	
	
	
}



//-- Dropdown alert Start


var ie=document.all
var dom=document.getElementById
var ns4=document.layers
var bouncelimit=8 
var strIamHere=0

//-----------------
function startMessage(ID,pos){
strIamHere=1
if (!dom&&!ie&&!ns4)
return
messagewin=(dom)?document.getElementById(ID).style : ie? document.all.dropin : document.dropin
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
messagewin.top=scroll_top-250
messagewin.visibility=(dom||ie)? "visible" : "show"
dropstart=setInterval("dropin("+pos+")",40)
}

function dropin(pos){
scroll_top=(ie)? document.body.scrollTop : window.pageYOffset
if (parseInt(messagewin.top)<pos+scroll_top)
messagewin.top=parseInt(messagewin.top)+40
else{
clearInterval(dropstart)
bouncestart=setInterval("bouncein()",50)
}
}
function bouncein(){
messagewin.top=parseInt(messagewin.top)-bouncelimit
if (bouncelimit<0)
bouncelimit+=8
bouncelimit=bouncelimit*-1
if (bouncelimit==0){
clearInterval(bouncestart)
//setTimeout("terminatemessage()",8000);
}
}
function terminatemessage(){
if (window.bouncestart){
clearInterval(bouncestart)
messagewin.visibility="hidden"
bouncelimit=8
strIamHere=0
}
}
function checker(ID,pos){
if(strIamHere==0){
startMessage(ID,pos);
}
}


//-- Dropdown alert End



//-- validate username and password field - Start
function validate(field) {
var valid = "abcdefghijklmnopqrstuvwxyz0123456789"
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1" ) ok = "no";
}

if (ok == "no") 
	{
		alert("Invalid entry!  Only characters and numbers are accepted!");
		return false;
	}

 if (field.value.length < 4)
	{
		
		alert("Invalid entry! User Name should be atleast 4 characters.");
		return false;
	}

}
//-- validate username and password field - End

function validatePassword(field)
{
	if(field.value.indexOf(" ") != -1)
	{
		alert("Kindly enter your User Name without any spaces in it.")
		return false;
	}
	if(field.value.length < 4)
	{
		alert("Invalid entry! Password should be atleast 4 characters.")
		return false;
	}
}

//-- Initcap function - start
function changeCase(frmObj) {
var index;
var tmpStr;
var tmpChar;
var preString;
var postString;
var strlen;
tmpStr = frmObj.value.toLowerCase();
strLen = tmpStr.length;
if (strLen > 0)  {
for (index = 0; index < strLen; index++)  {
if (index == 0)  {
tmpChar = tmpStr.substring(0,1).toUpperCase();
postString = tmpStr.substring(1,strLen);
tmpStr = tmpChar + postString;
}
else {
tmpChar = tmpStr.substring(index, index+1);
if (tmpChar == " " && index < (strLen-1))  {
tmpChar = tmpStr.substring(index+1, index+2).toUpperCase();
preString = tmpStr.substring(0, index+1);
postString = tmpStr.substring(index+2,strLen);
tmpStr = preString + tmpChar + postString;
         }
      }
   }
}
frmObj.value = tmpStr;
}
//-- initcap function - end

function textCounter(field, countfield, maxlimit) 
	{
		if (field.value.length > maxlimit) // if too long...trim it!
			field.value = field.value.substring(0, maxlimit);
			// otherwise, update 'characters left' counter
		else 
			countfield.value = maxlimit - field.value.length;
	}

function showState()
{
	val =document.formx.state.selectedIndex;
	if (val == 1)
	{
		document.getElementById('tr1').style.display='';
		document.formx.new_state.focus();
	}
}

function hideState()
{
	document.getElementById('tr1').style.display='none';
}

function showCity()
{
	val =document.formx.city.selectedIndex;
	if (val == 0)
	{
		document.getElementById('tr2').style.display='';
	}
}

function hideCity()
{
	document.getElementById('tr2').style.display='none';
}

function checkStateCity()
{
	if(document.formx.state.selectedIndex==0 && document.formx.new_state.value=='')
	{
		alert('Please select State.');
		return false;
	}
	
	if(document.formx.city.selectedIndex==0 && document.formx.new_city.value=='')
	{
		alert('Please select City.');
		return false;
	}
}


function makeOn(obj)
{

	obj.className='on';
}

function makeOff(obj)
{
	obj.className='off';
}

// FORM VALIDATION
function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i>d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}


function MM_validateForm() { //v3.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments,FirstError='';
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=args[i+1]; if(nm==''){nm=val.name;} if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) {
        if (!ValidateEmail(val)) {
        	errors+='- '+nm+' must contain an e-mail address.\n';if(FirstError=='') FirstError=args[i]
        }
      } 
else if (test!='R') 
	{ 
		num = parseFloat(val);
        if (val!=num) 
			{
				errors+='- '+nm+' must contain a number.\n';
					if(FirstError=='') FirstError=args[i];
			}
		if (test.indexOf('inRange') != -1) 
			{ 
				p=test.indexOf(':');
				min=test.substring(8,p); 
				max=test.substring(p+1);
			if (num<min || max<num) 
				{
					errors+='- '+nm+' must be between '+min+' and '+max+'.\n';
					if(FirstError=='') FirstError=args[i]
				}
			}
	} 
} 

else if (test.charAt(0) == 'M') 
	{
		errors += '- '+nm+' \n';
		if(FirstError=='') FirstError=args[i]
	} 

else if (test.charAt(0) == 'R') 
	{
		errors += '- '+nm+' is required.\n';
		if(FirstError=='') FirstError=args[i]
	} 
}
  } if (errors) {alert('The following error(s) occurred:\n'+errors); }
  document.MM_returnValue = (errors == '');
}

function ValidateEmail(strEmail)
{
	strAddress= new String(strEmail);
	lngCountAt = new Number(0);
	lngCountAt=0;
	lngLastDotPos = new Number(0);
	lngLastDotPos=0;
	try
	{
		if (strAddress.length < 7)
			throw "e";
		strCurrentChar = new String(strAddress.substr(0,1));
		if ((strCurrentChar==".") || (strCurrentChar=="@") || (strCurrentChar=="_") || (strCurrentChar=="-"))
			throw "e";
		for(i=0;i<strAddress.length;i++)
		{
			strCurrentChar = strAddress.charAt(i);
			if (strCurrentChar == "@")
				lngCountAt = lngCountAt + 1;
			if (strCurrentChar == ".")
			{
		          if (i == lngLastDotPos + 1)
        		      throw "e";
        		  else
		              lngLastDotPos = i;
			}
			if ((strAddress.charCodeAt(i)>=1 && strAddress.charCodeAt(i)<=44) || (strAddress.charCodeAt(i)>=58 && strAddress.charCodeAt(i)<=63) || (strAddress.charCodeAt(i)>=91 && strAddress.charCodeAt(i)<=94) || (strAddress.charCodeAt(i)>=123 && strAddress.charCodeAt(i)<=255))
					throw "e";
			if (strAddress.charCodeAt(i)==47 || strAddress.charCodeAt(i)==96)
    	       	throw "e";
		}
		if (lngCountAt != 1)
				throw "e";
		if (lngLastDotPos == 0)
				throw "e";

		return true;
	}
	catch(er)
	{
		if (er=="e")
			return false;
	}
}

function check_duration(a1,a2){
	var d1 = new Date(a1);
	var d2 = new Date(a2);
	if (d1.toLocaleString() > d2.toLocaleString()){
		alert("Starting date/time must be lesser than Ending date/time.");
		return false;
	}
}


//VALIDATING LISTBOXES
function MM_validateSelect(selectList){
	document.MM_returnValue=true
	errMessage=''
	selectArray = selectList.split(",")
	for(i=0;i<selectArray.length;i++){
		selectObject = eval("form1."+ selectArray[i])
		if(selectObject.value == ""){
			errMessage = errMessage + selectArray[i] + " cannot be blank" + '\n'
			document.MM_returnValue=false;
		}
	}
	if (errMessage!='')
		alert(errMessage)
	return document.MM_returnValue
}



//------------Functions for Calculator Start
//<!-- Generic Unit Conversion Program 
// Author    : Jonathan Weesner (jweesner@cyberstation.net)  21 Nov 95
// Copyright : You want it? Take it! ... but leave the Author line intact please!
<!--

function calculateFormData(form){
    var firstvalue = 0;
    for (var i = 0; i <= form.count-1; i++) {
       // Find first non-blank entry
	   //alert(form.elements[2].name);
       if (form.elements[i].value != null && 
           form.elements[i].value.length != 0) {
//    if (i == 0 && form.elements[2].value != "") return false;
          var parsecheck = "" + parseFloat(form.elements[i].value);
          if (parseFloat(form.elements[i].value) == 0 ||
              parsecheck == "NaN") {
             window.alert ("Please enter a non-zero number.");
             return false;
        }
  firstvalue = form.elements[i].value / form.elements[i].factor;
  break;
       }
    }
    if (firstvalue == 0) {
       clearform(form);
       return false;
    }
    for (var i = 0; i <= form.count-1; i++)
       form.elements[i].value = 
          formatvalue((firstvalue * form.elements[i].factor), form.rsize);
    return true;
}
function calcTemp(tForm){
    var cTemp = 0.0;
    if (tForm.fromUnits.options[tForm.fromUnits.selectedIndex].value ==
        tForm.toUnits.options[tForm.toUnits.selectedIndex].value) {
        tForm.toField.value = tForm.fromField.value;
    }
    else {
        // first convert to Celcius
        if (tForm.fromUnits.options[tForm.fromUnits.selectedIndex].value == 'F'){
            cTemp = ((parseFloat(tForm.fromField.value) - 32) * 5/9);
        } else if (tForm.fromUnits.options[tForm.fromUnits.selectedIndex].value == 'K'){
            cTemp = parseFloat(tForm.fromField.value) - 273.15;
        } else if (tForm.fromUnits.options[tForm.fromUnits.selectedIndex].value == 'R'){
            cTemp = (parseFloat(tForm.fromField.value) - 459.67 - 32) * 5/9;
        } else if (tForm.fromUnits.options[tForm.fromUnits.selectedIndex].value == 'C'){
            cTemp = (parseFloat(tForm.fromField.value));
        }

        // now convert to desired units
        if (tForm.toUnits.options[tForm.toUnits.selectedIndex].value == 'F'){
            tForm.toField.value = cTemp * 9/5 + 32;
        } else if (tForm.toUnits.options[tForm.toUnits.selectedIndex].value == 'K'){
            tForm.toField.value = cTemp + 273.15;
        } else if (tForm.toUnits.options[tForm.toUnits.selectedIndex].value == 'R'){
            tForm.toField.value = cTemp * 9/5 + 32 + 459.67;
        } else if (tForm.toUnits.options[tForm.toUnits.selectedIndex].value == 'C'){
            tForm.toField.value = cTemp;
        }
    }
}
function formatvalue(input, rsize) {
   var invalid = "**************************";
   var nines = "999999999999999999999999";
   var strin = "" + input;
   var fltin = parseFloat(strin);
   if (strin.indexOf("e") != -1 ||
       fltin > parseFloat(nines.substring(0,rsize)+".4"))
      return invalid.substring(0, rsize);
   if (strin.length <= rsize) return strin;
   var rounded = "" + (fltin + 
      (fltin - parseFloat(strin.substring(0, rsize))));
   return rounded.substring(0, rsize);
}
function clearform(form) {
    for (var i = 0; i <= form.count-1; i++) form.elements[i].value = "";
    return true;
}
// -->


<!--
function fpsgpmcomp (obj) {

with (Math) {
v1=eval(obj.valueFPS.value);
d1=eval(obj.valueD.value);

gpm1 = (v1 / 0.4085) * (d1 * d1)

obj.gpmresult.value =gpm1;


}       
}
// -->
<!--
function gpmfpscomp (obj) {

with (Math) {
d1=eval(obj.valueD.value);
g1=eval(obj.valueGPM.value);

fps1 = (g1 * 0.4085) / (d1 * d1)

obj.fpsresult.value =fps1;


}       
}
// -->

//------------Functions for Calculator End


function newwind()
{
	window.open('http://www.instrumentationindia.com/ebrochure/ebrochure_sys.htm','mywin','left=100,top=100,width=802,height=602,toolbar=0,resizable=0');
}