<!-- Begin
var isNN = (navigator.appName.indexOf("Netscape")!=-1);

function isNumeric(strString)
   //  check for valid numeric strings 
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }


function uT(){
// this function used to create  string to append on to URLs for unique URLs to prevent page caching
var now    = new Date();
var hour   = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
   if (hour   > 12) { hour = hour - 12;      }
   if (hour   == 0) { hour = 12;             }
   if (hour   < 10) { hour   = "0" + hour;   }
   if (minute < 10) { minute = "0" + minute; }
   if (second < 10) { second = "0" + second; }
var monthnumber = now.getMonth();
   if (monthnumber < 10) { monthnumber = "0" + monthnumber; }
var monthday    = now.getDate();
var year        = now.getYear();
if(year < 2000) { year = year + 1900; }
var timeString = hour + minute +"."+ second;
//var dateString = monthnumber +  '/' +  monthday +  '/' +  year;
var dateString = year;
var uT="&"+dateString+timeString;
return uT;
}

function uT2(){
// this function used to create  string to append on to URLs for unique URLs to prevent page caching
var now    = new Date();
var hour   = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
   if (hour   > 12) { hour = hour - 12;      }
   if (hour   == 0) { hour = 12;             }
   if (hour   < 10) { hour   = "0" + hour;   }
   if (minute < 10) { minute = "0" + minute; }
   if (second < 10) { second = "0" + second; }
var monthnumber = now.getMonth();
   if (monthnumber < 10) { monthnumber = "0" + monthnumber; }
var monthday    = now.getDate();
var year        = now.getYear();
if(year < 2000) { year = year + 1900; }
var timeString = hour + minute +"."+ second;
//var dateString = monthnumber +  '/' +  monthday +  '/' +  year;
var dateString = year;
var uT2="&"+dateString+timeString;
return uT2;
}

function uTNo(){
// this function used to create  string to append on to URLs for unique URLs to prevent page caching
var now    = new Date();
var hour   = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
   if (hour   > 12) { hour = hour - 12;      }
   if (hour   == 0) { hour = 12;             }
   if (hour   < 10) { hour   = "0" + hour;   }
   if (minute < 10) { minute = "0" + minute; }
   if (second < 10) { second = "0" + second; }
var monthnumber = now.getMonth();
   if (monthnumber < 10) { monthnumber = "0" + monthnumber; }
var monthday    = now.getDate();
var year        = now.getYear();
if(year < 2000) { year = year + 1900; }
var timeString = hour + minute +"."+ second;
//var dateString = monthnumber +  '/' +  monthday +  '/' +  year;
var dateString = year;
var uT=dateString+timeString;
return uT;
}

function ContactLoad(){
document.form.FromName.focus();
}

//.........................................................................................................................
function ECheck (vname) {
var fldname = vname;
var emailStr = trim(vname);
if (emailStr=="")
		{alert("The Email Address is Empty. Please Enter Your Email Address.");return false;}
//alert("ECheck emailStr  = "+emailStr);
var checkTLD=1;
var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
var emailPat=/^(.+)@(.+)$/;
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
var validChars="\[^\\s" + specialChars + "\]";
var quotedUser="(\"[^\"]*\")";
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
var atom=validChars + '+';
var word="(" + atom + "|" + quotedUser + ")";
var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
var matchArray=emailStr.match(emailPat);
if (matchArray==null) {
alert("Email address seems incorrect (check @ and .'s)");
//fldname.focus();
return false;
}
var user=matchArray[1];
var domain=matchArray[2];
for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("Ths username contains invalid characters.");
//fldname.focus();
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
//fldname.focus();
return false;
   }
}
if (user.match(userPat)==null) {
// user is not valid
alert("The username doesn't seem to be valid.");
//fldname.focus();
return false;
}
var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {
for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destination IP address is invalid!");
//fldname.focus();
return false;
   }
}
return true;
}
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
return true;
   }
}
if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("The address must end in a well-known domain or two letter " + "country.");
//fldname.focus();
return false;
}
if (len<2) {
alert("This address is missing a hostname!");
//fldname.focus();
return false;
}
return true;
}
//  End of ECheck-->
//.........................................................................................................................

function goStaff(){
//window.location="../html/RA_Console.asp"
tLoc="../html/RA_Console.asp";
tLoc=tLoc+tLine;
window.location=tLoc
}

function LogOff(){
clearMenu();
window.location="../Index.asp";
}

function SecLogOff() {
var ThisLoc = "../html/SecLogOff.asp";
var tSec=document.getElementById("qSec").value;
var tLoc = ThisLoc+"?qs="+tSec;
window.location=tLoc;
}

function doClear(dfield){
dfield.value="";
dfield.focus();
}

function LoginButton_Go() 
{
var xField = window.document.Form.loginid.value;
if  (window.document.form.loginid.value.length <8)
	         {
				if (xField =="8002007" || xField =="900" || xField =="128" || xField == "399")
					{
					//alert("Function LoginButton_Go\nloginid = "+xField);
					var AField = window.document.Form.loginid.value;
					var PField = window.document.Form.password.value;
					var This_Cookie = "zuser=";
					var a_Cookie = "zloginid="+escape(AField);
					var p_Cookie = "zpassword="+escape(PField);
					document.cookie = This_Cookie+a_Cookie+"&"+p_Cookie;
   				document.forms[0].submit();
					//window.location = "../html/Pwd_Check.asp";
					return true;
					}
				else
					{alert("There is a problem with the AMCAS ID Field...\n\nPlease check your number and retry");
					window.document.Form.loginid.focus();
					return false;}
				}
	else		
		if (IsFormComplete("Form") == true)
			{
				var AField = window.document.Form.loginid.value;
				var PField = window.document.Form.password.value;
				var This_Cookie = "zuser=";
				var a_Cookie = "zloginid="+escape(AField);
				var p_Cookie = "zpassword="+escape(PField);
				document.cookie = This_Cookie+a_Cookie+"&"+p_Cookie;
				document.forms[0].submit();
				//window.location = "../html/Pwd_Check.asp";
			}
		else
			{
			return false;
			}
}


function CookieShow(){
alert(unescape(document.cookie));
//window.location="../html/CookieViewer.asp";
}

// CursorTrim forces the cursor to the End of the entered text. 
// used as:  onMouseUp="CursorTrim(this)"
function CursorTrim(txt){
	txt.value=trim(txt.value)+" ";
}

