function MenuJump(theMenu) {

   if (theMenu.options[theMenu.selectedIndex].value == "null") {
      alert("Please select a valid category.");
      theMenu.focus();
      }
   else {
      location=theMenu.options[theMenu.selectedIndex].value;
      }
}

function Popup(Size, URLorMsg) {

   if (URLorMsg.indexOf("Msg:")==0) {
      var Msg = unescape(URLorMsg.substr(4));
      var URL = "";
      }
   else {
      var URL = URLorMsg;
      }

   var Day = new Date();
   var ID = Day.getTime();

   if (Size == "Small") {
      eval("Page" + ID + " = window.open(URL, '" + ID + "', 'dependent,titlebar=1,menubar=0,toolbar=0,scrollbars=1,location=0,directories=0,status=0,resizable=1,width=320,height=240,left=352,top=264,screenX=352,screenY=264');");
      }
   if (Size == "Medium") {
      eval("Page" + ID + " = window.open(URL, '" + ID + "', 'dependent,titlebar=1,menubar=0,toolbar=0,scrollbars=1,location=0,directories=0,status=0,resizable=1,width=448,height=336,left=288,top=216,screenX=288,screenY=216');");
      }
   if (Size == "Large") {
      eval("Page" + ID + " = window.open(URL, '" + ID + "', 'dependent,titlebar=1,menubar=0,toolbar=0,scrollbars=1,location=0,directories=0,status=0,resizable=1,width=576,height=432,left=224,top=168,screenX=224,screenY=168');");
      }

   if (URL == "") {
      var Doc = eval("Page"+ID).document;
      Doc.write("<html>");
      Doc.write("   <head>");
      Doc.write("      <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">");
      Doc.write("      <title>Message</title>");
      Doc.write("   </head>");
      Doc.write("   <body bgcolor=\"#FFFFF0\">");
      Doc.write("      <p align=\"left\"><font size=\"1\" face=\"Verdana,Arial,Helvetica\">");
      Doc.write(Msg);
      Doc.write("      </font></p>");
      Doc.write("      <p align=\"center\"><a href=\"javascript:self.close()\">");
      Doc.write("      <font color=\"#0000FF\" size=\"1\" face=\"Verdana,Arial,Helvetica\"><strong>");
      Doc.write("      Close Window");
      Doc.write("      </strong></font></a></p>");
      Doc.write("   </body>");
      Doc.write("</html>");
      }
}

String.prototype.trim  = function () {return this.ltrim().rtrim();}
String.prototype.ltrim = function () {return this.replace(/^\s+/g, "");}
String.prototype.rtrim = function () {return this.replace(/\s+$/g, "");}

