﻿<!-- Begin
/*
  -------------------------------------------------------------------------
	                    JavaScript Form Validator 
                                Version 2.0.2
	Copyright 2003 JavaScript-coder.com. All rights reserved.
	You use this script in your Web pages, provided these opening credit
    lines are kept intact.
	The Form validation script is distributed free from JavaScript-Coder.com

	You may please add a link to JavaScript-Coder.com, 
	making it easy for others to find this script.
	Checkout the Give a link and Get a link page:
	http://www.javascript-coder.com/links/how-to-link.php

    You may not reprint or redistribute this code without permission from 
    JavaScript-Coder.com.
	
	JavaScript Coder
	It precisely codes what you imagine!
	Grab your copy here:
		http://www.javascript-coder.com/
    -------------------------------------------------------------------------  
*/

function Validator(frmname)
{
  this.formobj=document.forms[frmname];
	if(!this.formobj)
	{
	  alert("BUG: couldnot get Form object "+frmname);
		return;
	}
	if(this.formobj.onclick)
	{
	 this.formobj.old_onclick = this.formobj.onclick;
	 this.formobj.onclick=null;
	}
	else
	{
	 this.formobj.old_onclick = null;
	}
	this.formobj.onclick=form_submit_handler;
	this.addValidation = add_validation;
	this.setAddnlValidationFunction=set_addnl_vfunction;
	this.clearAllValidations = clear_all_validations;
}
function set_addnl_vfunction(functionname)
{
  this.formobj.addnlvalidation = functionname;
}
function clear_all_validations()
{
	for(var itr=0;itr < this.formobj.elements.length;itr++)
	{
		this.formobj.elements[itr].validationset = null;
	}
}
function form_submit_handler()
{
	for(var itr=0;itr < this.elements.length;itr++)
	{
		if(this.elements[itr].validationset &&
	   !this.elements[itr].validationset.validate())
		{
		  return false;
		}
	}
	if(this.addnlvalidation)
	{
	  str =" var ret = "+this.addnlvalidation+"()";
	  eval(str);
    if(!ret) return ret;
	}
	return true;
}
function add_validation(itemname,descriptor,errstr)
{
  if(!this.formobj)
	{
	  alert("BUG: the form object is not set properly");
		return;
	}//if
	var itemobj = this.formobj[itemname];
  if(!itemobj)
	{
	  alert("BUG: Couldnot get the input object named: "+itemname);
		return;
	}
	if(!itemobj.validationset)
	{
	  itemobj.validationset = new ValidationSet(itemobj);
	}
  itemobj.validationset.add(descriptor,errstr);
}
function ValidationDesc(inputitem,desc,error)
{
  this.desc=desc;
	this.error=error;
	this.itemobj = inputitem;
	this.validate=vdesc_validate;
}
function vdesc_validate()
{
 if(!V2validateData(this.desc,this.itemobj,this.error))
 {
    this.itemobj.focus();
		return false;
 }
 return true;
}
function ValidationSet(inputitem)
{
    this.vSet=new Array();
	this.add= add_validationdesc;
	this.validate= vset_validate;
	this.itemobj = inputitem;
}
function add_validationdesc(desc,error)
{
  this.vSet[this.vSet.length]= 
	  new ValidationDesc(this.itemobj,desc,error);
}
function vset_validate()
{
   for(var itr=0;itr<this.vSet.length;itr++)
	 {
	   if(!this.vSet[itr].validate())
		 {
		   return false;
		 }
	 }
	 return true;
}
function validateEmailv2(email)
{
// a very simple email validation checking. 
// you can add more complex email checking if it helps 
    if(email.length <= 0)
	{
	  return true;
	}
    var splitted = email.match("^(.+)@(.+)$");
    if(splitted == null) return false;
    if(splitted[1] != null )
    {
      var regexp_user=/^\"?[\w-_\.]*\"?$/;
      if(splitted[1].match(regexp_user) == null) return false;
    }
    if(splitted[2] != null)
    {
      var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;
      if(splitted[2].match(regexp_domain) == null) 
      {
	    var regexp_ip =/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;
	    if(splitted[2].match(regexp_ip) == null) return false;
      }// if
      return true;
    }
return false;
}
function V2validateData(strValidateStr,objValue,strError) 
{ 
    var epos = strValidateStr.search("="); 
    var  command  = ""; 
    var  cmdvalue = ""; 
    if(epos >= 0) 
    { 
     command  = strValidateStr.substring(0,epos); 
     cmdvalue = strValidateStr.substr(epos+1); 
    } 
    else 
    { 
     command = strValidateStr; 
    } 
    switch(command) 
    { 
        case "req": 
        case "required": 
         { 
           if(eval(objValue.value.length) == 0) 
           { 
              if(!strError || strError.length ==0) 
              { 
                strError = objValue.name + " : Required Field"; 
              }//if 
              alert(strError); 
              return false; 
           }//if 
           break;             
         }//case required 
        case "maxlength": 
        case "maxlen": 
          { 
             if(eval(objValue.value.length) >  eval(cmdvalue)) 
             { 
               if(!strError || strError.length ==0) 
               { 
                 strError = objValue.name + " : "+cmdvalue+" characters maximum "; 
               }//if 
               alert(strError + "\n[Current length = " + objValue.value.length + " ]"); 
               return false; 
             }//if 
             break; 
          }//case maxlen 
        case "minlength": 
        case "minlen": 
           { 
             if(eval(objValue.value.length) <  eval(cmdvalue)) 
             { 
               if(!strError || strError.length ==0) 
               { 
                 strError = objValue.name + " : " + cmdvalue + " characters minimum  "; 
               }//if               
               alert(strError + "\n[Current length = " + objValue.value.length + " ]"); 
               return false;                 
             }//if 
             break; 
            }//case minlen 
        case "alnum": 
        case "alphanumeric": 
           { 
              var charpos = objValue.value.search("[^A-Za-z0-9]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
               if(!strError || strError.length ==0) 
                { 
                  strError = objValue.name+": Only alpha-numeric characters allowed "; 
                }//if 
                alert(strError + "\n [Error character position " + eval(charpos+1)+"]"); 
                return false; 
              }//if 
              break; 
           }//case alphanumeric 
        case "num": 
        case "numeric": 
           { 
              var charpos = objValue.value.search("[^0-9]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
                if(!strError || strError.length ==0) 
                { 
                  strError = objValue.name+": Only digits allowed "; 
                }//if               
                alert(strError + "\n [Error character position " + eval(charpos+1)+"]"); 
                return false; 
              }//if 
              break;               
           }//numeric 
        case "alphabetic": 
        case "alpha": 
           { 
              var charpos = objValue.value.search("[^A-Za-z]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
                  if(!strError || strError.length ==0) 
                { 
                  strError = objValue.name+": Only alphabetic characters allowed "; 
                }//if                             
                alert(strError + "\n [Error character position " + eval(charpos+1)+"]"); 
                return false; 
              }//if 
              break; 
           }//alpha 
		case "alnumhyphen":
			{
              var charpos = objValue.value.search("[^A-Za-z0-9\-_]"); 
              if(objValue.value.length > 0 &&  charpos >= 0) 
              { 
                  if(!strError || strError.length ==0) 
                { 
                  strError = objValue.name+": characters allowed are A-Z,a-z,0-9,- and _"; 
                }//if                             
                alert(strError + "\n [Error character position " + eval(charpos+1)+"]"); 
                return false; 
              }//if 			
			break;
			}
        case "email": 
          { 
               if(!validateEmailv2(objValue.value)) 
               { 
                 if(!strError || strError.length ==0) 
                 { 
                    strError = objValue.name+": Enter a valid Email address "; 
                 }//if                                               
                 alert(strError); 
                 return false; 
               }//if 
           break; 
          }//case email 
        case "lt": 
        case "lessthan": 
         { 
            if(isNaN(objValue.value)) 
            { 
              alert(objValue.name+": Should be a number "); 
              return false; 
            }//if 
            if(eval(objValue.value) >=  eval(cmdvalue)) 
            { 
              if(!strError || strError.length ==0) 
              { 
                strError = objValue.name + " : value should be less than "+ cmdvalue; 
              }//if               
              alert(strError); 
              return false;                 
             }//if             
            break; 
         }//case lessthan
         case "lt2": 
         { 
            if(isNaN(objValue.value)) 
            { 
              alert(objValue.name+": Should be a number "); 
              return false; 
            }//if 
            if(eval(objValue.value) >=  eval(cmdvalue)) 
            { 
              if(!strError || strError.length ==0) 
              { 
                strError = objValue.name + " : value should be less than "+ cmdvalue; 
              }//if               
              alert(strError); 
              return false;                 
             }//if
             calculate();             
            break; 
         }//case lt2
        case "gt": 
        case "greaterthan": 
         { 
            if(isNaN(objValue.value)) 
            { 
              alert(objValue.name+": Should be a number "); 
              return false; 
            }//if 
             if(eval(objValue.value) <=  eval(cmdvalue)) 
             { 
               if(!strError || strError.length ==0) 
               { 
                 strError = objValue.name + " : value should be greater than "+ cmdvalue; 
               }//if               
               alert(strError); 
               return false;                 
             }//if             
            break; 
         }//case greaterthan 
         case "gt2": 
         { 
            if(isNaN(objValue.value)) 
            { 
              alert(objValue.name+": Should be a number "); 
              return false; 
            }//if 
             if(eval(objValue.value) <=  eval(cmdvalue)) 
             { 
               if(!strError || strError.length ==0) 
               { 
                 strError = objValue.name + " : value should be greater than "+ cmdvalue; 
               }//if               
               alert(strError); 
               return false;                 
             }//if             
            break; 
            calculate();
         }//case greaterthan 

        case "regexp": 
         { 
		 	if(objValue.value.length > 0)
			{
	            if(!objValue.value.match(cmdvalue)) 
	            { 
	              if(!strError || strError.length ==0) 
	              { 
	                strError = objValue.name+": Invalid characters found "; 
	              }//if                                                               
	              alert(strError); 
	              return false;                   
	            }//if 
			}
           break; 
         }//case regexp 
        case "dontselect": 
         { 
            if(objValue.selectedIndex == null) 
            { 
              alert("BUG: dontselect command for non-select Item"); 
              return false; 
            } 
            if(objValue.selectedIndex == eval(cmdvalue)) 
            { 
             if(!strError || strError.length ==0) 
              { 
              strError = objValue.name+": Please Select one option "; 
              }//if                                                               
              alert(strError); 
              return false;                                   
             } 
             break; 
         }//case dontselect
         
    }//switch
    
    return true; 
}
/*
	Copyright 2003 JavaScript-coder.com. All rights reserved.
*/

