// Support Script (668)
function AddToValidateArray(strElementName)
{
    var strName = strElementName

    if (!document.ValidateArray) 
    {
        document.ValidateArray = new Array
    }

    document.ValidateArray[document.ValidateArray.length] = strName
}

// Support Script (669)
function StripChars(theFilter,theString)
{
	var strOut,i,curChar

	strOut = ""
	for (i=0;i < theString.length; i++)
	{		
		curChar = theString.charAt(i)
		if (theFilter.indexOf(curChar) < 0)	// if it's not in the filter, send it thru
			strOut += curChar		
	}	
	return strOut
}

function AllInRange(x,y,theString)
{
	var i, curChar
	
	for (i=0; i < theString.length; i++)
	{
		curChar = theString.charAt(i)
		if (curChar < x || curChar > y) //the char is not in range
			return false
	}
	return true
}


function reformat (s)
{
    var arg;
    var sPos = 0;
    var resultString = "";

    for (var i = 1; i < reformat.arguments.length; i++) {
       arg = reformat.arguments[i];
       if (i % 2 == 1) 
           resultString += arg;
       else 
       {
           resultString += s.substring(sPos, sPos + arg);
           sPos += arg;
       }
    }
    return resultString;
}

function Trim(theString)
{
 var i,firstNonWhite

 if (StripChars(" \n\r\t",theString).length == 0 ) return ""

	i = -1
	while (1)
	{
		i++
		if (theString.charAt(i) != " ")
			break	
	}
	firstNonWhite = i
	//Count the spaces at the end
	i = theString.length
	while (1)
	{
		i--
		if (theString.charAt(i) != " ")
			break	
	}	

	return theString.substring(firstNonWhite,i + 1)

}
// Support Script (587)
function ValidateDropDown()
{
  msg = "";
  var iPos = this.getSelectedPosition();
  if (iPos<=0)
  {
    msg = "Please make a selection."
  }

  return msg;
}
function List1__onChange() {
var v = List1.getSelectedValue();
if (v.length > 1) // one char is a noop
  window.location.href = v;
 }
function _List1__onChange() { if (List1) return List1.onChange(); }
function Text5_onClick() {
var options="";
options+="status="+(("0"=="1")?"yes":"no")
options+=",directories="+(("0"=="1")?"yes":"no")
options+=",location="+(("0"=="1")?"yes":"no")
options+=",toolbar="+(("0"=="1")?"yes":"no")
options+=",menubar="+(("0"=="1")?"yes":"no")
options+=",scrollbars="+(("0"=="1")?"yes":"no")
options+=",resizable="+(("1"=="1")?"yes":"no")

if (parseInt("650")  > 0) options+=",width="+"650"
if (parseInt("450") > 0) options+=",height="+"450"

if (parseInt("70") >= 0)
{
	options+=",top="+"70"
	options+=",screenY="+"70"
}
if (parseInt("40") >= 0)
{
	options+=",left="+"40"
	options+=",screenX="+"40"
}

page = "";
if (page.length == 0) page = "x006.asp";

window.open(page,"CentralAirMaintenance",options);
 }
function _Text5_onClick() { if (Text5) return Text5.onClick(); }