function CursorPos(el) {
	el.value=trim(el.value);
  if (el.createTextRange) {
    var v = el.value;
    var r = el.createTextRange();
    r.moveStart('character', v.length);
    r.select();
  }
}

function insertAtEnd (el, txt) {
  el.value += txt;
  CursorPos (el);
}

function Mid(str, start, len){
                if (start < 0 || len < 0) return "";

                var iEnd, iLen = String(str).length;
                if (start + len > iLen)
                        iEnd = iLen;
                else
                        iEnd = start + len;
                return String(str).substring(start,iEnd);}

function Len(str){  return String(str).length;  }

function InStr(strSearch, charSearchFor){
	for (i=0; i < Len(strSearch); i++)
	{
	    if (charSearchFor == Mid(strSearch, i, 1))
	    {
			return i;
	    }
	}
	return -1;}

function Right(str, n){
                if (n <= 0)     // Invalid bound, return blank string
                   return "";
                else if (n > String(str).length)   // Invalid bound, return
                   return str;                     // entire string
                else { // Valid bound, return appropriate substring
                   var iLen = String(str).length;
                   return String(str).substring(iLen, iLen - n);}}

function Left(str, n){
                if (n <= 0)     // Invalid bound, return blank string
                        return "";
                else if (n > String(str).length)   // Invalid bound, return
                        return str;                // entire string
                else // Valid bound, return appropriate substring
                        return String(str).substring(0,n);}


function onDateIntervalSelect2() {
document.all.BeginDate2.value = document.all.MyCalendar2.intervalstart
document.all.EndDate2.value = document.all.MyCalendar2.intervalfinish
}

function onDateSelect1() {
document.all.Date1.value = document.all.MyCalendar1.intervalstart
document.all.mydiv1.style.visibility = 'hidden'
}
function ShowCalendar1() {
  var e = window.event.srcElement
  document.all.mydiv1.style.left = e.offsetLeft + e.offsetWidth - document.all.mydiv1.offsetWidth + 21
  document.all.mydiv1.style.top = e.offsetTop + e.offsetHeight + 70
  document.all.mydiv1.style.visibility = 'visible'
  return false;
}

function onDateSelect2() {
document.all.Date2.value = document.all.MyCalendar2.intervalstart
document.all.mydiv2.style.visibility = 'hidden'
}
function ShowCalendar2() {
  var e = window.event.srcElement
  document.all.mydiv2.style.left = e.offsetLeft + e.offsetWidth - document.all.mydiv2.offsetWidth + 21
  document.all.mydiv2.style.top = e.offsetTop + e.offsetHeight + 70
  document.all.mydiv2.style.visibility = 'visible'
  return false;
}
   
function stopError() {
  return true;
}
window.onerror = stopError;

//window.onerror = ErrorHandler;
//function ErrorHandler(msg, url, lno) {alert(msg + " : " + lno);}


var expdate = new Date();
expdate.setTime (expdate.getTime() +  (24 * 60 * 60 * 1000 * 365)); 

//----------------------------------------------------------------------------------------
// Limit the size of a textarea.  Allows only the number of characters designated
// in the <input   tag.  Example:
// <textarea name=message wrap=physical cols=28 rows=4 onKeyDown="sizecheck(this.form.message,125);" onKeyUp="sizecheck(this.form.message125);"></textarea>
<!-- Begin
//---------------------------------------------------------------------
function caretpos(text){
var tval = text.value;
text.value = trim(tval);
}

function carettrim(text){
var tval = text.value;
text.value = trim(tval);
}

//---------------------------------------------------------------------
function PagePrint(){
text=document;
print(text);
}
//----------------------------------------------------------------------------------------
function notYet(){
alert("This Option Is Not Currently Available");
}
//----------------------------------------------------------------------------------------

function logincheck(field,minlimit){
var xVal = field.value;
var xLength = field.value.length;
if (xLength == 0)
{return true;}
else
{
if (xLength < minlimit)
	{
		if (xVal == "7979007")
      	 {return true;}
		 else
		 	{field.value=xVal;
		    field.focus();	
			return false;}
 	}
else
	{return true;}
}
}
function sizecheck(field,maxlimit,minlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
}

//alert("You have reached the maximum number of letters/words allowed for this input box.\n\nPlease consolidate your answer.\n\nThe maximum number allowed is"+maxlimit+" characters");
// otherwise, update 'characters left' counter
// End -->
//----------------------------------------------------------------------------------------
// This version can use a text box to show the remaining available characters.  It uses a slightly different 
//  < textarea call:
// <textarea name=message wrap=physical cols=28 rows=4 onKeyDown="textCounter(this.form.message,this.form.remLen,125);" onKeyUp="textCounter(this.form.message,this.form.remLen,125);"></textarea>
// Here's the display text box showing remaing available characters. Place in convenient location on page.
// <input readonly type=text name=remLen size=3 maxlength=3 value="125"> 
//----------------------------------------------------------------------------------------
<!-- Begin
/*
Displays the Date in 05/01/2004 format
*/
function DateSay(){
var myDate = new Date();
var Tday = myDate.getMonth()+1 + "/" + myDate.getDay()+1 + "/" + myDate.getYear()
return Tday
}
// End -->
//----------------------------------------------------------------------------------------
// Force password to be min of 6 characters and let the user hit the Enter key to submit
<!-- Begin
// Force password to be min of 6 characters
<!-- Begin
function keycheck(field,e){
//var kcode = e.keyCode;
var kcode = (isNN ? e.charCode : e.keyCode); 
var minlimit = 6;
var myblank = "";
var fLen=field.length;

//  This section prevents STRANGE CHARACTERS, ie, shfited number keys, etc. from being used.
//alert(kcode);
if (kcode == 13 || kcode == 9 || kcode == 0)
   {LoginProc();return true;}
   else
{var str =  "126,96,33,64,35,36,37,94,38,42,40,41,45,95,61,43,91,93,123,125,58,59,39,34,44,46,47,60,62,63";
var patt1 =kcode;
var result = str.search(patt1);
var sVal=String.fromCharCode(kcode)
if (result>0)
   {alert("Please Do NOT use any Strange Characters in your Password, like: "+"'"+sVal+"'");field.length = fLen-1;return false;}
}
// End of STRANGE CHARACTERS..........................................................

var xField = document.getElementById("mLoginID").value;
var yField = document.getElementById("mPassword").value;
if (xField =="7979007")
	{
		if (kcode==13)
				{LoginProc();return true;}
				else
				{	return true;}
	}
if (kcode == 13 || kcode == 9)
	{
			if (field.value.length < minlimit)
				{
									alert("Please use a Minimum of 6 characters for your Password   \n\n Hitting the ESC key will Clear the field   \n\n You can Mouse-Click to go to the AMCASID field   ");
									field.focus();
									return false;
				}
			else
				{
				LoginButton_Go();
				return true;
//  The following would simply move focus to the next field.....not used in Login page.
//  document.forms[0].elements[1].focus();
				}
	}
else
	{
	if (kcode == 27) // escape key pressed
	   {
		field.value = "";
		return true;
		}
	}
}
//alert("You have reached the maximum number of letters/words allowed for this input box.\n\nPlease consolidate your answer.\n\nThe maximum number allowed is"+maxlimit+" //alert("You have reached the maximum number of letters/words allowed for this input box.\n\nPlease consolidate your answer.\n\nThe maximum number allowed is"+maxlimit+" characters");
// otherwise, update 'characters left' counter
// End -->
//----------------------------------------------------------------------------------------
function LoginProc(){
//alert("Hit The LoginProc Proc...");
var tLoginID=trim(document.getElementById("mLoginID").value);
var tPassword=trim(document.getElementById("mPassword").value);
SetCookie("loginid",tLoginID);
SetCookie("password",tPassword);
//alert(tPassword+"-"+tLoginID);
window.location="PWD_Check.asp?"+uT();
}

