<!--
// object definition
menuObjectCounter = 0;
function PopupMenu(left, top) {
   // properties
   this.id = "Menu" + (menuObjectCounter++);
   this.Items = new Array();
   this.left = left || 0;
   this.top = top || 0;
   this.fgColor = "#333333";     // Text Color
   this.bgColor = "#cccccc";     // Background Color	
   this.hiColor = "#9999cc";     // Hi-Light Color
   this.hiText = "#ffffff";      // Hi-Light Text
   this.frColor = "#666666";     // Frame Border Color
   this.font = "MS Sans Serif";  // Font Face
   this.fontSize = 10;           // Font Size
   // methods
   this.addItem = addMenuItem;
   this.show = showMenu;
   this.getHTML = getHTML
}
function MenuItem(caption, url, target, submenu) {
   this.id = "MenuItem" + (menuObjectCounter++);
   this.caption = caption || null;
   this.url = url || null;
   this.target = target || "_self";
   this.submenu = submenu || null;
}
function addMenuItem(menu) {
   var index = this.Items.length;
   this.Items[index] = menu;
}
function showMenu(show) {
   if(eval(this.id) != 'undefined') {
      if(show) eval(this.id+".style.visibility=\"visible\"");
	   else     eval(this.id+".style.visibility=\"hidden\"");
   }
}
function getHTML() {
   var html = "<div id='" + this.id + "'";
   html += " style=\"position:absolute; left:"+ this.left +"px; top:"+ this.top +"px; width:10px; height:10px; z-index:1;"
   html += " background-color: #990000; layer-background-color: #990000; border: 0px none #000000;"
   html += " visibility: hidden\" onmouseover=\"this.style.visibility='visible'\" onmouseout=\"this.style.visibility='hidden'\">";
   html += "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"0\"><tr><td bgcolor=\""+ this.frColor +"\">";
   html += "<table border=\"0\" cellspacing=\"1\" cellpadding=\"2\" width=\"0\">";
   for(i = 0; i < this.Items.length; i++) {
      html += "<tr><td noWrap bgcolor=\""+ this.bgColor +"\"";
      html += " style=\"font-family:"+ this.font +"; font-size:"+ this.fontSize +"; color:"+ this.fgColor +"; text-decoration:none\"";
      html += " onmouseover=\"menuMouseOver(this, '"+ this.hiText +"', '"+ this.hiColor +"')\"";
      html += " onmouseout=\"menuMouseOut(this, '"+ this.fgColor +"', '"+ this.bgColor +"')\"";
      html += " onclick=\"menuMouseClick(this)\">";
      html += "<a href=\""+ this.Items[i].url +"\" target=\""+ this.Items[i].target +"\"></a>";
      html += this.Items[i].caption + "</td></tr>";
   }
   html += "</table>";
   html += "</td></tr></table>";
   html += "</div>";
   return html;
}
function menuMouseOver(obj, fgcolor, bgcolor) {
   obj.style.backgroundColor = bgcolor;
   obj.style.color = fgcolor;
   obj.style.textDecoration='none';
   obj.style.cursor='hand';
   status=obj.children[0];
}
function menuMouseOut(obj, fgcolor, bgcolor) {
   obj.style.backgroundColor = bgcolor;
   obj.style.color = fgcolor;
   obj.style.textDecoration='none';
   obj.style.cursor='default';
   status='';
}
function menuMouseClick(obj) {
   open(obj.children[0].href, obj.children[0].target);
}
onerror = errorTrap;
function errorTrap(msg, url, line){
    return true;
}
//-->
