
    


<!--
// 
//	This file contains the code to implement common JavaScript functions
//	used throughout the site
//
//   

//
// Purpose: Redirect a browser to another URL location
function urlsearch(arg) {
  window.location = arg;
}

// Purpose: Check for a valid email address
function isEmail(str) {
  // are regular expressions supported?
  var supported = 0;
  if (window.RegExp) {
    var tempStr = "a";
    var tempReg = new RegExp(tempStr);
    if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
    return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
}


//
// Purpose : write current date to document
function currentDate() {

   var now = new Date();
   var month = now.getMonth();
   var date = now.getDate();
   var browserName = navigator.appName;
   var browserVer = parseInt( navigator.appVersion );
   var version = "";
   var monthname;

   if (month == 0) monthname = "January";
   if (month == 1) monthname = "February";
   if (month == 2) monthname = "March";
   if (month == 3) monthname = "April";
   if (month == 4) monthname = "May";
   if (month == 5) monthname = "June";
   if (month == 6) monthname = "July";
   if (month == 7) monthname = "August";
   if (month == 8) monthname = "September";
   if (month == 9) monthname = "October";
   if (month == 10) monthname = "November";
   if (month == 11) monthname = "December";

   if (browserName == "Netscape" && browserVer >= 4)
         version = "n4";
   else if (browserName == "Microsoft Internet Explorer" && browserVer >= 4 )
         version = "e4";
   else
         version = "other";

   if (version == "n4" || version == "e4") {
      var year = now.getFullYear();
   } else {
      var year = now.getYear();
      if (year < 100) {

      // Entered value is two digits, which we allow for 1930-2029.
         if (year >= 30) {
            year += 1900
         } else {
            year += 2000
         }
      }
   }

   document.write(monthname + "&nbsp; "+ date + "," + "&nbsp;" + year);

}

OpenWin = null;
function PopWindow(page,pgheight,pgwidth,toolbaryesno,menubaryesno,resizeableyesno,scrollbarsyesno,locationyesno) {
if (!OpenWin || OpenWin.closed) {
 if (!toolbaryesno) {
    toolbaryesno = "no";
 }
 if (!menubaryesno) {
    menubaryesno = "no";
 }
  if (!resizeableyesno) {
     resizeableyesno = "no";
  }
 if (!scrollbarsyesno) {
    scrollbarsyesno = "no";
 }
 if (!locationyesno) {
    locationyesno = "no";
 } 
OpenWin = this.open(page, "CtrlWindow",
"width=" + pgwidth + ",height=" + pgheight+ ",toolbar=" + toolbaryesno + ",menubar=" + menubaryesno + ",location=" + locationyesno + ",scrollbars=" + scrollbarsyesno + ",resizable=" + resizeableyesno);
} else {
  OpenWin.focus();
}
}


// -->