<!-- Begin
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
else 
countfield.value = maxlimit - field.value.length;
}
// End -->
//----------------------------------------------------------------------------------------
<!-- Begin
function mask(fld,fmt){
var str = fld.value
var textbox = fld
if (fmt == "ssno")
{
var loc = '3,6'
var delim = '-'
var maxlen = 11
}
if (fmt =="phone")
{
var loc = '3,7'
var delim = '-'
var maxlen = 12
}
if (fmt == "date")
{
var loc = '2,5'
var delim = '/'
var maxlen = 10
}
//this.value,this,'3,6','-'
var input = fld
var locs = loc.split(',');
for (var i = 0; i <= locs.length; i++){
	for (var k = 0; k <= str.length; k++){
	 if (k == locs[i]){
	  if (str.substring(k, k+1) != delim){
	    str = str.substring(0,k) + delim + str.substring(k,str.length);
	  }
	 }
	}
	}
str = str.substring(0,maxlen);
textbox.value = str;
//if (input.value.length >= maxlen) 
}
// End -->
//----------------------------------------------------------------------------------------
<!-- Begin
// End -->
//----------------------------------------------------------------------------------------
<!-- Begin
// End -->
//----------------------------------------------------------------------------------------
<!-- Begin
// End -->

//----------------------------------------------------------------------------------------
// Example:  <INPUT name="loginid" type="text"  onKeyPress="javascript:return dFilter(event, this, '########');" onKeyUp="return autoTab(this, 8, event);">
//--Begin AutoTab
function autoTab(input,len,e) {
var keyCode = (isNN) ? e.which : e.keyCode; 
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
// AutoTab Related Function.......................................................
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
// AutoTab Related Function.......................................................
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}
//----------------------------------------------------------------------------------------
// Begin SetFocus
function SetFocus(fInst, eInst) {
fInst=fInst-1;
eInst=eInst-1;
  if (document.forms.length > 0) 
  {
   document.forms[fInst].elements[eInst].focus();
  }
 }
//----------------------------------------------------------------------------------------

function SetCookie(name, value, expires, path, domain, secure) {
var now = new Date();
now.setTime(now.getTime() + 31536000000);
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + now.toGMTString() : "") +
      ((path) ? "; path=/;" : "") +
      ((domain) ? "; domain="+domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}

function GetCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