var state = 'hidden';
var layer_ref = 'comments';
var layer_ref2 = 'moreInfo';
var layer_ref3 = 'emailButton';

function showhide(layer_ref) {

if (state == 'hidden'){
state = 'visible';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.visibility = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].visibility = state;
}
if (document.getElementById && !document.all) {
maxwell_smart = document.getElementById(layer_ref);
maxwell_smart.style.visibility = state;
}
}

function calculate()
{
	//Declare Variables
	//Variables starting with "In_" are the inputs.  Starting with "Std_Out_" are output values
	//for the standard replacement atmospheric boilers.  Starting with "Hi_Out_" are the output
	//values for high efficiency vertical coiltube boilers.
	
	In_A=0; In_B=0; In_C=0; In_D=0; In_E=0; In_F=0; In_G=0; In_H=0; In_I=0;
	Std_Out_Q=0; Std_Out_R=0; Std_Out_S=0; Std_Out_T=0; Std_Out_U=0;
	Std_Out_V=0; Std_Out_W=0; Std_Out_X=0; Std_Out_Y=0; Std_Out_Z=0;
	Hi_Out_Q=0; Hi_Out_R=0; Hi_Out_S=0; Hi_Out_T=0; Hi_Out_U=0;
	Hi_Out_V=0; Hi_Out_W=0; Hi_Out_X=0; Hi_Out_Y=0; Hi_Out_Z=0;
	AnnualFuelSavings=0;
	PaybackOnEfficiencyInvestment=0;
	totalBasic=0;
	totalHigh=0;
	
	//Receive input from form and assigns value to a variable
	In_A = document.condo.NumberofSuites.value;
	In_B = document.condo.FloorsAboveGrade.value;
	In_C = document.condo.Backup.value;
	In_D = document.condo.DHWHeatingReplacement.value;
//	In_E = document.condo.DHWStorageReplacement.value;
//	DHW storage replacement does not factor into calculation
	In_E = 1;
	In_F = document.condo.ExtraInsulation.value;
	In_G = document.condo.PremiumBoiler.value;
//	In_H = document.condo.SSChimneyLiner.value;
//	Stainless steel chimney liner is assumed
	In_H = 1;
	In_I = document.condo.Contingency.value;
	
	//Heating Capacity MBH - Q
//	Std_Out_Q = ((22.986*In_A)+460.5)*(1+(In_C/100));
//	Hi_Out_Q = ((24.716*In_A)+171)*(1+(In_C/100));
	Std_Out_Q = ((30*In_A)+200)*(1+(In_C/100));
	Hi_Out_Q = ((25*In_A)+171)*(1+(In_C/100));

	//round up to nearest 250MBH - Q
	MODQ=0;
	QROUND=0;
	MODQ=Std_Out_Q%250;
	
	if(MODQ<125)
	{
		ADD=0;
		ADD=250-MODQ;
		QROUND=Std_Out_Q+ADD;
	}
	else if(MODQ>=125)
	{
		TEMP=0;
		TEMP=Std_Out_Q-MODQ;
		QROUND=TEMP+250;
	}
	
	Std_Out_Q=QROUND;
	
	//round up to nearest 250MBH - QH
	MODQH=0;
	QHROUND=0;
	MODQH=Hi_Out_Q%250;
	
	if(MODQH<125)
	{
		ADD=0;
		ADD=250-MODQH;
		QHROUND=Hi_Out_Q+ADD;
	}
	else if(MODQH>=125)
	{
		TEMPH=0;
		TEMPH=Hi_Out_Q-MODQH;
		QHROUND=TEMPH+250;
	}
	
	Hi_Out_Q=QHROUND;	
	
	//Number of New Boilers - R
	if(Std_Out_Q>=0 && Std_Out_Q<=2000)
	{Std_Out_R=1;}
	else if(Std_Out_Q>2000 && Std_Out_Q<=4000)
	{Std_Out_R=2;}
	else if(Std_Out_Q>4000)
	{Std_Out_R=3;}
	
	//RH
	if(Hi_Out_Q>=0 && Hi_Out_Q<=2000)
	{Hi_Out_R=1;}
	else if(Hi_Out_Q>2000 && Hi_Out_Q<=4000)
	{Hi_Out_R=2;}
	else if(Hi_Out_Q>4000 && Hi_Out_Q<=6000)
	{Hi_Out_R=3;}
	else if(Hi_Out_Q>6000 && Hi_Out_Q<=8000)
	{Hi_Out_R=4;}
	else if(Hi_Out_Q>8000 && Hi_Out_Q<=10000)
	{Hi_Out_R=5;}
	else if (Hi_Out_Q>10000)
	{Hi_Out_R=6;}	
	
	//DHW Heating Capacity - S
	if(In_D==1)
	{ 
		Std_Out_S=(9.6982*In_A)+29.832;
//		Hi_Out_S=(6.3378*In_A)+331.08;
		Hi_Out_S=Std_Out_S
	}
	else
	{
		Std_Out_S=0;
		Hi_Out_S=0;
	}
	
	//round up to nearest 250MBH - S
	MODS=0;
	SROUND=0;
	MODS=Std_Out_S%250;
	
	if(MODS<125)
	{
		ADD=0;
		ADD=250-MODS;
		SROUND=Std_Out_S+ADD;
	}
	else if(MODS>=125)
	{
		TEMP=0;
		TEMP=Std_Out_S-MODS;
		SROUND=TEMP+250;
	}
	
	
	Std_Out_S=SROUND;
	
	//round up to nearest 250MBH - SH
	MODSH=0;
	SHROUND=0;
	MODSH=Hi_Out_S%250;
	
	if(MODSH<125)
	{
		ADDH=0;
		ADDH=250-MODSH;
		SHROUND=Hi_Out_S+ADDH;
	}
	else if(MODS>=125)
	{
		TEMPH=0;
		TEMPH=Hi_Out_S-MODSH;
		SHROUND=TEMPH+250;
	}
	
	
	Hi_Out_S=SHROUND;

	
	//Number of DHW Boilers - T
	if(Std_Out_S>=0 && Std_Out_S<=2000)
	{Std_Out_T=1;}
	else if(Std_Out_S>2000 && Std_Out_S<=4000)
	{Std_Out_T=2;}
	else if(Std_Out_S>4000)
	{Std_Out_T=3;}

	//TH
	if(Hi_Out_S>=0 && Hi_Out_S<=2000)
	{Hi_Out_T=1;}
	else if(Hi_Out_S>2000 && Hi_Out_S<=4000)
	{Hi_Out_T=2;}
	else if(Hi_Out_S>4000 && Hi_Out_S<=6000)
	{Hi_Out_T=3;}
	else if(Hi_Out_S>6000 && Hi_Out_S<=8000)
	{Hi_Out_T=4;}
	else if(Hi_Out_S>8000 && Hi_Out_S<=10000)
	{Hi_Out_T=5;}
	else if (Hi_Out_S>10000)
	{Hi_Out_T=6;}
		
	//DHW Tank Capacity Usg - U
	if(In_A<=130)
	{
		Std_Out_U=In_A*9;
	}
	else
	{
		Std_Out_U=In_A*7;
	}
	Hi_Out_U=Std_Out_U;
	
	//Cost Add $, Pipe Insulation Renewal - V
	if(In_F==1)
	{
//		Std_Out_V=4000+(In_A*20);
		Std_Out_V=2000+(In_A*10);
	}
	else
	{
		Std_Out_V=0;
	}
	Hi_Out_V=Std_Out_V;
	
	//Cost Add $, Premium Boilers - W
	if(In_G==1)
	{
		Std_Out_W=0;
		Hi_Out_W=2*Hi_Out_Q;
	}
	else
	{
		Std_Out_W=0;
		Hi_Out_W=0;
	}
	
	//Cost Add $, Chimney Liner - X
	//# of floors x 12 ft/floor x $ per ft of liner
	Std_Out_X = (In_B*12)*240;
	Hi_Out_X=Std_Out_X;
	
	//Base $ - Y
//	Original calculations based on linear regression
//
//	Std_Out_Y = 1202.5+(2.8128*Std_Out_Q)+(12019*Std_Out_R)+(145.49*In_B)
//	+(4155.5*Std_Out_T)+(36.311*Std_Out_U)+(3.3250*Std_Out_S)
//	+ Std_Out_V + Std_Out_W + Std_Out_X;
//	
//	Hi_Out_Y = -5284.3 +(5.58486*Hi_Out_Q)+(17418*Hi_Out_R)+(9.0490*In_B)
//	+(5344.8*Hi_Out_T)+(51.874*Hi_Out_U)+(14.873*Hi_Out_S)
//	+ Hi_Out_V + Hi_Out_W + Hi_Out_X;

//	Simplified calculations with simplified DHW calculated at $250/suite and $300/suite
//
//	Std_Out_Y = 1202.5+(2.8128*Std_Out_Q)+(12019*Std_Out_R)+(145.49*In_B)
//	+(250*In_D*In_A)
//	+ Std_Out_V + Std_Out_W + Std_Out_X;
//	
//	Hi_Out_Y = -5284.3 +(5.58486*Hi_Out_Q)+(17418*Hi_Out_R)+(9.0490*In_B)
//	+(300*In_D*In_B)
//	+ Hi_Out_V + Hi_Out_W + Hi_Out_X;

//	Revised calculations based on linear regression

//	Std_Out_Y = 1202.5+(2.8128*Std_Out_Q)+(12019*Std_Out_R)+(145.49*In_B)
	Std_Out_Y = 1202.5+(2.8128*Std_Out_Q)+(12019*Std_Out_R)
//	+(4155.5*Std_Out_T)+(36.311*Std_Out_U)+(3.3250*Std_Out_S)
	+(4155.5*Std_Out_T)+(36.311*Std_Out_U)+(10*Std_Out_S)
	+ Std_Out_V + Std_Out_W + Std_Out_X;
	
//	Hi_Out_Y = -5284.3 +(5.58486*Hi_Out_Q)+(17418*Hi_Out_R)+(9.0490*In_B)
	Hi_Out_Y = 0 +(5.58486*Hi_Out_Q)+(17418*Hi_Out_R)
//	+(5344.8*Hi_Out_T)+(51.874*Hi_Out_U)+(14.873*Hi_Out_S)
	+(5344.8*Hi_Out_T)+(36.311*Hi_Out_U)+(12*Hi_Out_S)
	+ Hi_Out_V + Hi_Out_W + Hi_Out_X;

	//Engineering / Project Management $ - Z
	if(Std_Out_Y<=40000)
	{
	Std_Out_Z=5700;
	}
	else if(Std_Out_Y>40000 && Std_Out_Y<=80000)
	{
	Std_Out_Z=Std_Out_Y*0.143;
	}
	else if(Std_Out_Y>80000 && Std_Out_Y<=200000)
	{
	Std_Out_Z=11440 + ((Std_Out_Y-80000)*0.10);
	}
	else if(Std_Out_Y>200000)
	{
	Std_Out_Z=23440+((Std_Out_Y-200000)*0.06);
	}
	
	if(Hi_Out_Y<=40000)
	{
	Hi_Out_Z=5700;
	}
	else if(Hi_Out_Y>40000 && Hi_Out_Y<=80000)
	{
	Hi_Out_Z=Hi_Out_Y*0.143;
	}
	else if(Hi_Out_Y>80000 && Hi_Out_Y<=200000)
	{
	Hi_Out_Z=11440 + ((Hi_Out_Y-80000)*0.10);
	}
	else if(Hi_Out_Y>200000)
	{
	Hi_Out_Z=23440+((Hi_Out_Y-200000)*0.06);
	}
	
	//Total Basic
	totalBasic = (Std_Out_Y+Std_Out_Z)*(1+(0.01*In_I));
	totalBasicRounded =  (((totalBasic/100000).toFixed(2))*100000).toFixed(0);
	
	//Total High Efficiency
	totalHigh = (Hi_Out_Y+Hi_Out_Z)*(1+(0.01*In_I));
	totalHighRounded = (((totalHigh/100000).toFixed(2))*100000).toFixed(0);
	
	//Annual Fuel Savings
	//# of suites x average annual m3 ng per suite x % savings x price $/m3
	//add 20% to savings for new DHW plant
	if(In_D==1)
	{
		AnnualFuelSavings = In_A*2100*0.15*0.48*1.2;
	}
	else
	{
		AnnualFuelSavings = In_A*2100*0.15*0.48;
	}
	//add 10% to savings value for premium boilers	
	if(In_G==1)
	{
		AnnualFuelSavings = AnnualFuelSavings*1.1
	}
	AnnualFuelSavingsRounded = (((AnnualFuelSavings/1000).toFixed(2))*1000).toFixed(0);
	
	//Payback On Efficiency Investment
	//Rounded to nearest $00
	PaybackOnEfficiencyInvestment = Math.round((totalHigh - totalBasic)*10/AnnualFuelSavings)/10;

	
	document.condo.totalBasic.value = '$'+commaSplit(totalBasicRounded);
	document.condo.totalHigh.value = '$'+commaSplit(totalHighRounded);
	document.condo.AnnualFuelSavings.value = '$'+commaSplit(AnnualFuelSavingsRounded);
	document.condo.PaybackOnEfficiencyInvestment.value = PaybackOnEfficiencyInvestment+' Years';

	showhide(layer_ref);
	showhide(layer_ref2);
	showhide(layer_ref3);

//debug window that shows intermediate calculations
/*
	window.alert('Std_Out_Q = '+Std_Out_Q+
			 '\nStd_Out_R = '+Std_Out_R+
			 '\nStd_Out_S = '+Std_Out_S+
			 '\nStd_Out_T = '+Std_Out_T+
			 '\nStd_Out_U = '+Std_Out_U+
			 '\nStd_Out_V = '+Std_Out_V+
			 '\nStd_Out_W = '+Std_Out_W+
			 '\nStd_Out_X = '+Std_Out_X+
			 '\nStd_Out_Y = '+Std_Out_Y+
			 '\nStd_Out_Z = '+Std_Out_Z+
			 '\nHi_Out_Q = '+Hi_Out_Q+
			 '\nHi_Out_R = '+Hi_Out_R+
			 '\nHi_Out_S = '+Hi_Out_S+
			 '\nHi_Out_T = '+Hi_Out_T+
			 '\nHi_Out_U = '+Hi_Out_U+
			 '\nHi_Out_V = '+Hi_Out_V+
			 '\nHi_Out_W = '+Hi_Out_W+
			 '\nHi_Out_X = '+Hi_Out_X+
			 '\nHi_Out_Y = '+Hi_Out_Y+
			 '\nHi_Out_Z = '+Hi_Out_Z);

*/
}


<!-- Original:  Mark Henwood (mark_henwood@hotmail.com) -->


function commaSplit(srcNumber) {
var txtNumber = '' + srcNumber;
if (isNaN(txtNumber) || txtNumber == "") {
alert("Oops!  That does not appear to be a valid number.  Please try again.");
fieldName.select();
fieldName.focus();
}
else {
var rxSplit = new RegExp('([0-9])([0-9][0-9][0-9][,.])');
var arrNumber = txtNumber.split('.');
arrNumber[0] += '.';
do {
arrNumber[0] = arrNumber[0].replace(rxSplit, '$1,$2');
} while (rxSplit.test(arrNumber[0]));
if (arrNumber.length > 1) {
return arrNumber.join('');
}
else {
return arrNumber[0].split('.')[0];
      }
   }
}
//  End -->

