/*'**********************************************************************
 * Copyright 2001-2004 Virtual Commitment, Inc., Richardson, Texas      *
 *                                                                      *
 *  $Program:: Teamwork Dynamics Accountability Process               $ *
 *                                                                      *
 * $Workfile:: jscript.js                                             $ *
 *                                                                      *
 * $Revision:: 22                                                     $ *
 *                                                                      *
 *  $Modtime:: 5/27/03 8:01p                                          $ *
 *                                                                      *
 *   $Author:: Crisr                                                  $ *
 *                                                                      *
 *  Synopsis:: Common client side JavaScript functions                  *
 *                                                                      *
 *     Notes:: This is a file that is included in all the scripts which *
 *             need to perform some common JavaScript functions on the  *
 *             client side.                                             *
 *                                                                      *
 ************************************************************************/
// function to limit input size in text area
function maxsizeTextArea(textArea, maxsize) {
   if (textArea.value.length >= maxsize) {
      switch (event.keyCode) {
         case 0x03:              // break
         case 0x08:              // backspace
         case 0x09:              // tab
         case 0x0C:              // num 5?
         case 0x0D:              // enter
         case 0x10:              // shift
         case 0x11:              // CTRL
         case 0x12:              // alt
         case 0x13:              // pause
         case 0x14:              // caps lock
         case 0x1B:              // escape
         case 0x21:              // page up
         case 0x22:              // page down
         case 0x23:              // end
         case 0x24:              // home
         case 0x25:              // left arrow
         case 0x26:              // up arrow
         case 0x27:              // right arrow
         case 0x28:              // down arrow
         case 0x2D:              // insert
         case 0x2E:              // delete
         case 0x5B:              // win - left
         case 0x5C:              // win - right
         case 0x5D:              // popup menu
         case 0x70:              // F1
         case 0x71:              // F2
         case 0x72:              // F3
         case 0x73:              // F4
         case 0x74:              // F5
         case 0x75:              // F6
         case 0x76:              // F7
         case 0x77:              // F8
         case 0x78:              // F9
         case 0x79:              // F10
         case 0x7A:              // F11
         case 0x7B:              // F12
         case 0x90:              // num lock
         case 0x91:              // scroll lock?
            return;
            break;
         default:
            event.returnValue = false;
            break;
      }
   }
}
function maxclipTextArea(textArea, maxsize) {
   if (textArea.value.length > maxsize) {
      textArea.value = textArea.value.substring(0, maxsize);
      alert("Maximum text size exceeded.  Text truncated at " + maxsize + " characters.");
   }
}
// function mimics the VBScript Trim function.  It kills leading and trailing blanks from the string
function Trim(s) {
   if (typeof(s) == "null") s = "";
   s = s.toString();
   while (s.charAt(0) == " ") {             // Kill the leading blanks
      s = s.substring(1);
   }
   while (s.charAt(s.length-1) == " ") {    // Kill the trailing blanks
      s = s.substring(0, s.length - 1);
   }
   return s;
}
function OptionTrim(s) {
   if (typeof(s) == "null") s = "";
   s = s.toString();
   return Trim(s.replace(/\xA0/g, " "));
}
// Returns an int representing the character code of the first character in the string
function Asc(s) {
   return "                                !\"#$%&'()*+'-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~".indexOf(s);
}
// returns an expression formatted as a number.
function FormatNumber(expression, numDigitsAfterDecimal) {
   var iNumDecimals = NumDigitsAfterDecimal;
   var dbInVal = Expression;
   var bNegative = false;
   var iInVal = 0;
   var strInVal
   var strWhole = "", strDec = "";
   var strTemp = "", strOut = "";
   var iLen = 0;
   if (dbInVal < 0) {
      bNegative = true;
      dbInVal *= -1;
   }
   dbInVal = dbInVal * Math.pow(10, iNumDecimals)
   iInVal = parseInt(dbInVal);
   if ((dbInVal - iInVal) >= .5) {
      iInVal++;
   }
   strInVal = iInVal + "";
   strWhole = strInVal.substring(0, (strInVal.length - iNumDecimals));
   strDec = strInVal.substring((strInVal.length - iNumDecimals), strInVal.length);
   while (strDec.length < iNumDecimals) {
      strDec = "0" + strDec;
   }
   iLen = strWhole.length;
   if (iLen >= 3) {
      while (iLen > 0) {
         strTemp = strWhole.substring(iLen - 3, iLen);
         if (strTemp.length == 3) {
            strOut = "," + strTemp + strOut;
            iLen -= 3;
         } else {
            strOut = strTemp + strOut;
            iLen = 0;
         }
      }
      if (strOut.substring(0, 1) == ",") {
         strWhole = strOut.substring(1, strOut.length);
      } else {
         strWhole = strOut;
      }
   }
   if (bNegative) {
      return "-" + strWhole + "." + strDec;
   } else {
      return strWhole + "." + strDec;
   }
}
// check whether string s is empty.
function isEmpty(s) {
   return (Trim(s).length == 0);
}
// returns true if string s is empty or whitespace characters only.
function isWhitespace(s) {
   return (isEmpty(s) || /^\s+$/.test(s));
}
// returns true if character c is an English letter
function isLetter(c) {
   return /^[a-zA-Z]$/.test(c);
}
// returns true if character c is a digit
function isDigit(c) {
   return /^\d/.test(c);
}
// returns true if character c is a letter or digit.
function isLetterOrDigit(c) {
   return /^([a-zA-Z]|\d)$/.test(c);
}
// returns true if string s is English letters (A .. Z, a..z) only.
function isAlphabetic(s, emptyOK) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   return /^[a-zA-Z]+$/.test(s)
}
// returns true if string s is English letters (A .. Z, a..z) and numbers only.
function isAlphanumeric(s, emptyOK) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   return /^[a-zA-Z0-9]+$/.test(s)
}
// returns true if all characters in string s are numbers.
function isInteger(s, emptyOK) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   return /^\d+$/.test(s);
}
// returns true if all characters are numbers; first character is allowed to be + or -
function isSignedInteger(s, emptyOK) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   return /^(\+|-)?\d+$/.test(s);
}
// returns true if string s is an integer > 0.
function isPositiveInteger(s, emptyOK) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   if (!isSignedInteger(s, emptyOK)) return false;
   if (parseInt(s) > 0) return true;
   return false;
}
// returns true if string s is an integer >= 0.
function isNonNegativeInteger(s) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   if (!isSignedInteger(s, emptyOK)) return false;
   if (parseInt(s) >= 0) return true;
   return false;
}
// returns true if string s is an integer < 0.
function isNegativeInteger(s) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   if (!isSignedInteger(s, emptyOK)) return false;
   if (parseInt(s) < 0) return true;
   return false;
}
// returns true if string s is an integer <= 0.
function isNonPositiveInteger(s, emptyOK) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   if (!isSignedInteger(s, emptyOK)) return false;
   if (parseInt(s) <= 0) return true;
   return false;
}
// true if string s is an unsigned floating point (real) number.
function isFloat(s, emptyOK) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   return /^((\d+(\.\d*)?)|((\d*\.)?\d+))$/.test(s)
}
// returns true if string s is a signed or unsigned floating point (real) number. First character is allowed to be + or -.
function isSignedFloat(s, emptyOK) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   return /^(((\+|-)?\d+(\.\d*)?)|((\+|-)?(\d*\.)?\d+))$/.test(s)
}
// returns true if string s is an integer within the range of arguments a and b, inclusive.
function isBetween(s, a, b, emptyOK) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   return ((a <= num) && (num <= b));
}
// returns true if string s is a valid U.S. Phone Number.  Must be 10 digits.
function isUSPhoneNumber(s, emptyOK) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   return (isInteger(s, emptyOK) && s.length == 10)
}
// returns true if string s is a valid international phone number.
function isInternationalPhoneNumber(s, emptyOK){
   return (isPositiveInteger(s, isEmptyOK));
}
// returns true if string s is a valid U.S. ZIP code.  Must be 5 or 9 digits only.
function isZip (s, emptyOK) {
   if (!isInteger(s, emptyOK)) return false;
   return ((Trim(s).length == 5) || (Trim(s).length == 9));
}
function isEmail(emailStr, emptyOK) {
   if (isEmpty(s)) {
      if (emptyOK) return true;
      return false;
   }
   /* The following pattern is used to check if the entered e-mail address
      fits the user@domain format.  It also is used to separate the username
      from the domain. */
   var emailPat = /^(.+)@(.+)$/
   /* The following string represents the pattern for matching all special
      characters.  We don't want to allow special characters in the address.
      These characters include ( ) < > @ , ; : \ " . [ ]    */
   var specialChars = "\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
   /* The following string represents the range of characters allowed in a
      username or domainname.  It really states which chars aren't allowed. */
   var validChars = "\[^\\s" + specialChars + "\]"
   /* The following pattern applies if the "user" is a quoted string (in
      which case, there are no rules about which characters are allowed
      and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
      is a legal e-mail address. */
   var quotedUser = "(\"[^\"]*\")"
   /* The following pattern applies for domains that are IP addresses,
      rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
      e-mail address. NOTE: The square brackets are required. */
   var ipDomainPat = /^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
   /* The following string represents an atom (basically a series of
      non-special characters.) */
   var atom = validChars + '+'
   /* The following string represents one word in the typical username.
      For example, in john.doe@somewhere.com, john and doe are words.
      Basically, a word is either an atom or quoted string. */
   var word = "(" + atom + "|" + quotedUser + ")"
   // The following pattern describes the structure of the user
   var userPat = new RegExp("^" + word + "(\\." + word + ")*$")
   /* The following pattern describes the structure of a normal symbolic
      domain, as opposed to ipDomainPat, shown above. */
   var domainPat = new RegExp("^" + atom + "(\\." + atom +")*$")
   /* Finally, let's start trying to figure out if the supplied address is valid. */
   /* Begin with the coarse pattern to simply break up user@domain into
      different pieces that are easy to analyze. */
   var matchArray = emailStr.match(emailPat)
   if (matchArray == null) {
      /* Too many/few @'s or something; basically, this address doesn't
         even fit the general mould of a valid e-mail address. */
      alert("Email address incorrect (check @ and .'s)")
      return false
   }
   var user = matchArray[1]
   var domain = matchArray[2]
   // See if "user" is valid
   if (user.match(userPat) == null) {
      // user is not valid
      alert("The username doesn't seem to be valid.")
      return false
   }
   /* if the e-mail address is at an IP address (as opposed to a symbolic
      host name) make sure the IP address is valid. */
   var IPArray = domain.match(ipDomainPat)
   if (IPArray != null) {
      // this is an IP address
      for (var i = 1; i <= 4; i++) {
         if (IPArray[i] > 255) {
            alert("Destination IP address is invalid!")
            return false
         }
      }
      return true
   }
   // Domain is symbolic name
   var domainArray = domain.match(domainPat)
   if (domainArray == null) {
      alert("The domain name doesn't seem to be valid.")
      return false
   }
   /* domain name seems valid, but now make sure that it ends in a
      three-letter word (like com, edu, gov) or a two-letter word,
      representing country (uk, nl), and that there's a hostname preceding
      the domain or country. */
   /* Now we need to break up the domain to get a count of how many atoms
      it consists of. */
   var atomPat = new RegExp(atom,"g")
   var domArr = domain.match(atomPat)
   var len = domArr.length
   if (domArr[domArr.length-1].length < 2 || domArr[domArr.length-1].length > 3) {
      // the address must end in a two letter or three letter word.
      alert("The address must end in a three-letter domain, or two letter country.")
      return false
   }
   // Make sure there's a host name preceding the domain.
   if (len < 2) {
      alert("This address is missing a hostname!")
      return false
   }
   // If we've gotten this far, everything's valid!
   return true;
}
// Handy function for arbitrarily inserting formatting characters
// or delimiters of various kinds within TARGETSTRING.
//
// reformat takes one named argument, a string s, and any number
// of other arguments.  The other arguments must be integers or
// strings.  These other arguments specify how string s is to be
// reformatted and how and where other strings are to be inserted
// into it.
//
// reformat processes the other arguments in order one by one.
// * If the argument is an integer, reformat appends that number
//   of sequential characters from s to the resultString.
// * If the argument is a string, reformat appends the string
//   to the resultString.
//
// NOTE: The first argument after TARGETSTRING must be a string.
// (It can be empty.)  The second argument must be an integer.
// Thereafter, integers and strings must alternate.  This is to
// provide backward compatibility to Navigator 2.0.2 JavaScript
// by avoiding use of the typeof operator.
//
// It is the caller's responsibility to make sure that we do not
// try to copy more characters from s than s.length.
//
// EXAMPLES:
//
// * To reformat a 10-digit U.S. phone number from "1234567890"
//   to "(123) 456-7890" make this function call:
//   reformat("1234567890", "(", 3, ") ", 3, "-", 4)
//
// * To reformat a 9-digit U.S. Social Security number from
//   "123456789" to "123-45-6789" make this function call:
//   reformat("123456789", "", 3, "-", 2, "-", 4)
//
// HINT:
//
// If you have a string which is already delimited in one way
// (example: a phone number delimited with spaces as "123 456 7890")
// and you want to delimit it in another way using function reformat,
// call function stripCharsNotInBag to remove the unwanted
// characters, THEN call function reformat to delimit as desired.
//
// EXAMPLE:
//
// reformat (stripCharsNotInBag ("123 456 7890", digits),
//           "(", 3, ") ", 3, "-", 4)
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;
}
// removes all characters which appear in regexp bag from string s.
function stripCharsInRE(s, bag) {
   return s.replace(bag, "");
}
// removes all characters which appear in string bag from string s.
function stripCharsInBag(s, bag) {
   var rv = "";
   for (var i = 0; i < s.length; i++) {
      var c = s.charAt(i);
      if (bag.indexOf(c) == -1) rv += c;
   }
   return rv;
}
// Removes all characters which do NOT appear in string bag from string s.
function stripCharsNotInBag (s, bag) {
   var rv = "";
   for (var i = 0; i < s.length; i++) {
     var c = s.charAt(i);
     if (bag.indexOf(c) != -1) rv += c;
   }
   return rv;
}
// takes a string of 5 or 9 digits; if 9 digits, inserts separator hyphen
function reformatZip(s) {
   s = Trim(s);
   if (!isZip(s, false)) return s;
   if (s.length == 5) return s;
   return reformat(stripCharsNotInBag(s, "0123456789"), "", 5, "-", 4);
}
// takes a string of 10 digits and reformats as (123) 456-789
function reformatPhone(s) {
   if (!isUSPhone) return s;
   return reformat(stripCharsNotInBag(s, "0123456789"), "(", 3, ") ", 3, "-", 4);
}
// function makes sure that it is not a blank string: returns - true=non-blank false=blank
function ValidateNotBlank(s) {
   s = Trim(s);
   if (s.length) {
      return true;
   } else {
      return false;
   }
}
// function makes sure that all the characters are digits (0-9): true=all-digits false=non-digit
function ValidateDigits(s) {
   s = Trim(s);
   for (var i = 0; i < s.length; i++) {
      var a = s.substring(i,i+1);
      if ((a < "0") || (a > "9")) return false;
   }
   return true;
}
// function makes sure that all the characters are digits (0-9) or comma: true=all-digits false=non-digit
function ValidateNumber(s) {
   s = Trim(s);
   for (var i = 0; i < s.length; i++) {
      var a = s.substring(i,i+1);
      if (((a < "0") || (a > "9")) && (a != ",")) return false;
   }
   return true;
}
// function makes sure that all the characters are digits (0-9) or comma: true=all-digits false=non-digit
function ValidateNumbers(s) {
   s = Trim(s);
   for (var i = 0; i < s.length; i++) {
      var a = s.substring(i,i+1);
      if (((a < "0") || (a > "9")) && (a != ",") && ((i > 0) || (a != "-"))) return false;
   }
   return true;
}
// function makes sure that all the characters are digits (0-9) or decimal: true=all-digits false=non-digit
function ValidateNumeric(s) {
   s = Trim(s);
   if (s.length == 0) return false;
   for (var i = 0; i < s.length; i++) {
      var a = s.substring(i,i+1);
      if (((a < "0") || (a > "9")) && (a != ".")) return false;
   }
   return true;
}
// function verifies that the string is an ssn: characters 0-9 or "-" and strlen > 9
function ValidateSSN(s) {
   s = Trim(s);
   var b = "";
   for (var i = 0; i < s.length; i++) {
      var a = s.substring(i,i+1);
      if ((a < "0") || (a > "9")) {
         if ((a != "-") && (a != " ")) return false;
      } else {
         b = b + a
      }
   }
   if (b.length != 9) return false;
   return true;
}
// function verifies that the string is a date in the form of mm/dd/yyyy
function ValidateDate(s) {
   s = Trim(s);
   var month = "";
   var day = "";
   var year = "";
   var j = 0;
   for (var i = 0; i < s.length; i++) {
      var a = s.substring(i,i+1);
      if (a == "/") {
         j++;
         if (j > 2) return false;
      } else {
         if ((a < "0") || (a > "9")) return false;
         if (j == 0) {
            month = month + a;
         } else if (j == 1) {
            day = day + a;
         } else {
            year = year + a;
         }
      }
   }
   if (month == "") return false;
   if (day == "") return false;
   if (year == "") return false;
   month = parseInt(month, 10);
   day = parseInt(day, 10);
   year = parseInt(year, 10);
   if ((month < 1) || (month > 12)) return false;
   if ((day < 1) || (day > 31)) return false;
   if (year < 100) year = year + 2000;
   if ((year <= 1900) || (year > 9999)) return false;
   if ((month == 4) || (month == 6) || (month == 9) || (month == 11)) {
      if (day > 30) return false;
   }
   if (month == 2) {
      if (day > 29) return false;
      if (year % 4) {
         if (day > 28) return false;
      }
   }
   return true;
}
// function checks if string has single or double quotes
function HasQuote(s) {
   s = Trim(s);
   for (var i = 0; i < s.length; i++) {
      var a = s.substring(i,i+1);
      if ((a == "\'") || (a == "\"") || (a == "\\")) return true;
   }
   return false;
}
// functions verifies that date1 is prior to date2
function DatePrior(d1, d2) {
   d1 = Trim(d1);
   if (d1 == "") return true;
   var month1 = "";
   var day1 = "";
   var year1 = "";
   var j = 0;
   for (var i = 0; i < d1.length; i++) {
      var a = d1.substring(i,i+1);
      if (a == "/") {
         j++;
         if (j > 2) return false;
      } else {
         if ((a < "0") || (a > "9")) return false;
         if (j == 0) {
            month1 = month1 + a;
         } else if (j == 1) {
            day1 = day1 + a;
         } else {
            year1 = year1 + a;
         }
      }
   }
   month1 = parseInt(month1, 10);
   day1 = parseInt(day1, 10);
   year1 = parseInt(year1, 10);
   if (year1 < 100) year1 = year1 + 2000;
   d2 = Trim(d2);
   if (d2 == "") return true;
   var month2 = "";
   var day2 = "";
   var year2 = "";
   var j = 0;
   for (var i = 0; i < d2.length; i++) {
      var a = d2.substring(i,i+1);
      if (a == "/") {
         j++;
         if (j > 2) return false;
      } else {
         if ((a < "0") || (a > "9")) return false;
         if (j == 0) {
            month2 = month2 + a;
         } else if (j == 1) {
            day2 = day2 + a;
         } else {
            year2 = year2 + a;
         }
      }
   }
   month2 = parseInt(month2, 10);
   day2 = parseInt(day2, 10);
   year2 = parseInt(year2, 10);
   if (year2 < 100) year2 = year2 + 2000;
   if (year1 < year2) return true;
   if (year1 > year2) return false;
   if (month1 < month2) return true;
   if (month1 > month2) return false;
   if (day1 >= day2) return false;
   return true;
}
// This function returns the number of days difference between date1 and date2: (date1 - date2)
function DaysDiff(d1, d2) {
   d1 = Trim(d1);
   if (d1 == "") return true;
   var month1 = "";
   var day1 = "";
   var year1 = "";
   var j = 0;
   for (var i = 0; i < d1.length; i++) {
      var a = d1.substring(i,i+1);
      if (a == "/") {
         j++;
         if (j > 2) return false;
      } else {
         if ((a < "0") || (a > "9")) return false;
         if (j == 0) {
            month1 = month1 + a;
         } else if (j == 1) {
            day1 = day1 + a;
         } else {
            year1 = year1 + a;
         }
      }
   }
   month1 = parseInt(month1, 10);
   day1 = parseInt(day1, 10);
   year1 = parseInt(year1, 10);
   d2 = Trim(d2);
   if (d2 == "") return true;
   var month2 = "";
   var day2 = "";
   var year2 = "";
   var j = 0;
   for (var i = 0; i < d2.length; i++) {
      var a = d2.substring(i,i+1);
      if (a == "/") {
         j++;
         if (j > 2) return false;
      } else {
         if ((a < "0") || (a > "9")) return false;
         if (j == 0) {
            month2 = month2 + a;
         } else if (j == 1) {
            day2 = day2 + a;
         } else {
            year2 = year2 + a;
         }
      }
   }
   month2 = parseInt(month2, 10);
   day2 = parseInt(day2, 10);
   year2 = parseInt(year2, 10);
   var jsdate1 = new Date(year1, month1 - 1, day1);
   var jsdate2 = new Date(year2, month2 - 1, day2);
   var msPerDay = 24 * 60 * 60 * 1000;                // Number of milliseconds per day
   var diff = (jsdate1.getTime() - jsdate2.getTime()) / msPerDay;
   return diff;
}
function formatPhone(sPhone) {
   return sPhone;  // disabled for now
   var sPhoneDigitOnly = "";
   for(var i = 0; i < sPhone.length; i++) {
      var sChar = new String;
      sChar = sPhone.substring(i, i+1);
      if (sChar >= '0' && sChar <= '9') {
        sPhoneDigitOnly = sPhoneDigitOnly + sChar;
      }
   }
   var sPhoneFormat = "";
   if (sPhoneDigitOnly.length > 0) {
      sPhoneFormat = "(" + sPhoneDigitOnly.substring(0, Math.min(sPhoneDigitOnly.length, 3)) + ")";
   }
   if (sPhoneDigitOnly.length > 3) {
      sPhoneFormat = sPhoneFormat + " " + sPhoneDigitOnly.substring(3, Math.min(sPhoneDigitOnly.length,6));
   }
   if (sPhoneDigitOnly.length > 6) {
      sPhoneFormat = sPhoneFormat + "-" + sPhoneDigitOnly.substring(6, Math.min(sPhoneDigitOnly.length,10));
   }
   if (sPhoneDigitOnly.length > 10) {
      sPhoneFormat = sPhoneFormat + " x" + sPhoneDigitOnly.substring(10, Math.min(sPhoneDigitOnly.length,15));
   }
   return sPhoneFormat;
}
function phoneChange(phoneObject) {
   phoneObject.value = formatPhone(phoneObject.value);
}
function formatDate(sDate) {
   var dDate = new Date(Date.parse(sDate));
   if (!isNaN(dDate)) {
      sDate = "";
      var mm = dDate.getMonth() + 1;
      sDate = sDate + ((mm < 10) ? "0" + mm : mm) + "/";
      var dd = dDate.getDate();
      sDate = sDate + ((dd < 10) ? "0" + dd : dd) + "/";
      var yy = dDate.getFullYear();
      sDate = sDate + ((yy < 1970) ? yy + 100 : yy);
   } else {
      sDate = "";
   }
   return sDate;
}
function dateChange(dateObject) {
   dateObject.value = formatDate(dateObject.value);
}
// function strips commas out of numbers
function StripNumber(s) {
   s = Trim(s);
   var a = "";
   for (var i = 0; i < s.length; i++) {
      var b = new String;
      b = s.substring(i, i+1);
      if (b >= '0' && b <= '9') {
        a = a + b;
      }
   }
   return a;
}
function intChange(intObject) {
   var s = StripNumber(Trim(intObject.value));
   var a = "";
   var j = 0;
   for (var i = s.length; i > 0; i--) {
      j = j + 1;
      if (j > 3) {
         j = 1;
         a = "," + a;
      }
      a = s.substring(i-1, i) + a;
   }
   intObject.value = a;
}
function StripsNumber(s) {
   s = Trim(s);
   var a = "";
   for (var i = 0; i < s.length; i++) {
      var b = new String;
      b = s.substring(i, i+1);
      if (b >= '0' && b <= '9') {
         a += b;
      } else if ((i == 0) && (b == '-')) {
         a += b;
      }
   }
   return a;
}
function intsChange(intObject) {
   var s = StripsNumber(Trim(intObject.value));
   var sign = ""
   if (s.substring(0, 1) == "-") {
      sign = "-";
      s = s.substring(1);
   }
   var a = "";
   var j = 0;
   for (var i = s.length; i > 0; i--) {
      j = j + 1;
      if (j > 3) {
         j = 1;
         a = "," + a;
      }
      a = s.substring(i-1, i) + a;
   }
   intObject.value = sign + a;
}
function StripDollar(s, dp) {
   s = Trim(s);
   var a = "";
   var found = false;
   for (var i = 0; i < s.length; i++) {
      var b = new String;
      b = s.substring(i, i+1);
      if (b >= '0' && b <= '9') {
        a = a + b;
      }
      if ((b == ".") && (!found) && dp > 0) {
         found = true;
         a += b;
      }
   }
   if ((a != "") && (dp > 0)) {
      if (a.indexOf(".") < 0) {
         a += ".";
         while (a.substring(a.indexOf(".")).length < dp+1) a += "0";
      } else {
         var d = a.substring(a.indexOf("."));
         if (d.length > dp+1) {
            d = s.substring(a.indexOf("."), a.indexOf(".")+dp+1);
         } else {
            while (d.length < dp+1) d += "0";
         }
         a = a.substring(0, a.indexOf(".")) + d;
      }
      if (a.indexOf(".") == 0) a = "0" + a;
   }
   return a;
}
function dollarChange(intObject, dp) {
   var s = StripDollar(Trim(intObject.value), dp);
   var a = "";
   var j = 0;
   for (var i = s.length-((dp>0)?dp+1:0); i > 0; i--) {
      j = j + 1;
      if (j > 3) {
         j = 1;
         a = "," + a;
      }
      a = s.substring(i-1, i) + a;
   }
   a = a + s.substring(s.length-((dp>0)?dp+1:0));
   if (a != "") a = "$" + a;
   intObject.value = a;
}
function StripPercent(s, dp) {
   s = Trim(s);
   var a = "";
   var found = false;
   for (var i = 0; i < s.length; i++) {
      var b = new String;
      b = s.substring(i, i+1);
      if (b >= '0' && b <= '9') {
        a = a + b;
      }
      if ((b == ".") && (!found) && dp > 0) {
         found = true;
         a += b;
      }
   }
   if ((a != "") && (dp > 0)) {
      if (a.indexOf(".") < 0) {
         a += ".";
         while (a.substring(a.indexOf(".")).length < dp+1) a += "0";
      } else {
         var d = a.substring(a.indexOf("."));
         if (d.length > dp+1) {
            d = s.substring(a.indexOf("."), a.indexOf(".")+dp+1);
         } else {
            while (d.length < dp+1) d += "0";
         }
         a = a.substring(0, a.indexOf(".")) + d;
      }
      if (a.indexOf(".") == 0) a = "0" + a;
   }
   return a;
}
function percentChange(intObject, dp) {
   var s = StripPercent(Trim(intObject.value), dp);
   var a = "";
   var j = 0;
   for (var i = s.length-((dp>0)?dp+1:0); i > 0; i--) {
      j = j + 1;
      if (j > 3) {
         j = 1;
         a = "," + a;
      }
      a = s.substring(i-1, i) + a;
   }
   a = a + s.substring(s.length-((dp>0)?dp+1:0));
   if (a != "") a = a + "%";
   intObject.value = a;
}
function ValidateEmail(emailStr) {
   // Changes:  Sandeep V. Tamhankar (stamhankar@hotmail.com) The JavaScript Source!! http://javascript.internet.com
   /* The following pattern is used to check if the entered e-mail address
      fits the user@domain format.  It also is used to separate the username
      from the domain. */
   var emailPat=/^(.+)@(.+)$/
   /* The following string represents the pattern for matching all special
      characters.  We don't want to allow special characters in the address.
      These characters include ( ) < > @ , ; : \ " . [ ]    */
   var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
   /* The following string represents the range of characters allowed in a
      username or domainname.  It really states which chars aren't allowed. */
   var validChars="\[^\\s" + specialChars + "\]"
   /* The following pattern applies if the "user" is a quoted string (in
      which case, there are no rules about which characters are allowed
      and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
      is a legal e-mail address. */
   var quotedUser="(\"[^\"]*\")"
   /* The following pattern applies for domains that are IP addresses,
      rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
      e-mail address. NOTE: The square brackets are required. */
   var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
   /* The following string represents an atom (basically a series of
      non-special characters.) */
   var atom=validChars + '+'
   /* The following string represents one word in the typical username.
      For example, in john.doe@somewhere.com, john and doe are words.
      Basically, a word is either an atom or quoted string. */
   var word="(" + atom + "|" + quotedUser + ")"
   // The following pattern describes the structure of the user
   var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
   /* The following pattern describes the structure of a normal symbolic
      domain, as opposed to ipDomainPat, shown above. */
   var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
   /* Finally, let's start trying to figure out if the supplied address is valid. */
   /* Begin with the coarse pattern to simply break up user@domain into
      different pieces that are easy to analyze. */
   var matchArray=emailStr.match(emailPat)
   if (matchArray==null) {
      /* Too many/few @'s or something; basically, this address doesn't
         even fit the general mould of a valid e-mail address. */
      alert("Email address incorrect (check @ and .'s)")
      return false
   }
   var user=matchArray[1]
   var domain=matchArray[2]
   // See if "user" is valid
   if (user.match(userPat)==null) {
      // user is not valid
      alert("The username doesn't seem to be valid.")
      return false
   }
   /* if the e-mail address is at an IP address (as opposed to a symbolic
      host name) make sure the IP address is valid. */
   var IPArray=domain.match(ipDomainPat)
   if (IPArray!=null) {
      // this is an IP address
      for (var i=1;i<=4;i++) {
         if (IPArray[i]>255) {
            alert("Destination IP address is invalid!")
            return false
         }
      }
      return true
   }
   // Domain is symbolic name
   var domainArray=domain.match(domainPat)
   if (domainArray==null) {
      alert("The domain name doesn't seem to be valid.")
      return false
   }
   /* domain name seems valid, but now make sure that it ends in a
      three-letter word (like com, edu, gov) or a two-letter word,
      representing country (uk, nl), and that there's a hostname preceding
      the domain or country. */
   /* Now we need to break up the domain to get a count of how many atoms
      it consists of. */
   var atomPat=new RegExp(atom,"g")
   var domArr=domain.match(atomPat)
   var len=domArr.length
   if (domArr[domArr.length-1].length<2 ||
      domArr[domArr.length-1].length>3) {
         // the address must end in a two letter or three letter word.
         alert("The address must end in a three-letter domain, or two letter country.")
         return false
   }
   // Make sure there's a host name preceding the domain.
   if (len<2) {
      var errStr="This address is missing a hostname!"
      alert(errStr)
      return false
   }
   // If we've gotten this far, everything's valid!
   return true;
}
function reQuote(s) {
   if (typeof(s) != "string") return s;
   s = s.replace(/\\/g, "\\\\").replace(/\"/g, "\\\"");
   s = s.replace(/</g, "&lt;").replace(/>/g, "&gt;");
   return "\"" + s + "\"";
}
var fnode_submenuitems = null;
var fnode_href = Array(50);
var fnode_item = Array(50);
var fnode_subhref = Array(50);
var fnode_subitem = Array(50);
function initFNodes() {
   fnode_menuitems    = document.getElementById("menuitems");
   fnode_submenuitems = document.getElementById("submenuitems");
   for (var i = 0; i < 50; i++) {
      fnode_href[i]    = document.getElementById("href"+i);
      fnode_item[i]    = document.getElementById("item"+i);
      fnode_subitem[i] = document.getElementById("subitem"+i);
      fnode_subhref[i] = document.getElementById("subhref"+i);
   }
}
function showMenu(
   s0, t0, h0,
   s1, t1, h1,
   s2, t2, h2,
   s3, t3, h3,
   s4, t4, h4,
   s5, t5, h5,
   s6, t6, h6,
   s7, t7, h7,
   s8, t8, h8,
   s9, t9, h9,
   s10, t10, h10,
   s11, t11, h11,
   s12, t12, h12,
   s13, t13, h13,
   s14, t14, h14,
   s15, t15, h15,
   s16, t16, h16,
   s17, t17, h17,
   s18, t18, h18,
   s19, t19, h19,
   s20, t20, h20,
   s21, t21, h21,
   s22, t22, h22,
   s23, t23, h23,
   s24, t24, h24,
   s25, t25, h25,
   s26, t26, h26,
   s27, t27, h27,
   s28, t28, h28,
   s29, t29, h29,
   s30, t30, h30,
   s31, t31, h31,
   s32, t32, h32,
   s33, t33, h33,
   s34, t34, h34,
   s35, t35, h35,
   s36, t36, h36,
   s37, t37, h37,
   s38, t38, h38,
   s39, t39, h39,
   s40, t40, h40,
   s41, t41, h41,
   s42, t42, h42,
   s43, t43, h43,
   s44, t44, h44,
   s45, t45, h45,
   s46, t46, h46,
   s47, t47, h47,
   s48, t48, h48,
   s49, t49, h49) {
   var xpad = 160;
   var ypad = 314;
   var s = new Array(50);
   var t = new Array(50);
   var h = new Array(50);
   var e = new Array(50);
   var a = new Array(50);
   for (var i = 0; i < 50; i++) {
      var j = (i*3);
      if (j+1 < arguments.length) {
         s[i] = arguments[j];
         t[i] = arguments[j+1];
         h[i] = arguments[j+2];
      }
      a[i] = "&nbsp;";
   }
   document.getElementById("submenuitems").style.visibility = "hidden";
   for (var i = 0; i < 50; i++) {
      e[i] = new Function("{ hideSubMenu(); document.getElementById(\"href" + i + "\").style.color = \"white\"; this.style.color = \"white\"; this.style.backgroundColor = \"navy\"; }");
      if (typeof(s[i]) == "string") {
         var submenuflag = false;
         for (var j = i+1; j < 50; j++) {
            if (s[i] == s[j]) {
               if (!submenuflag) {
                  e[i] = "showSubMenu(" + i + "," + reQuote(t[i]) + "," + reQuote(h[i]);
                  t[i] = s[i];
                  a[i] = "<img src='zarrowmenu.gif' />&nbsp;";
                  h[i] = "javascript:returnNull();";
                  submenuflag = true;
               } else {
               }
               e[i] += "," + reQuote(t[j]) + "," + reQuote(h[j]);
               s[j] = undefined;
            }
         }
         if (submenuflag) {
            e[i] += ");";
            e[i] = new Function("{ document.getElementById(\"href" + i + "\").style.color = \"white\"; this.style.color = \"white\"; this.style.backgroundColor = \"navy\"; " + e[i] + " }");
         }
      }
   }
   if (document.all) {
      if ((!window.event.ctrlKey) && (!window.event.altKey) && (window.event.button < 2)) return false;
   } else {
      if (mozEvent == null) return false;
      if ((!mozEvent.ctrlKey) && (mozEvent.button < 2)) return false;
   }
   for (var i = 0; i < 50; i++) {
      if (typeof(s[i]) != "undefined") {
         document.getElementById("item"+i).style.display  = '';
         document.getElementById("item"+i).onmouseover = e[i];
         document.getElementById("href"+i).innerHTML = "&nbsp;&nbsp;&nbsp;&nbsp;" + t[i];
         document.getElementById("href"+i).href = h[i];
         document.getElementById("arrow"+i).innerHTML  = a[i];
      } else {
         document.getElementById("item"+i).style.display = 'none';
         ypad -= 14;
      }
   }
   if (document.all) {
      var xClip = document.body.offsetWidth - window.event.x - xpad;     // document.all.menuitems.width;
      if (xClip > 0) xClip = 0;
      document.all.menuitems.style.left = window.event.x + document.body.scrollLeft + xClip;
      var yClip = document.body.offsetHeight - window.event.y - ypad;    // document.all.menuitems.height;
      if (yClip > 0) yClip = 0;
      document.all.menuitems.style.top =  window.event.y + document.body.scrollTop + yClip - 20;
      document.all.menuitems.style.visibility = "visible";
      window.event.cancelBubble = true;
      returnValue = false;
   } else {
      var xClip = document.body.offsetWidth - mozEvent.clientX - xpad;     // document.all.menuitems.width;
      if (xClip > 0) xClip = 0;
      document.getElementById("menuitems").style.left = mozEvent.clientX + document.body.scrollLeft + xClip;
      var yClip = document.body.offsetHeight - mozEvent.clientY - ypad;    // document.all.menuitems.height;
      if (yClip > 0) yClip = 0;
      yClip = 0;
      document.getElementById("menuitems").style.top =  mozEvent.clientY + document.body.scrollTop + yClip - 20;
      document.getElementById("menuitems").style.visibility = "visible";
      mozEvent.stopPropagation();
      mozEvent.preventDefault();
   }
   return false;
}
function returnNull() {
}
var prevSubMenuMI = -1;
function showSubMenu(mi,
   t0, h0,
   t1, h1,
   t2, h2,
   t3, h3,
   t4, h4,
   t5, h5,
   t6, h6,
   t7, h7,
   t8, h8,
   t9, h9,
   t10, h10,
   t11, h11,
   t12, h12,
   t13, h13,
   t14, h14,
   t15, h15,
   t16, h16,
   t17, h17,
   t18, h18,
   t19, h19,
   t20, h20,
   t21, h21,
   t22, h22,
   t23, h23,
   t24, h24,
   t25, h25,
   t26, h26,
   t27, h27,
   t28, h28,
   t29, h29,
   t30, h30,
   t31, h31,
   t32, h32,
   t33, h33,
   t34, h34,
   t35, h35,
   t36, h36,
   t37, h37,
   t38, h38,
   t39, h39,
   t40, h40,
   t41, h41,
   t42, h42,
   t43, h43,
   t44, h44,
   t45, h45,
   t46, h46,
   t47, h47,
   t48, h48,
   t49, h49) {
   var xpad = 160;
   var ypad = 314;
   if ((fnode_submenuitems.style.visibility == "visible") && (mi == prevSubMenuMI)) return;
   prevSubMenuMI = mi;
   hideSubMenu();
   fnode_href[mi].style.color = "white";
   fnode_item[mi].style.color = "white";
   fnode_item[mi].style.backgroundColor = "navy";
   for (var i = 0; i < 50; i++) {
      var j = 1 + (i*2);
      var desc = arguments[j];
      var href = arguments[j+1];
      if (j+1 < arguments.length) {
         var e = new Function("{ document.getElementById(\"href" + mi + "\").style.color = \"white\"; document.getElementById(\"item" + mi + "\").style.color = \"white\"; document.getElementById(\"item" + mi + "\").style.backgroundColor = \"navy\"; document.getElementById(\"subhref" + i + "\").style.color = \"white\"; this.style.color = \"white\"; this.style.backgroundColor = \"navy\"; }");
         fnode_subitem[i].style.display  = '';
         fnode_subitem[i].onmouseover  = e;
         fnode_subhref[i].innerHTML  = "&nbsp;&nbsp;&nbsp;&nbsp;" + desc + '&nbsp;&nbsp;&nbsp;&nbsp;';
         fnode_subhref[i].href  = href;
      } else {
         fnode_subitem[i].style.display  = 'none';
         ypad -= 14;
      }
   }
   fnode_submenuitems.style.visibility = "visible";
   var left = parseInt(document.getElementById("menuitems").style.left, 10);
   if (document.all) {
      var xClip = document.body.offsetWidth - (left-document.body.scrollLeft+150) - xpad;     // document.all.submenuitems.width;
      if (xClip > 0) xClip = 0;
      if (xClip < 0) {
         xClip = 0;
         left -= 300;
      }
      document.all.submenuitems.style.left = (left+150) + xClip;
      var yClip = document.body.offsetHeight - window.event.y - ypad;    // document.all.submenuitems.height;
      if (yClip > 0) yClip = 0;
      yClip = 0;
      document.all.submenuitems.style.top =  window.event.y + document.body.scrollTop + yClip - 20;
      fnode_submenuitems.style.visibility = "visible";
      window.event.cancelBubble = true;
      returnValue = false;
   } else {
      var xClip = document.body.offsetWidth - (left+150-document.body.scrollLeft) - xpad;     // document.all.submenuitems.width;
      if (xClip > 0) xClip = 0;
      if (xClip < 0) {
         xClip = 0;
         left -= 300;
      }
      fnode_submenuitems.style.left = (left+150-document.body.scrollLeft) + document.body.scrollLeft + xClip;
      var yClip = document.body.offsetHeight - mozEvent.clientY - ypad;    // document.all.submenuitems.height;
      if (yClip > 0) yClip = 0;
      yClip = 0;
      fnode_submenuitems.style.top =  mozEvent.clientY + document.body.scrollTop + yClip - 20;
      fnode_submenuitems.style.visibility = "visible";
      mozEvent.stopPropagation();
      mozEvent.preventDefault();
   }
   return false;
}
function hideMenu() {
   if (document.getElementById("menuitems").style.visibility != "hidden") {
      if (document.all) {
         if (window.event) {
            if ((window.event.ctrlKey) || (window.event.button >= 2)) return false;
         }
      }
      document.getElementById("menuitems").style.visibility = "hidden";
      document.getElementById("submenuitems").style.visibility = "hidden";
   }
}
function hideSubMenu() {
   if (document.getElementById("submenuitems").style.visibility != "hidden") {
      if (document.all) {
         if (window.event) {
            if ((window.event.ctrlKey) || (window.event.button >= 2)) return false;
         }
      }
      document.getElementById("submenuitems").style.visibility = "hidden";
      for (var i = 0; i < 50; i++) {
         fnode_subhref[i].style.color = "black";
         fnode_subitem[i].style.color = "black";
         fnode_subitem[i].style.backgroundColor = "#DAD2CA";
      }
      for (var i = 0; i < 50; i++) {
         fnode_href[i].style.color = "black";
         fnode_item[i].style.color = "black";
         fnode_item[i].style.backgroundColor = "#DAD2CA";
      }
   }
}
function suppressBubble() {
   if (document.all) {
      window.event.cancelBubble = true;
      returnValue = false;
   } else {
      mozEvent.stopPropagation();
      mozEvent.preventDefault();
   }
   return false;
}
function gF(formName) {
   if (document.all) {
      return document.all(formName);
   } else {
      return document.getElementById(formName);
   }
}
var mozEvent;
function mozHandler(e) {
   mozEvent = e;
}
function setLoad() {
   if (!document.all) {
      gF("MyBody").addEventListener("mousedown", mozHandler, true);
   }
}
var ViewWin = null;
function popFocus() {
   if (ViewWin == null) return;
   if (ViewWin.closed) return;
   ViewWin.focus();
}
function getBrowserWidth() {
   if (document.all) {
      return document.body.offsetWidth;
   } else {
      return screen.availWidth;
   }
}
function getBrowserHeight() {
   if (document.all) {
      return document.body.offsetHeight * 1.04;
   } else {
      return screen.availHeight * 0.90;
   }
}
function popWin(lnk) {
   hideMenu();
   ViewWin=open(lnk, "", "fullscreen=no,scrollbars=yes,menubar=yes,toolbar=no,status=yes,resizable=yes,left=" + (getBrowserWidth() * 0.00) + ",top=" + (getBrowserHeight() * 0.00) + ",width=' + (getBrowserWidth() * 0.99) + ',height=" + (getBrowserHeight() * 1.0));
   ViewWin.focus();
}
function popTear(lnk) {
   hideMenu();
   var w = document.all? document.body.offsetWidth: screen.availWidth;
   var h = document.all? document.body.offsetHeight: screen.availHeight;
   ViewWin=open(lnk, "", "fullscreen=no,scrollbars=yes,menubar=yes,toolbar=no,status=yes,resizable=yes,left=" + (getBrowserWidth() * 0.00) + ",top=" + (getBrowserHeight() * 0.00) + ",width=' + (getBrowserWidth() * 0.99) + ',height=" + (getBrowserHeight() * 1.0));
   ViewWin.focus();
}
function popBusy(logo) {
   doc = window.open("about:blank", "Busy", "toolbar=no,width=500,height=400,left=100,top=100,status=no,scrollbars=yes,resizable=yes");
   doc.document.write("<html>");
   doc.document.write("<head>");
   doc.document.write("<title>Upload Excel Worksheet</title>")
   doc.document.write("</head>");
   doc.document.write("<body>");
   doc.document.write("<p style='text-align:center'><img src='images/"+logo+"' alt='' /></p><br />");
   doc.document.write("<h1 align='center'>Processing Request</h1><br />")
   doc.document.write("<p style='text-align:center'><img src='images/busy.gif' alt='' /></p><br />");
   doc.document.write('</body>');
   doc.document.write('</html>');
}
function unpopBusy() {
   try {
      doc = window.open('about:blank', 'Busy');
      doc.close();
   } catch(arg) {
   }
}
function iV(nV, cV) {
   if (nV != "") {
      return nV;
   } else {
      if (cV == "hidden") {
         return "visible"
      } else {
         return "hidden"
      }
   }
}
function sV(node) {
   node.style.visibility = "visible";
}
function hV(node) {
   node.style.visibility = "hidden";
}
function zV(nV, cV) {
   if (nV != "") {
      return nV;
   } else {
      if (cV == "none") {
         return ""
      } else {
         return "none"
      }
   }
}
function popupHTML() {
   document.write("<div id='menuitems' class='popup-menu' style='visibility:hidden' onclick='suppressBubble();' onmousedown='suppressBubble();'>");
   document.write("<table class='popup-menu' style='width:150px;' border='0' cellspacing='0' cellpadding='0' summary='Popup Menu'>");
   document.write("<tr id='item0'  class='popup-menu' onmouseout='document.getElementById(\"href0\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href0'  href='_self'></a></td><td id='arrow0'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item1'  class='popup-menu' onmouseout='document.getElementById(\"href1\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href1'  href='_self'></a></td><td id='arrow1'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item2'  class='popup-menu' onmouseout='document.getElementById(\"href2\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href2'  href='_self'></a></td><td id='arrow2'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item3'  class='popup-menu' onmouseout='document.getElementById(\"href3\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href3'  href='_self'></a></td><td id='arrow3'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item4'  class='popup-menu' onmouseout='document.getElementById(\"href4\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href4'  href='_self'></a></td><td id='arrow4'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item5'  class='popup-menu' onmouseout='document.getElementById(\"href5\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href5'  href='_self'></a></td><td id='arrow5'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item6'  class='popup-menu' onmouseout='document.getElementById(\"href6\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href6'  href='_self'></a></td><td id='arrow6'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item7'  class='popup-menu' onmouseout='document.getElementById(\"href7\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href7'  href='_self'></a></td><td id='arrow7'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item8'  class='popup-menu' onmouseout='document.getElementById(\"href8\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href8'  href='_self'></a></td><td id='arrow8'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item9'  class='popup-menu' onmouseout='document.getElementById(\"href9\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href9'  href='_self'></a></td><td id='arrow9'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item10' class='popup-menu' onmouseout='document.getElementById(\"href10\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href10' href='_self'></a></td><td id='arrow10' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item11' class='popup-menu' onmouseout='document.getElementById(\"href11\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href11' href='_self'></a></td><td id='arrow11' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item12' class='popup-menu' onmouseout='document.getElementById(\"href12\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href12' href='_self'></a></td><td id='arrow12' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item13' class='popup-menu' onmouseout='document.getElementById(\"href13\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href13' href='_self'></a></td><td id='arrow13' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item14' class='popup-menu' onmouseout='document.getElementById(\"href14\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href14' href='_self'></a></td><td id='arrow14' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item15' class='popup-menu' onmouseout='document.getElementById(\"href15\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href15' href='_self'></a></td><td id='arrow15' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item16' class='popup-menu' onmouseout='document.getElementById(\"href16\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href16' href='_self'></a></td><td id='arrow16' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item17' class='popup-menu' onmouseout='document.getElementById(\"href17\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href17' href='_self'></a></td><td id='arrow17' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item18' class='popup-menu' onmouseout='document.getElementById(\"href18\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href18' href='_self'></a></td><td id='arrow18' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item19' class='popup-menu' onmouseout='document.getElementById(\"href19\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href19' href='_self'></a></td><td id='arrow19' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item20' class='popup-menu' onmouseout='document.getElementById(\"href20\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href20' href='_self'></a></td><td id='arrow20' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item21' class='popup-menu' onmouseout='document.getElementById(\"href21\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href21' href='_self'></a></td><td id='arrow21' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item22' class='popup-menu' onmouseout='document.getElementById(\"href22\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href22' href='_self'></a></td><td id='arrow22' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item23' class='popup-menu' onmouseout='document.getElementById(\"href23\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href23' href='_self'></a></td><td id='arrow23' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item24' class='popup-menu' onmouseout='document.getElementById(\"href24\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href24' href='_self'></a></td><td id='arrow24' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item25' class='popup-menu' onmouseout='document.getElementById(\"href25\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href25' href='_self'></a></td><td id='arrow25' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item26' class='popup-menu' onmouseout='document.getElementById(\"href26\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href26' href='_self'></a></td><td id='arrow26' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item27' class='popup-menu' onmouseout='document.getElementById(\"href27\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href27' href='_self'></a></td><td id='arrow27' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item28' class='popup-menu' onmouseout='document.getElementById(\"href28\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href28' href='_self'></a></td><td id='arrow28' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item29' class='popup-menu' onmouseout='document.getElementById(\"href29\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href29' href='_self'></a></td><td id='arrow29' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item30' class='popup-menu' onmouseout='document.getElementById(\"href30\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href30' href='_self'></a></td><td id='arrow30' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item31' class='popup-menu' onmouseout='document.getElementById(\"href31\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href31' href='_self'></a></td><td id='arrow31' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item32' class='popup-menu' onmouseout='document.getElementById(\"href32\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href32' href='_self'></a></td><td id='arrow32' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item33' class='popup-menu' onmouseout='document.getElementById(\"href33\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href33' href='_self'></a></td><td id='arrow33' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item34' class='popup-menu' onmouseout='document.getElementById(\"href34\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href34' href='_self'></a></td><td id='arrow34' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item35' class='popup-menu' onmouseout='document.getElementById(\"href35\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href35' href='_self'></a></td><td id='arrow35' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item36' class='popup-menu' onmouseout='document.getElementById(\"href36\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href36' href='_self'></a></td><td id='arrow36' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item37' class='popup-menu' onmouseout='document.getElementById(\"href37\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href37' href='_self'></a></td><td id='arrow37' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item38' class='popup-menu' onmouseout='document.getElementById(\"href38\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href38' href='_self'></a></td><td id='arrow38' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item39' class='popup-menu' onmouseout='document.getElementById(\"href39\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href39' href='_self'></a></td><td id='arrow39' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item40' class='popup-menu' onmouseout='document.getElementById(\"href40\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href40' href='_self'></a></td><td id='arrow40' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item41' class='popup-menu' onmouseout='document.getElementById(\"href41\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href41' href='_self'></a></td><td id='arrow41' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item42' class='popup-menu' onmouseout='document.getElementById(\"href42\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href42' href='_self'></a></td><td id='arrow42' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item43' class='popup-menu' onmouseout='document.getElementById(\"href43\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href43' href='_self'></a></td><td id='arrow43' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item44' class='popup-menu' onmouseout='document.getElementById(\"href44\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href44' href='_self'></a></td><td id='arrow44' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item45' class='popup-menu' onmouseout='document.getElementById(\"href45\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href45' href='_self'></a></td><td id='arrow45' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item46' class='popup-menu' onmouseout='document.getElementById(\"href46\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href46' href='_self'></a></td><td id='arrow46' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item47' class='popup-menu' onmouseout='document.getElementById(\"href47\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href47' href='_self'></a></td><td id='arrow47' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item48' class='popup-menu' onmouseout='document.getElementById(\"href48\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href48' href='_self'></a></td><td id='arrow48' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='item49' class='popup-menu' onmouseout='document.getElementById(\"href49\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='href49' href='_self'></a></td><td id='arrow49' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("</table>");
   document.write("</div>");
   document.write("<div id='submenuitems' class='popup-menu' onclick='suppressBubble();' onmousedown='suppressBubble();'>");
   document.write("<table class='popup-menu' style='width:150px;' border='0' cellspacing='0' cellpadding='0' summary='Popup SubMenu'>");
   document.write("<tr id='subitem0'  class='popup-menu' onmouseout='document.getElementById(\"subhref0\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref0'  href='_self'></a></td><td id='subarrow0'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem1'  class='popup-menu' onmouseout='document.getElementById(\"subhref1\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref1'  href='_self'></a></td><td id='subarrow1'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem2'  class='popup-menu' onmouseout='document.getElementById(\"subhref2\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref2'  href='_self'></a></td><td id='subarrow2'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem3'  class='popup-menu' onmouseout='document.getElementById(\"subhref3\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref3'  href='_self'></a></td><td id='subarrow3'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem4'  class='popup-menu' onmouseout='document.getElementById(\"subhref4\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref4'  href='_self'></a></td><td id='subarrow4'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem5'  class='popup-menu' onmouseout='document.getElementById(\"subhref5\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref5'  href='_self'></a></td><td id='subarrow5'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem6'  class='popup-menu' onmouseout='document.getElementById(\"subhref6\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref6'  href='_self'></a></td><td id='subarrow6'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem7'  class='popup-menu' onmouseout='document.getElementById(\"subhref7\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref7'  href='_self'></a></td><td id='subarrow7'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem8'  class='popup-menu' onmouseout='document.getElementById(\"subhref8\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref8'  href='_self'></a></td><td id='subarrow8'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem9'  class='popup-menu' onmouseout='document.getElementById(\"subhref9\" ).style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref9'  href='_self'></a></td><td id='subarrow9'  style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem10' class='popup-menu' onmouseout='document.getElementById(\"subhref10\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref10' href='_self'></a></td><td id='subarrow10' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem11' class='popup-menu' onmouseout='document.getElementById(\"subhref11\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref11' href='_self'></a></td><td id='subarrow11' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem12' class='popup-menu' onmouseout='document.getElementById(\"subhref12\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref12' href='_self'></a></td><td id='subarrow12' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem13' class='popup-menu' onmouseout='document.getElementById(\"subhref13\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref13' href='_self'></a></td><td id='subarrow13' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem14' class='popup-menu' onmouseout='document.getElementById(\"subhref14\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref14' href='_self'></a></td><td id='subarrow14' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem15' class='popup-menu' onmouseout='document.getElementById(\"subhref15\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref15' href='_self'></a></td><td id='subarrow15' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem16' class='popup-menu' onmouseout='document.getElementById(\"subhref16\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref16' href='_self'></a></td><td id='subarrow16' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem17' class='popup-menu' onmouseout='document.getElementById(\"subhref17\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref17' href='_self'></a></td><td id='subarrow17' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem18' class='popup-menu' onmouseout='document.getElementById(\"subhref18\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref18' href='_self'></a></td><td id='subarrow18' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem19' class='popup-menu' onmouseout='document.getElementById(\"subhref19\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref19' href='_self'></a></td><td id='subarrow19' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem20' class='popup-menu' onmouseout='document.getElementById(\"subhref20\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref20' href='_self'></a></td><td id='subarrow20' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem21' class='popup-menu' onmouseout='document.getElementById(\"subhref21\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref21' href='_self'></a></td><td id='subarrow21' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem22' class='popup-menu' onmouseout='document.getElementById(\"subhref22\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref22' href='_self'></a></td><td id='subarrow22' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem23' class='popup-menu' onmouseout='document.getElementById(\"subhref23\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref23' href='_self'></a></td><td id='subarrow23' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem24' class='popup-menu' onmouseout='document.getElementById(\"subhref24\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref24' href='_self'></a></td><td id='subarrow24' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem25' class='popup-menu' onmouseout='document.getElementById(\"subhref25\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref25' href='_self'></a></td><td id='subarrow25' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem26' class='popup-menu' onmouseout='document.getElementById(\"subhref26\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref26' href='_self'></a></td><td id='subarrow26' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem27' class='popup-menu' onmouseout='document.getElementById(\"subhref27\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref27' href='_self'></a></td><td id='subarrow27' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem28' class='popup-menu' onmouseout='document.getElementById(\"subhref28\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref28' href='_self'></a></td><td id='subarrow28' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem29' class='popup-menu' onmouseout='document.getElementById(\"subhref29\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref29' href='_self'></a></td><td id='subarrow29' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem30' class='popup-menu' onmouseout='document.getElementById(\"subhref30\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref30' href='_self'></a></td><td id='subarrow30' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem31' class='popup-menu' onmouseout='document.getElementById(\"subhref31\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref31' href='_self'></a></td><td id='subarrow31' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem32' class='popup-menu' onmouseout='document.getElementById(\"subhref32\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref32' href='_self'></a></td><td id='subarrow32' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem33' class='popup-menu' onmouseout='document.getElementById(\"subhref33\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref33' href='_self'></a></td><td id='subarrow33' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem34' class='popup-menu' onmouseout='document.getElementById(\"subhref34\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref34' href='_self'></a></td><td id='subarrow34' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem35' class='popup-menu' onmouseout='document.getElementById(\"subhref35\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref35' href='_self'></a></td><td id='subarrow35' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem36' class='popup-menu' onmouseout='document.getElementById(\"subhref36\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref36' href='_self'></a></td><td id='subarrow36' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem37' class='popup-menu' onmouseout='document.getElementById(\"subhref37\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref37' href='_self'></a></td><td id='subarrow37' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem38' class='popup-menu' onmouseout='document.getElementById(\"subhref38\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref38' href='_self'></a></td><td id='subarrow38' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem39' class='popup-menu' onmouseout='document.getElementById(\"subhref39\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref39' href='_self'></a></td><td id='subarrow39' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem40' class='popup-menu' onmouseout='document.getElementById(\"subhref40\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref40' href='_self'></a></td><td id='subarrow40' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem41' class='popup-menu' onmouseout='document.getElementById(\"subhref41\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref41' href='_self'></a></td><td id='subarrow41' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem42' class='popup-menu' onmouseout='document.getElementById(\"subhref42\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref42' href='_self'></a></td><td id='subarrow42' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem43' class='popup-menu' onmouseout='document.getElementById(\"subhref43\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref43' href='_self'></a></td><td id='subarrow43' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem44' class='popup-menu' onmouseout='document.getElementById(\"subhref44\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref44' href='_self'></a></td><td id='subarrow44' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem45' class='popup-menu' onmouseout='document.getElementById(\"subhref45\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref45' href='_self'></a></td><td id='subarrow45' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem46' class='popup-menu' onmouseout='document.getElementById(\"subhref46\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref46' href='_self'></a></td><td id='subarrow46' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem47' class='popup-menu' onmouseout='document.getElementById(\"subhref47\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref47' href='_self'></a></td><td id='subarrow47' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem48' class='popup-menu' onmouseout='document.getElementById(\"subhref48\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref48' href='_self'></a></td><td id='subarrow48' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("<tr id='subitem49' class='popup-menu' onmouseout='document.getElementById(\"subhref49\").style.color = \"black\"; this.style.color=\"black\";this.style.backgroundColor=\"#DAD2CA\";'><td nowrap><a class='popup-menu' style='width:100%;' id='subhref49' href='_self'></a></td><td id='subarrow49' style='text-align:right;' nowrap>&nbsp;</td></tr>");
   document.write("</table>");
   document.write("</div>");
   initFNodes();
}
function bannerHTML(PageName) {
   document.write("<tr valign='bottom'>");
      document.write("<td align='right' valign='bottom'><img src='images/spc-border.gif' width='1' height='1' alt='' border='0' /></td>");
      document.write("<td valign='bottom'><img src='images/spc-border.gif' width='100%' height='2' alt='' border='0' /></td>");
      document.write("<td valign='bottom' align='center'>");
         document.write("<table cellpadding='0' cellspacing='0' border='0'>");
            document.write("<tr>");
               document.write("<td valign='bottom' align='right'><img src='images/spc-border.gif' width='40' height='2' alt='' border='0' /></td>");
               document.write("<td><a href='goalportal.asp?pc="   + Math.random() + "' onmouseover='document.portal.src=\"images/nmenu-portal"        + (PageName == "Portal"    ?"-red":"-blue") + ".gif\"' onmouseout='document.portal.src=\"images/nmenu-portal"       + (PageName == "Portal"    ?"-red":"") + ".gif\"' target='_parent'><img src='images/nmenu-portal"    + (PageName == "Portal"    ?"-red":"") + ".gif' width='80' height='23' alt='Portal'      border='0' name='portal'      /></a></td>");
               document.write("<td><a href='goalexplorer.asp?pc=" + Math.random() + "' onmouseover='document.outline.src=\"images/nmenu-outline"      + (PageName == "Outline"   ?"-red":"-blue") + ".gif\"' onmouseout='document.outline.src=\"images/nmenu-outline"     + (PageName == "Outline"   ?"-red":"") + ".gif\"' target='_parent'><img src='images/nmenu-outline"   + (PageName == "Outline"   ?"-red":"") + ".gif' width='80' height='23' alt='Outline'     border='0' name='outline'     /></a></td>");
               document.write("<td><a href='goalgraph.asp?pc="    + Math.random() + "' onmouseover='document.graphical.src=\"images/nmenu-graphical"  + (PageName == "Graphical" ?"-red":"-blue") + ".gif\"' onmouseout='document.graphical.src=\"images/nmenu-graphical" + (PageName == "Graphical" ?"-red":"") + ".gif\"' target='_parent'><img src='images/nmenu-graphical" + (PageName == "Graphical" ?"-red":"") + ".gif' width='80' height='23' alt='Graphical'   border='0' name='graphical'   /></a></td>");
               document.write("<td><a href='goalcalendar.asp?pc=" + Math.random() + "' onmouseover='document.calendar.src=\"images/nmenu-calendar"    + (PageName == "Calendar"  ?"-red":"-blue") + ".gif\"' onmouseout='document.calendar.src=\"images/nmenu-calendar"   + (PageName == "Calendar"  ?"-red":"") + ".gif\"' target='_parent'><img src='images/nmenu-calendar"  + (PageName == "Calendar"  ?"-red":"") + ".gif' width='80' height='23' alt='Calendar'    border='0' name='calendar'    /></a></td>");
               document.write("<td><a href='goalreport.asp?pc="   + Math.random() + "' onmouseover='document.reports.src=\"images/nmenu-reports"      + (PageName == "Reports"   ?"-red":"-blue") + ".gif\"' onmouseout='document.reports.src=\"images/nmenu-reports"     + (PageName == "Reports"   ?"-red":"") + ".gif\"' target='_parent'><img src='images/nmenu-reports"   + (PageName == "Reports"   ?"-red":"") + ".gif' width='80' height='23' alt='Reports'     border='0' name='reports'     /></a></td>");
               document.write("<td><a href='admin.asp?pc="        + Math.random() + "' onmouseover='document.admin.src=\"images/nmenu-admin"          + (PageName == "Admin"     ?"-red":"-blue") + ".gif\"' onmouseout='document.admin.src=\"images/nmenu-admin"         + (PageName == "Admin"     ?"-red":"") + ".gif\"' target='_parent'><img src='images/nmenu-admin"     + (PageName == "Admin"     ?"-red":"") + ".gif' width='80' height='23' alt='Admin'       border='0' name='admin'       /></a></td>");
               document.write("<td><a href='help.asp?pc="         + Math.random() + "' onmouseover='document.help.src=\"images/nmenu-help"            + (PageName == "Help"      ?"-red":"-blue") + ".gif\"' onmouseout='document.help.src=\"images/nmenu-help"           + (PageName == "Help"      ?"-red":"") + ".gif\"' target='_parent'><img src='images/nmenu-help"      + (PageName == "Help"      ?"-red":"") + ".gif' width='80' height='23' alt='Help'        border='0' name='help'        /></a></td>");
               document.write("<td><a href='abandon.asp?pc="      + Math.random() + "' onmouseover='document.logoff.src=\"images/nmenu-logoff"        + (PageName == "Logoff"    ?"-red":"-blue") + ".gif\"' onmouseout='document.logoff.src=\"images/nmenu-logoff"       + (PageName == "Logoff"    ?"-red":"") + ".gif\"' target='_parent'><img src='images/nmenu-logoff"    + (PageName == "Logoff"    ?"-red":"") + ".gif' width='80' height='23' alt='Logoff'      border='0' name='logoff'      /></a></td>");
               document.write("<td valign='bottom' align='right'><img src='images/spc-border.gif' width='40' height='2' alt='' border='0' /></td>");
            document.write("</tr>");
         document.write("</table>");
      document.write("</td>");
      document.write("<td valign='bottom'><img src='images/spc-border.gif' width='100%' height='2' alt='' border='0' /></td>");
      document.write("<td align='left' valign='bottom'><img src='images/spc-border.gif' width='1' height='1' alt='' border='0' /></td>");
   document.write("</tr>");
   document.write("<tr>");
      document.write("<td align='right' valign='top'><img src='images/spc-top-left.gif' width='5' height='5' alt='' border='0' /></td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:2px'></td>");
      document.write("<td valign='bottom' style='background-color:#96B8D9;height:1px'></td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:2px'></td>");
      document.write("<td align='left'><img src='images/spc-top-right.gif' width='5' height='5' alt='' border='0' /></td>");
   document.write("</tr>");
   document.write("<tr>");
      document.write("<td style='background-color:#96B8D9' align='left' valign='top'><img src='images/spc-border.gif' width='2' height='10' alt='' border='0' /></td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:10px'></td>");
      document.write("<td valign='bottom' style='background-color:#96B8D9;height:1px'></td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:10px'></td>");
      document.write("<td style='background-color:#96B8D9' align='right'><img src='images/spc-border.gif' width='2' height='10' alt='' border='0' /></td>");
   document.write("</tr>");
}
function bannerTear(PageName) {
   document.write("<tr valign='bottom'>");
      document.write("<td align='right' valign='bottom'><img src='images/spc-border.gif' width='1' height='1' alt='' border='0' /></td>");
      document.write("<td valign='bottom'><img src='images/spc-border.gif' width='100%' height='2' alt='' border='0' /></td>");
      document.write("<td valign='bottom' style='background-color:#96B8D9'><img src='images/spc-border.gif' width='100%' height='2' alt='' border='0' /></td>");
      document.write("<td valign='bottom'><img src='images/spc-border.gif' width='100%' height='2' alt='' border='0' /></td>");
      document.write("<td align='left' valign='bottom'><img src='images/spc-border.gif' width='1' height='1' alt='' border='0' /></td>");
   document.write("</tr>");
   document.write("<tr>");
      document.write("<td align='right' valign='top'><img src='images/spc-top-left.gif' width='5' height='5' alt='' border='0' /></td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:2px'></td>");
      document.write("<td valign='bottom' style='background-color:#96B8D9;height:1px'></td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:2px'></td>");
      document.write("<td align='left'><img src='images/spc-top-right.gif' width='5' height='5' alt='' border='0' /></td>");
   document.write("</tr>");
   document.write("<tr>");
      document.write("<td style='background-color:#96B8D9' align='left' valign='top'><img src='images/spc-border.gif' width='2' height='10' alt='' border='0' /></td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:10px'></td>");
      document.write("<td valign='bottom' style='background-color:#96B8D9;height:1px'></td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:10px'></td>");
      document.write("<td style='background-color:#96B8D9' align='right'><img src='images/spc-border.gif' width='2' height='10' alt='' border='0' /></td>");
   document.write("</tr>");
}
function bannerStatus(PageName) {
   document.write("<tr style='background-color:#96B8D9'>");
      document.write("<td align='left'><img src='images/spc-border.gif' width='2' height='76' alt='' border='0' /></td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:16px'></td>");
      document.write("<td valign='bottom' align='center'>");
         document.write("<div style='border:lightgray gray;border-style:outset;border-width:2px;padding:5px 5px;'>");
            document.write("<img src='images/status.jpg' width='705' height='62' alt='' border='0' title='' ismap usemap='#statusmap' />");
            document.write("<map name='statusmap'>")
               document.write("<area name='status0' coords='0,0,70,62'    onmouseover='this.title=\"There has not been any activity related to this item.  Does not apply to Client or Team nodes.\"'                                   />")
               document.write("<area name='status1' coords='70,0,140,62'  onmouseover='this.title=\"This item has not been started and is past the estimated start date for this item.\"'                                               />")
               document.write("<area name='status2' coords='140,0,210,62' onmouseover='this.title=\"This item has been started.\"'                                                                                                      />")
               document.write("<area name='status3' coords='210,0,280,62' onmouseover='this.title=\"This item is estimated to be completed this week.\"'                                                                                />")
               document.write("<area name='status4' coords='280,0,350,62' onmouseover='this.title=\"This item has not had its on track status updated.\"'                                                                       />")
               document.write("<area name='status5' coords='350,0,420,62' onmouseover='this.title=\"This item is not currently on schedule to be completed based on estimated completion date.\"'                                       />")
               document.write("<area name='status6' coords='420,0,490,62' onmouseover='this.title=\"This item has not been marked completed and is currently past the estimated completion date.\"'                                     />")
               document.write("<area name='status7' coords='490,0,560,62' onmouseover='this.title=\"This item is considered to be critical to the success of the completion of the goal and is currently considered to be off track.\"' />")
               document.write("<area name='status8' coords='560,0,630,62' onmouseover='this.title=\"This item has been completed.\"'                                                                                                    />")
               document.write("<area name='status9' coords='630,0,700,62' onmouseover='this.title=\"This item has been cancelled.\"'                                                                                                    />")
            document.write("</map>")
         document.write("</div>");
      document.write("</td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:16px'></td>");
      document.write("<td align='right'><img src='images/spc-border.gif' width='2' height='76' alt='' border='0' /></td>");
   document.write("</tr>");
}
function bannerBottom(PageName) {
   document.write("<tr>");
      document.write("<td style='background-color:#96B8D9' align='left' valign='top'><img src='images/spc-border.gif' width='2' height='5' alt='' border='0' /></td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:5px'></td>");
      document.write("<td valign='bottom' style='background-color:#96B8D9;height:1px'></td>");
      document.write("<td style='background-color:#96B8D9;width:5px;height:5px'></td>");
      document.write("<td style='background-color:#96B8D9' align='right'><img src='images/spc-border.gif' width='2' height='5' alt='' border='0' /></td>");
   document.write("</tr>");
   document.write("<tr>");
      document.write("<td align='right' valign='top'><img src='images/spc-bot-left.gif' width='5' height='5' alt='' border='0' /></td>");
      document.write("<td style='background-color:#96B8D9' valign='bottom'><img src='images/spc-border.gif' width='100%' height='2' alt='' border='0' /></td>");
      document.write("<td style='background-color:#96B8D9' valign='bottom'><img src='images/spc-border.gif' width='100%' height='2' alt='' border='0' /></td>");
      document.write("<td style='background-color:#96B8D9' valign='bottom'><img src='images/spc-border.gif' width='100%' height='2' alt='' border='0' /></td>");
      document.write("<td align='left'><img src='images/spc-bot-right.gif' width='5' height='5' alt='' border='0' /></td>");
   document.write("</tr>");
}
function archiveNode(NodeID, DomainCD, NodeDesc, href) {
   var b = confirm("Are you sure you want to Archive the selected \r" + genericJSStr(DomainCD) + ": " + NodeDesc);
   if (b) {
      document.location = href;
   }
   hideMenu();
}
function unarchiveNode(NodeID, DomainCD, NodeDesc, href) {
   var b = confirm("Are you sure you want to Unarchive the selected \r" + genericJSStr(DomainCD) + ": " + NodeDesc);
   if (b) {
      document.location = href;
   }
   hideMenu();
}
function cancelNode(NodeID, DomainCD, NodeDesc, href) {
   var b = confirm("Are you sure you want to Cancel the selected \r" + genericJSStr(DomainCD) + ": " + NodeDesc);
   if (b) {
      document.location = href;
   }
   hideMenu();
}
function deleteNode(NodeID, DomainCD, NodeDesc, href) {
   var b = confirm("Are you sure you want to Delete the selected \r" + genericJSStr(DomainCD) + ": " + NodeDesc);
   if (b) {
      document.location = href;
   }
   hideMenu();
}
function restoreNode(NodeID, DomainCD, NodeDesc, href) {
   var b = confirm("Are you sure you want to Restore the selected \r" + genericJSStr(DomainCD) + ": " + NodeDesc);
   if (b) {
      document.location = href;
   }
   hideMenu();
}
function removeNode(NodeID, DomainCD, NodeDesc, href) {
   var b = confirm("Are you sure you want to Remove the selected \r" + genericJSStr(DomainCD) + ": " + NodeDesc + "\rThis action can not be undone.");
   if (b) {
      document.location = href;
   }
   hideMenu();
}
function pipe(ListName, Gadget) {
   open("pipe.asp?pc=" + Math.random() + "&ListName=" + ListName + "&Gadget=" + Gadget, "", "fullscreen=no,scrollbars=no,menubar=no,toolbar=no,resizable=yes,left=1,top=1,width=1,height=1");
   window.focus();
}
function callBackPipe(Gadget, value, desc, color) {
   var dropdown = document.getElementById(Gadget).options;
   dropdown[dropdown.length] = new Option(desc, value, false, false);
   if (color != "") dropdown[dropdown.length-1].style.color = color;
}
function imagePatchIE() {
   var imageLoadOk = true;
   try {
      for (var i = 0; i < document.images.length; i++) {
         if (!document.images[i].mimeType) {
            document.images[i].src = document.images[i].src;
            imageLoadOk = false;
         }
      }
   } catch(arg) {
      imageLoadOk = false;
   }
   if (!imageLoadOk) setTimeout('imagePatchIE();', 5000);
}
function suppressAlert(message, url, line) {
   window.status = "JavaScript Error (" + line + "): " + message;
   return true;
}
function KeyHandler(keyCode, KeyBuffer) {
   switch (keyCode) {
      case 0x00:
      case 0x03:              // break
      case 0x09:              // tab
      case 0x0C:              // num 5?
      case 0x0D:              // enter
      case 0x11:              // CTRL
      case 0x12:              // alt
      case 0x13:              // pause
      case 0x14:              // caps lock
      case 0x1B:              // escape
      case 0x21:              // page up
      case 0x22:              // page down
      case 0x23:              // end
      case 0x24:              // home
      case 0x26:              // up arrow
      case 0x27:              // right arrow
      case 0x28:              // down arrow
      case 0x2D:              // insert
      case 0x2E:              // delete
      case 0x5B:              // win - left
      case 0x5C:              // win - right
      case 0x5D:              // popup menu
      case 0x70:              // F1
      case 0x71:              // F2
      case 0x72:              // F3
      case 0x73:              // F4
      case 0x74:              // F5
      case 0x75:              // F6
      case 0x76:              // F7
      case 0x77:              // F8
      case 0x78:              // F9
      case 0x79:              // F10
      case 0x7A:              // F11
      case 0x7B:              // F12
      case 0x90:              // num lock
      case 0x91:              // scroll lock?
         KeyBuffer = "";
         break;
      case 0x10:              // shift
         break;
      case 0x08:              // backspace
      case 0x25:              // left arrow
         KeyBuffer = KeyBuffer.substring(0, KeyBuffer.length-1);
         break;
      default:
         KeyBuffer += String.fromCharCode(keyCode).toLowerCase();
         break;
   }
   return KeyBuffer;
}
function pause(numberMillis) {
   var dialogScript = "window.setTimeout(function () { window.close(); }, " + numberMillis + ");";
   var result = window.showModalDialog("javascript:document.writeln('<" + "script>" + dialogScript + "<" + "/script>')");
}
//window.onerror = suppressAlert;