function DeleteCookie(name, path, domain) {
  if (GetCookie(name)) {
    document.cookie = name + "=" + 
    ((path) ? "; path=/" : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}

// date - any instance of the Date object
// * hand all instances of the Date object to this function for "repairs"
function FixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}

//...............................................................................................................
function CookieSetup(){
var sID = document.getElementById("Session").value;
var CurID = GetDCookie("user;id");
if (CurID=="" || CurID==null || CurID=="undefined")
	/*If it's a blank user id, force-clean the "user" cookie and assign the Session Id to the user id.*/
	{DeleteCookie("user;");
	  SetDCookie("user;id",sID);}
}

var expdate = new Date();
    expdate.setTime (expdate.getTime() +  (24 * 60 * 60 * 1000 * 365)); 
//----------------------------------------------------------------------------------------
/* Cookie Dictionary Array Handler */
        function GetDCookie(name) {
          var cookies = document.cookie;            // cookies for site
          var ix1;                                  // loop index
          var n1 = name;                            // main cookie name
          var n2;                                   // crumb name
          var out;                                  // returned value
          ix1 = n1.indexOf(";");                    // cookie/crumb break
          if (ix1 != -1) {
            n2 = n1.substring(ix1 + 1);             // crumb name
            n1 = n1.substring(0, ix1);              // main cookie name
          }
          out = GetDCookieCrumb(cookies, n1);
          if (n2 && out) { out = GetDCookieCrumb(out, n2); }
          cookie = rest;
          return out;
        }

        function SetDCookie(name, value) {
		/*modified 10/01/05 drk to handle just name and value being passed...defaults to one day expire...added path*/
		/*Example:   SetDCookie("CookieName;SlotName","Value")       SetDCookie("CRS;UserName","Darth Vader")  */
		  var expr = "";
		  var dayz = "";
		  var cookies = document.cookie;            // cookies for site
          var ix1;                                  // index
          var n1 = name;                            // main cookie name
          var n2 = "";                              // crumb name
          var out;                                  // returned value
          var p2 = value;                           // new value
          var p3;                         // param work area
          var p4;
          var msd = 1000 * 60 * 60 * 24 * 365;            // millisecs per day
          var path = "/";                              // path
          if (!p3) {                                // no expiration
            if (!p4) { p4 = 1; }                    // no days: use 1
            p3 = new Date();
            p3.setTime(p3.getTime() + msd * p4);
          }
          ix1 = n1.indexOf(";");                    // cookie/crumb break
          if (ix1 != -1) {
            n2 = n1.substring(ix1 + 1);             // crumb name
            n1 = n1.substring(0, ix1);              // main cookie name
          }
          out = GetDCookieCrumb(cookies, n1);
          if (n2) {
            if (out) { out = GetDCookieCrumb(out, n2); }
            else { rest = ""; }
            if (rest) { p2 = rest + ";" + n2 + "=" + p2; }
            else      { p2 =              n2 + "=" + p2; }
          }
          document.cookie=n1+"="+escape(p2)+"; expires="+p3.toGMTString()+";path=/";
          return true;
        }

        function GetDCookieCrumb(instring, seeking) {
          var c1;                                   // cookies work area
          var c2;                                   // cookie work area
          var c3;                                   // cookie name
          var c4;                                   // cookie value
          var ix1; var ix2; var ix3; var ix4;       // indexes
          var out;                                  // return value
          rest = "";          
          c1 = instring;
          c1 = c1.replace(/\n/g, "");               // drop nl chars
          c1 = c1.replace(/\r/g, "");               // drop cr chars
          c1 = c1 + ";";                            // for final cookie
          ix1 = 0;                                  // from beginning
          if (seeking.substring(0, 1) == "#") {
            if (seeking == "#0" && !instring) { return 0; }
            ix4 = seeking.substring(1);             // which item wanten
            ix3 = 0;                                // none so far
            while (c1.indexOf(";", ix1) != -1) {
              ix2 = c1.indexOf(";", ix1);
              cookie = c1.substring(ix1, ix2);
              ix3 += 1;
              if (ix3 == ix4) { return cookie; }
              ix1 = ix2 + 1;
            }
            if (ix4 == 0) { return ix3; }           // count of items
            return "";
          }
          while (c1.indexOf(";", ix1) != -1) {
            ix2 = c1.indexOf(";", ix1);             // next cookie break
            if (ix2 == -1) { ix2 = c1.length; }
            cookie = c1.substring(ix1, ix2);        // a single cookie
            c2 = cookie;                            // cookie work area
            ix1 = ix2 + 1;
            ix3 = c2.indexOf("=", 0);               // name=value break
            if (ix3 == -1) { ix3 = c2.length; }
            c3 = c2.substring(0, ix3);              // get the name
            c4 = c2.substring(ix3 + 1);             // get the value
            c3 = c3.replace(/ /g, "");              // drop all space
            if (c3 == seeking) {
              out = unescape(c4);
            } else {
              if (rest) { rest = rest + ";" + cookie; }
              else      { rest = cookie; }
            }
          }
          return out;
        }

function DeleteDCookie(ThisCookie){
//alert("Cookie To Delete = "+ThisCookie);
SetDCookie(ThisCookie,"");
}
// Function dFilter - a field format function
// var isNN = (navigator.appName.indexOf("Netscape")!=-1);
var dFilterSymbol;
var dLowVal;
var dHighVal;
var dFilterStep;
//----------------------------------------------------------------------------------
function dFilterStrip (dFilterTemp, dFilterMask)
{
   dFilterMask = replace(dFilterMask,dFilterSymbol,'');
   for (dFilterStep = 0; dFilterStep < dFilterMask.length++; dFilterStep++)
         {
             dFilterTemp = replace(dFilterTemp,dFilterMask.substring(dFilterStep,dFilterStep+1),'');
         }
         return dFilterTemp;
}
//----------------------------------------------------------------------------------
function dFilterMax (dFilterMask)
{
          dFilterTemp = dFilterMask;
   for (dFilterStep = 0; dFilterStep < (dFilterMask.length+1); dFilterStep++)
         {
                    if (dFilterMask.charAt(dFilterStep)!=dFilterSymbol)
                   {
                 dFilterTemp = replace(dFilterTemp,dFilterMask.charAt(dFilterStep),'');
                   }
         }
         return dFilterTemp.length;
}
//----------------------------------------------------------------------------------
// Main Program Code Function
function dFilter (key, textbox, dFilterMask)
{
//alert("Text Box Value = "+textbox.value);

         var keycode = (isNN) ? key.which : key.keyCode; 
         var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
         var isSick = containsElement(filter,keycode);
         
				 dFilterSymbol = dFilterMask.substring(0,1);

if (dFilterSymbol=='#')  // if they want only numeric input they pass the '#'
{
dLowVal = 47;
dHighVal = 58;
}
else   //  They want both Numeric and Alpha input if they pass the 'X'
{
dLowVal = 47;
dHighVal = 123;
}
//alert("KeyCode = "+keycode+"\n"+"dLowVal = "+dLowVal+"\n"+"dHighVal = "+dHighVal);
//alert("isSick = "+isSick);

         dFilterNum = dFilterStrip(textbox.value, dFilterMask);

         if (isSick)
         {
             return true;
         }
         else if (keycode==8&&dFilterNum.length!=0)
         {
                     dFilterNum = dFilterNum.substring(0,dFilterNum.length-1);
         }
       else if ( (keycode>dLowVal&&keycode<dHighVal) && dFilterNum.length<dFilterMax(dFilterMask) )
         {
       dFilterNum=dFilterNum+String.fromCharCode(keycode);
         }
         var dFilterFinal='';
   for (dFilterStep = 0; dFilterStep < dFilterMask.length; dFilterStep++)
         {
       if (dFilterMask.charAt(dFilterStep)==dFilterSymbol)
                   {
                        if (dFilterNum.length!=0)
												  {
                           dFilterFinal = dFilterFinal + dFilterNum.substring(0,1);
                           dFilterNum = dFilterNum.substring(1,dFilterNum.length);
                          }
                       else
                       {
                           dFilterFinal = dFilterFinal + "";
                       }
                   }
         else if (dFilterMask.charAt(dFilterStep)!=dFilterSymbol)
                   {
                       dFilterFinal = dFilterFinal + dFilterMask.charAt(dFilterStep);                
                   }
         }
         textbox.value = dFilterFinal;
   return false;
}
//----------------------------------------------------------------------------------
function replace(fullString,text,by) {
// Replaces text with by in string
   var strLength = fullString.length, txtLength = text.length;
   if ((strLength == 0) || (txtLength == 0)) return fullString;
   var i = fullString.indexOf(text);
   if ((!i) && (text != fullString.substring(0,txtLength))) return fullString;
   if (i == -1) return fullString;
   var newstr = fullString.substring(0,i) + by;
   if (i+txtLength < strLength)
       newstr += replace(fullString.substring(i+txtLength,strLength),text,by);
   return newstr;
}
//----------------------------------------------------------------------------------
//-- Function to deal with IE/Netscape keycode differences
/* function containsElement(arr, ele) 
{
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
*/
//--End Netscape discovery handler
//----------------------------------------------------------------------------------------
// Begin InstructionWinddow
function instwin()
{
window.open('../html/GeneralInstructions.asp','','scrollbars=yes,width=608,height=829,resizable=no,status=no')
}

function instwin1()
{
window.open('html/GeneralInstructions.asp','','scrollbars=yes,width=608,height=800,resizable=no,status=no')
}

function InstructPrint() {
window.open('../html/InstPrint.asp','','scrollbars=yes,width=608,height=810,resizable=no,status=no')
}

function AppProcess() {
window.open('../html/AppProcess.asp','','scrollbars=yes,width=608,height=800,resizable=no,status=no')
}
function AppProcess1() {
window.open('html/AppProcess.asp','','scrollbars=yes,width=608,height=800,resizable=no,status=no')
}

//function InstructPrint() {
//var ThisRpt = "../html/InstPrint.asp";
//biggerhelpwin(ThisRpt) ;
//}

// Begin HelpWin
function alertwin(ThisAlert)
{
alert("We Made It To The AlertWin Proc....."+ThisAlert);
var ThisCookie="AlertMsg";
SetCookie("AlertMsg",ThisAlert);
var AlertPage = "../html/AlertMesssage.asp";
winpops=window.open(AlertPage,"","width=700,height=325,help=no")
}
//----------------------------------------------------------------------------------------
// Begin HelpWin
function cchelpwin(ThisHelp)
{
//alert("We Made It To The HelpWin Proc---"+ThisHelp);
SetCookie("HelpMsg" ,ThisHelp);
var HelpPage = "../ccard/ccHelp1.asp";
winpops=window.open(HelpPage,'','scrollbars=no,width=545,height=330,resizable=no,status=no,help=no');
}

function helpwin(ThisHelp)
{
//alert("We Made It To The HelpWin Proc---"+ThisHelp);
SetCookie("HelpMsg" ,ThisHelp);
var HelpPage = "../html/CRSHelp.asp";
winpops=window.open(HelpPage,'','scrollbars=no,width=480,height=600,resizable=no,status=no,help=no');
}
//----------------------------------------------------------------------------------------
function biggerhelpwin(ThisHelp)
{
//alert("We Made It To The HelpWin Proc---"+ThisHelp);
SetCookie("HelpMsg",ThisHelp);
var HelpPage = "../html/CRSShow.asp";
winpops=window.open(HelpPage,'','scrollbars=yes,width=820,height=810,resizable=yes,status=yes,help=no');
}
//----------------------------------------------------------------------------------------
// End Instruction Page
//----------------------------------------------------------------------------------------
//function InstructionWindow(ThisInst)
//{
//winpops=window.open(ThisInst,"","width=600")
//}
// End Instruction Page
//----------------------------------------------------------------------------------------
// Begin Trim Function
//function Trim(s) {
 //s.replace(/^[ ]*(.*?)[ ]*$/,"$1");
// return s
//}
// End Trim Function 
//----------------------------------------------------------------------------------------
// Begin Trim Function
function FTRIM(tbox) {
  var _sval = tbox.value;
  tbox.value = _sval.replace(/^[ ]*(.*?)[ ]*$/,"$1");
	tbox.focus();
  return 
}
// End Trim Function 
//----------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------
// Begin Trim Function
//function ALLTRIM(x) {
// x.replace(/^[ ]*(.*?)[ ]*$/ ,"");
//var yx
//yx = x.replace(/^\s*(.*)\s*$/\1/,"");
 //return yx
//}
// End Trim Function 
//----------------------------------------------------------------------------------------
// Begin MsgPopUp Function
<!-- Begin
//  End -->
// End MsgPopUp Function 
//----------------------------------------------------------------------------------------
// Begin Trim Function
function ltrim(argvalue) {
  while (1) {
    if (argvalue.substring(0, 1) != " ")
      break;
    argvalue = argvalue.substring(1, argvalue.length);
  }
  return argvalue;
}
//  End lTrim Function-->
//----------------------------------------------------------------------------------------
// Begin rTrim Function
function rtrim(argvalue) {
  while (1) {
    if (argvalue.substring(argvalue.length - 1, argvalue.length) != " ")
      break;
    argvalue = argvalue.substring(0, argvalue.length - 1);
  }
  return argvalue;
}
//  End rTrim Function-->
//----------------------------------------------------------------------------------------
// Begin Trim Function
function trim(argvalue) {
  var tmpstr = ltrim(argvalue);
  return rtrim(tmpstr);
}
//  End Trim Function-->
//----------------------------------------------------------------------------------------
<!-- Begin the Email Function
//function EmailCheck (emailStr) {
function emailcheck (fieldname) {
if (trim(fieldname.value)=="")
	{return true;}
var fldname = fieldname;
var emailStr = fieldname.value;
var checkTLD=1;
var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;
var emailPat=/^(.+)@(.+)$/;
var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
var validChars="\[^\\s" + specialChars + "\]";
var quotedUser="(\"[^\"]*\")";
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;
var atom=validChars + '+';
var word="(" + atom + "|" + quotedUser + ")";
var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");
var matchArray=emailStr.match(emailPat);
if (matchArray==null) {
alert("Email address seems incorrect (check @ and .'s)");
fldname.focus();
return false;
}
var user=matchArray[1];
var domain=matchArray[2];
for (i=0; i<user.length; i++) {
if (user.charCodeAt(i)>127) {
alert("Ths username contains invalid characters.");
fldname.focus();
return false;
   }
}
for (i=0; i<domain.length; i++) {
if (domain.charCodeAt(i)>127) {
alert("Ths domain name contains invalid characters.");
fldname.focus();
return false;
   }
}
if (user.match(userPat)==null) {
// user is not valid
alert("The username doesn't seem to be valid.");
fldname.focus();
return false;
}
var IPArray=domain.match(ipDomainPat);
if (IPArray!=null) {
for (var i=1;i<=4;i++) {
if (IPArray[i]>255) {
alert("Destination IP address is invalid!");
fldname.focus();
return false;
   }
}
return true;
}
var atomPat=new RegExp("^" + atom + "$");
var domArr=domain.split(".");
var len=domArr.length;
for (i=0;i<len;i++) {
if (domArr[i].search(atomPat)==-1) {
return true;
   }
}
if (checkTLD && domArr[domArr.length-1].length!=2 && 
domArr[domArr.length-1].search(knownDomsPat)==-1) {
alert("The address must end in a well-known domain or two letter " + "country.");
fldname.focus();
return false;
}
if (len<2) {
alert("This address is missing a hostname!");
fldname.focus();
return false;
}
return true;
}
//  End of EmailCheck-->
//.........................................................................................................................
// Date and Time Functions
<!-- Copyright 2002 Bontrager Connection, LLC

function getCalendarDate()
{
   var months = new Array(13);
   months[0]  = "January";
   months[1]  = "February";
   months[2]  = "March";
   months[3]  = "April";
   months[4]  = "May";
   months[5]  = "June";
   months[6]  = "July";
   months[7]  = "August";
   months[8]  = "September";
   months[9]  = "October";
   months[10] = "November";
   months[11] = "December";
   var now         = new Date();
   var monthnumber = now.getMonth();
   var monthname   = months[monthnumber];
   var monthday    = now.getDate();
   var year        = now.getYear();
   if(year < 2000) { year = year + 1900; }
   var dateString = monthname + 
                    ' ' + 
                    monthday + 
                    ', ' + 
                    year;
   return dateString;
} // function getCalendarDate()

function getClockTime()
{
   var now    = new Date();
   var hour   = now.getHours();
   var minute = now.getMinutes();
   var second = now.getSeconds();
   var ap = "AM";
   if (hour   > 11) { ap = "PM";             }
   if (hour   > 12) { hour = hour - 12;      }
   if (hour   == 0) { hour = 12;             }
   if (hour   < 10) { hour   = "0" + hour;   }
   if (minute < 10) { minute = "0" + minute; }
   if (second < 10) { second = "0" + second; }
   var timeString = hour + 
                    ':' + 
                    minute + 
                    ':' + 
                    second + 
                    " " + 
                    ap;
   return timeString;
} // function getClockTime()

//-->
//...........................................................................................

/***********************************************
* IFRAME Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
function CRSNewsScroller(){
//specify path to your external page:
var iframesrc="CRSNews.asp"
//You may change most attributes of iframe tag below, such as width and height:
document.write('<iframe id="datamain" src="'+iframesrc+'" width="620px" height="200px" marginwidth="1" marginheight="1" hspace="1" vspace="0" frameborder="0" scrolling="no"></iframe>')
}

function DeadlineMessage(){
//specify path to your external page:
var iframesrc="html/DeadlineMessage.html"
//You may change most attributes of iframe tag below, such as width and height:
document.write('<iframe id="bulletinmsg" src="'+iframesrc+'" width="622px" height="110px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>')
}

var mnAutoSaveMilliSeconds=0;
  var mnAutoSaveMilliSecondsExp=0;
  var mnAutoSaveInterval=30000;

  function AutoSaveInit(nMilliSeconds)
  {
     try
     {
       var nMinutes=0;
       AutoSaveClearTimeOuts();
       nMinutes = ((nMilliSeconds / 1000) / 60); 
       mnAutoSaveMilliSeconds = nMilliSeconds; 
       mnAutoSaveMilliSecondsExp=0;
       oTimeOut = window.setTimeout("AutoSaveSubmit()",nMilliSeconds);
       oInterval = window.setInterval("AutoSaveCountDown()",mnAutoSaveInterval);
       document.getElementById("divAutoSave").innerHTML = "<b>Auto Save In " + nMinutes + " Minutes</b>";
      }
      catch (exception) 
      { 
        if (exception.description == null) { alert("AutoSaveInit Error: " + exception.message); }  
        else {  alert("AutoSaveInit Error: " + exception.description); }
      }
  }

  function AutoSaveCountDown()
  {
    var nMinutesLeft=0;
    var nMilliSecondsLeft=0;
    mnAutoSaveMilliSecondsExp =  mnAutoSaveMilliSecondsExp + mnAutoSaveInterval;
    if ( mnAutoSaveMilliSeconds > mnAutoSaveMilliSecondsExp)
    {
      nMilliSecondsLeft = mnAutoSaveMilliSeconds - mnAutoSaveMilliSecondsExp;
      nMinutes= AutoSaveRoundNumber(((nMilliSecondsLeft / 1000) / 60),2); 
      document.getElementById("divAutoSave").innerHTML = "<b>Auto Save In " + nMinutes + " Minutes</b>";
    }
  }

  function AutoSaveBeforeSubmit()
  {
     document.getElementById("divAutoSave").innerHTML = '<b>Saving data...Please wait.</b>';
     return true;
  }

  function AutoSaveClearTimeOuts()
  {
    try
    {
      window.clearInterval(oInterval);
      window.clearTimeout(oTimeOut);
    }
    catch (exception) { }
  }

  function AutoSaveSubmit()
  {
    try
    {
      AutoSaveClearTimeOuts();
      AutoSaveBeforeSubmit();
      /*
         Call the form submittal code in your main page.
      */
      SubmitFormToBeSaved();
    
     }
    catch (exception) {}
  }

   function AutoSaveRoundNumber(number,X)
  {
    var number2;
    var TmpNum;
     X=(!X ? 1:X);
     number2 = Math.round(number*Math.pow(10,X))/Math.pow(10,X);
     TmpNum = "" + number2;
     var TmpArray = TmpNum.split(".");
     if (TmpArray.length <2) { number2 = number2 + ".0"; }
     return number2;
  }

