var POPDOWNMENUCOUNT=0;
var POPDOWNMENULIST= new Array();
function popDownMenu(linkObj,menuObj){
  this.id=++POPDOWNMENUCOUNT
  this.index=POPDOWNMENULIST.length;
  POPDOWNMENULIST[this.index]=this;
  this.menuObject=menuObj;
  this.setMenuId(linkObj);
  this.setMenuId(menuObj);
  var instance=this;
  linkObj.onmouseover=function(evt){instance.mouseOver(evt);}; 
  linkObj.onmouseout=function(evt){instance.mouseOut(evt);}; 
  menuObj.style["display"]="none";
}

popDownMenu.prototype.mouseOver=function(evt){
  for(i=0; i<POPDOWNMENULIST.length; i++){
    if(i!=this.index) POPDOWNMENULIST[i].mouseOut();
  }
  this.menuObject.style["display"]="";
}

popDownMenu.prototype.mouseOut=function(evt){
  this.menuObject.style["display"]="none";
}

popDownMenu.prototype.setMenuId=function(obj){
  obj.setAttribute('popdownid',this.id);
  for(var i=0;i<obj.childNodes.length;i++){
    if(obj.childNodes[i].nodeType==1) this.setMenuId(obj.childNodes[i]);
  }
}

 