function browserversion()
{
txt="Your Browser is unknown"
browser=navigator.appVersion
if (browser.indexOf("FireFox")>-1)
{
txt="Mozilla FireFox"
}

if (browser.indexOf("2.")>-1)
{
txt="Your Browser is from the stone-age"
}
if (navigator.appVersion.indexOf("Firefox")>-1)
{
txt="Mozilla FireFox"
}
if (browser.indexOf("3.")>-1)
{
txt=navigator.appName+" Version 3+" 
}
if (browser.indexOf("4.")>-1)
{
txt=navigator.appName+" Version 4+" 
}
if (browser.indexOf("5.")>-1)
{
txt=navigator.appName+" Version 5+" 
}
if (browser.indexOf("6.")>-1)
{
txt=navigator.appName+" Version 6+" 
}
if (browser.indexOf("7.")>-1)
{
txt=navigator.appName+" Version 7+" 
}
if (browser.indexOf("8.")>-1)
{
txt=navigator.appName+" Version 8+" 
}
if (navigator.userAgent.indexOf("Firefox")!=-1)
{
var verstr = (navigator.userAgent);
var ver = verstr.substr(verstr.length-5,5);
txt="FireFox"+" Version "+ver;
}
if (navigator.userAgent.indexOf("MSIE")!=-1)
{
var verstr = (navigator.userAgent);
var verpos = verstr.indexOf("MSIE");
var verhit = verstr.substr(verpos,8);
txt="Internet Explorer"+" Version "+verhit;
//txt=verstr;
}

//var txt=navigator.appVersion
return txt;
}


//.....Begin Menu Tracking Cookie Code..................................................................................................................................................
//  Function goNext(x) is called from any page...x is the page we want to go to.  The various procs create and maintain
// a cookie array of all pages navigated to with the goNext() function. The page Return button onClick calls the prevPage
// function and passes the number of pages to move back to. The prevPage proc defaults to one page if nothing is passed.
// the prevPage function removes the specified number of entries from the array, keeping it current.
// New Cookie Array procs to handle xlevel menu system. added 04/17/05
var timeToKeep = 31536000000; // one year
var expires = new Date();
expires.setTime(expires.getTime() + timeToKeep);
var dbug = 0; function d_a(ary) {var beg = next_entry(ary) - 1; for (var i = beg ; i > -1; i--) {ary[i] = null;}} function init_array() {if (dbug) alert('init_cookie');  var ary = new Array(null); return ary;} function set_cookie(name,value,expires) {if (dbug) alert('set_cookie'); if (!expires) expires = new Date();
document.cookie = name + '=' + escape(value) + '; expires=' + expires.toGMTString() + '; path=/';} function get_cookie(name) {if (dbug) alert('get_cookie'); var dcookie = document.cookie; var cname = name + "="; var clen = dcookie.length; var cbegin = 0; while (cbegin < clen) {var vbegin = cbegin + cname.length;
if (dcookie.substring(cbegin, vbegin) == cname) {var vend = dcookie.indexOf (";", vbegin); if (vend == -1) vend = clen; return unescape(dcookie.substring(vbegin, vend));} cbegin = dcookie.indexOf(" ", cbegin) + 1; if (cbegin == 0) break;} return null;} function del_cookie(name) {if (dbug) alert('del_cookie');
document.cookie = name + '=' + '; expires=Thu, 01-Jan-70 00:00:01 GMT; path=/';} function get_array(name, ary) {if (dbug) alert('get_array'); d_a(ary); var ent = get_cookie(name); if (ent) {i = 1; while (ent.indexOf('^') != '-1') {ary[i] = ent.substring(0,ent.indexOf('^')); i++;
ent = ent.substring(ent.indexOf('^')+1, ent.length);}}} function set_array(name, ary, expires) {if (dbug) alert('set_array'); var value = ''; for (var i = 1; ary[i]; i++) {value += ary[i] + '^';} set_cookie(name, value, expires);} function del_entry(name, ary, pos, expires) {if (dbug) alert('del_entry');
var value = ''; get_array(name, ary); for (var i = 1; i < pos; i++) {value += ary[i] + '^';} for (var j = pos + 1; ary[j]; j++) {value += ary[j] + '^';} set_cookie(name, value, expires);} function next_entry(ary) {if (dbug) alert('next_entry'); var j = 0; for (var i = 1; ary[i]; i++) {j = i} return j + 1;}
function debug_on() {dbug = 1;} function debug_off() {dbug = 0;} function dump_cookies() {if (document.cookie == '') document.write('No Cookies Found'); else {thisCookie = document.cookie.split('; '); for (i=0; i<thisCookie.length; i++) {document.write(thisCookie[i] + '<br \/>');}}}


function mod10( cardNumber ) { // LUHN Formula for validation of credit card numbers.
	var ar = new Array( cardNumber.length );
	var i = 0,sum = 0;
    	for( i = 0; i < cardNumber.length; ++i ) {
    		ar[i] = parseInt(cardNumber.charAt(i));
    	}
    	for( i = ar.length -2; i >= 0; i-=2 ) { // you have to start from the right, and work back.
    		ar[i] *= 2;							 // every second digit starting with the right most (check digit)
    		if( ar[i] > 9 ) ar[i]-=9;			 // will be doubled, and summed with the skipped digits.
    	}										 // if the double digit is > 9, ADD those individual digits together 
        	for( i = 0; i < ar.length; ++i ) {
        		sum += ar[i];						 // if the sum is divisible by 10 mod10 succeeds
        	}
        	return (((sum%10)==0)?true:false);	 	
    }

        function expired( month, year ) {
        	var now = new Date();							// this function is designed to be Y2K compliant.
        	var expiresIn = new Date(year,month,0,0,0);		// create an expired on date object with valid thru expiration date
        	expiresIn.setMonth(expiresIn.getMonth()+1);		// adjust the month, to first day, hour, minute & second of expired month
        	if( now.getTime() < expiresIn.getTime() ) return false;
        	return true;									// then we get the miliseconds, and do a long integer comparison
    }

        function validateCard(cardNumber,cardType,cardMonth,cardYear) {
        	if( cardNumber.length == 0 ) {						//most of these checks are self explanitory
        		alert("Please enter a valid card number.");
        		return false;				
        	}
        	for( var i = 0; i < cardNumber.length; ++i ) {		// make sure the number is all digits.. (by design)
        		var c = cardNumber.charAt(i);


            		if( c < '0' || c > '9' ) {
            			alert("Please enter a valid card number. Use only digits. do not use spaces or hyphens.");
            			return false;
            		}
            	}
            	var length = cardNumber.length;			//perform card specific length and prefix tests
                	switch( cardType ) {
                		case 'a':
                    			if( length != 15 ) {
                    				alert("Please enter a valid American Express Card number.");
                    				return;
                    			}
                    			var prefix = parseInt( cardNumber.substring(0,2));
                        			if( prefix != 34 && prefix != 37 ) {
                        				alert("Please enter a valid American Express Card number.");
                        				return;
                        			}
                        			break;

                        		case 'd':
                            			if( length != 16 ) {
                            				alert("Please enter a valid Discover Card number.");
                            				return;
                            			}
                            			var prefix = parseInt( cardNumber.substring(0,4));
                                			if( prefix != 6011 ) {
                                				alert("Please enter a valid Discover Card number.");
                                				return;
                                			}
                                			break;

                                		case 'm':
                                    			if( length != 16 ) {
                                    				alert("Please enter a valid MasterCard number.");
                                    				return;
                                    			}
                                    			var prefix = parseInt( cardNumber.substring(0,2));
                                        			if( prefix < 51 || prefix > 55) {
                                        				alert("Please enter a valid MasterCard Card number.");
                                        				return;
                                        			}
                                        			break;

                                        		case 'v':
                                            			if( length != 16 && length != 13 ) {
                                            				alert("Please enter a valid Visa Card number.");
                                            				return;
                                            			}
                                            			var prefix = parseInt( cardNumber.substring(0,1));
                                                			if( prefix != 4 ) {
                                                				alert("Please enter a valid Visa Card number.");
                                                				return;
                                                			}
                                                			break;
                                                	}
                                                	if( !mod10( cardNumber ) ) { 		// run the check digit algorithm
                                                		alert("Sorry! this is not a valid credit card number.");
                                                		return false;
                                                	}
                                                	if( expired( cardMonth, cardYear ) ) {							// check if entered date is already expired.
                                                		alert("Sorry! The expiration date you have entered would make this card invalid.");
                                                		return false;
                                                	}
                                                	return true; // at this point card has not been proven to be invalid
                                            }
//....End of Credit Card Validation Code...................................................................................................................................................


function tZone(){
var cDT = new Date();
var tZDiff = cDT.getTimezoneOffset()/60;
var tZSay = "";

var Month = cDT.getMonth();
var Day = cDT.getDay();
var Year = cDT.getYear();

	if (Month>=3 && Month<=10){
		if (tZDiff==4)
			{tZSay="Eastern Daylight Time";}
		if (tZDiff==5)
			{tZSay="Central Daylight Time";}
		if (tZDiff==6)
			{tZSay="Mountain Daylight Time";}
		if (tZDiff==7)
			{tZSay="Pacific Daylight Time";}}
	if (Month<=2 || Month>=11){
		if (tZDiff==4)
			{tZSay="Eastern Standard Time";}
		if (tZDiff==5)
			{tZSay="Central Standard Time";}
		if (tZDiff==6)
			{tZSay="Mountain Standard Time";}
		if (tZDiff==7)
			{tZSay="Pacific Standard Time";}}

return tZSay;
}

//  Number Formatting Section
function FmtCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + '$' + num + '.' + cents);
}

function FmtNumber(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + num + '.' + cents);
}

//---------------------------------------------------------------------------------------------------------------------
//----------------------------------------Number Formatter by On3Galleries.com----------------------------------------
//----------------------------------------  You are free to use this in your   ----------------------------------------
//----------------------------------------  scripts, but you must leave this   ----------------------------------------
//----------------------------------------   Copyright notice intact. Enjoy!   ----------------------------------------
//---------------------------------------------------------------------------------------------------------------------
//---------------------------------------- You can call this function with only----------------------------------------
//----------------------------------------   the 'num' object (reference your  ----------------------------------------
//----------------------------------------   field you want to format). If no  ----------------------------------------
//----------------------------------------formats are sent, it will use default----------------------------------------
//----------------------------------------             formats.                ----------------------------------------
//---------------------------------------------------------------------------------------------------------------------
function FormatNumber(num, format)
{
var shortformat="";
if(format==null)
	{
			// Choose the default format you prefer for the <b style="color:black;background-color:#a0ffff">number</b>. 
		//format = "#-(###) ###-#### ";		// Telephone w/ LD Prefix and Area Code
//		format = "(###) ###-#### ";			// Telephone w/ Area Code
		format = "###-###-####";			// Telephone w/ Area Code (dash seperated)
		//format = "###-##-####";			//Social Security <b style="color:black;background-color:#a0ffff">Number</b>
	}					
//---------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------
	if(shortformat==null)
	{
		// Choose the short format (without area code) you prefer. 
		//If you do not want multiple formats, leave it as "".

		//var shortformat = "###-#### ";
		var shortformat = "";
	}
	
//---------------------------------------------------------------------------------------------------------------------
//----------------------------------------This code can be used to format any <b style="color:black;background-color:#a0ffff">number</b>. ---------------------------------
//----------------------------------------Simply change the format to a <b style="color:black;background-color:#a0ffff">number</b> format ---------------------------------
//---------------------------------------- you prefer. It will ignore all characters  ---------------------------------
//----------------------------------------  except the #, where it will replace with  ---------------------------------
//----------------------------------------               user input.                  ---------------------------------
//---------------------------------------------------------------------------------------------------------------------

	var validchars = "0123456789";
	var tempstring = "";
	var returnstring = "";
	var extension = "";
	var tempstringpointer = 0;
	var returnstringpointer = 0;
	count = 0;

	// Get the length so we can go through and remove all non-numeric characters
	var length = num.value.length;
		

	// We are only concerned with the format of the phone <b style="color:black;background-color:#a0ffff">number</b> - extensions can be left alone.
	if (length > format.length)
	{
		length = format.length;
	};
	
	// scroll through what the user has typed
	for (var x=0; x<length; x++)
	{
		if (validchars.indexOf(num.value.charAt(x))!=-1)
		{
		tempstring = tempstring + num.value.charAt(x);
		};
	};
	// We should now have just the #'s - extract the extension if needed
	if (num.value.length > format.length)
	{
		length = format.length;
		extension = num.value.substr(format.length, (num.value.length-format.length));
	};
	
	// if we have fewer characters than our short format, we'll default to the short version.
	for (x=0; x<shortformat.length;x++)
	{
		if (shortformat.substr(x, 1)=="#")
		{
			count++;
		};
	}
	if (tempstring.length <= count)
	{
		format = shortformat;
	};

	
	//Loop through the format string and insert the numbers where we find a # sign
	for (x=0; x<format.length;x++)
	{
		if (tempstringpointer <= tempstring.length)
		{
			if (format.substr(x, 1)=="#")
			{
				returnstring = returnstring + tempstring.substr(tempstringpointer, 1);
				tempstringpointer++;
			}else{
				returnstring = returnstring + format.substr(x, 1);
			}
		}
		
	}

	// We have gone through the entire format, let's add the extension back on.
		returnstring = returnstring + extension;
	
	//we're done - let's return our value to the field.
	num.value = returnstring;
}	
// End -->

