function PopMenu2(popdiv,msgs,arg3,arg4) {
 this.lname= popdiv
 this.skn=  getLayer(popdiv)
 this.msgs= msgs
 this.on = 0;  
 var offX,offY;
 this.offX0= 15; this.offY0 = -10;
 if(arg3!= null) offX= parseInt(arg3,10)
 if(!isNaN(offX)) this.offX0= offX; 
 if(arg4!= null) offY= parseInt(arg4,10)
 if(!isNaN(offY)) this.offY0= offY; 
 //methods
 this.mouseOnAct= PopMenu2.showTip
 this.setBgColor = PopMenu2.setBgColor
 this.mouseOutAct= PopMenu2.hide
 this.addItem = PopMenu2.addItem
//actions 
  return this;
}

PopMenu2.setBgColor = function(color) {
  setBgColor(this.skn,color)
}

PopMenu2.addItem = function(lname) {
  var temp = new PopMenu2.Item(lname);
  if(temp.layer == null) {this.invalid = 1; return;}
  temp.parent = this;
}

PopMenu2.Item = function(lname) {
  this.layer = getLayer(lname)
  this.layer.peer = this;
  return this
}

PopMenu2.showTip= function(idx) {
if(this.on) return
var content
content ="<TABLE WIDTH=200 BORDER=1 CELLPADDING=6 CELLSPACING=0 "+
"bgcolor="+'#ddeeff'+
"><TR><TD align=center height=25><FONT COLOR=#000000 SIZE=2><b>"+
this.msgs[idx][0]+"</B></FONT></TD></TR><TR><TD align=left width=100%><FONT face=Verdana' SIZE=1 COLOR=#000000>"+
this.msgs[idx][1]+
"</FONT></TD></TR></TABLE>";
var content2 ="<TABLE WIDTH=230 BORDER=1 CELLPADDING=3 CELLSPACING=0 "+
"bgcolor="+'#ddeeff'+
"><TR><TD align=left width=100%><FONT face=Verdana' SIZE=1 COLOR=#000000>"+
this.msgs[idx][1]+
"</FONT></TD></TR></TABLE>";
 var dX,dY;
 writeLayer(this.skn, content2);
 if(typeof this.msgs[idx][2] != "undefined") dX= parseInt(this.msgs[idx][2])
 if(typeof this.msgs[idx][3] != "undefined") dY= parseInt(this.msgs[idx][3])
 if(isNaN(dX)) dX= 0; if(isNaN(dY)) dY= 0;
 this.offX= this.offX0+dX; this.offY= this.offY0+dY; 
 moveLayerTo(this.skn,mouseX+this.offX, mouseY+this.offY);

 showLayer(this.skn) 
 this.on = 1;
 if(isMinIE4) window.event.cancelBubble;
 checkPos()
 //if(NN4) nn4reload();
}

var cnt = 0

checkPos= function() {//use JSidx
 var dx, dy;
 if(!d1.on) return; //replace with 'this'
/*
  if(isMinNN4){mouseX=e.pageX;mouseY=e.pageY;}
  if(isMinIE4){
    x1 = document.body.scrollLeft;
    y1= document.body.scrollTop;
    mouseX=window.event.offsetX;
    mouseY=window.event.offsetY+y1
  }
*/
 var x,y;
 //	x = (nav) ? e.pageX : event.x+document.body.scrollLeft; 
 //	y = (nav) ? e.pageY : event.y+document.body.scrollTop;
 //var viewTop=getPageScrollY();
 //viewBottom=viewTop+getWindowHeight();
 moveLayerTo(d1.skn, mouseX+d1.offX, mouseY+ d1.offY);
 timer= setTimeout("checkPos()",60)
}

PopMenu2.hide = function() {
 if(!this.on) return
 hideLayer(this.skn)
 clearTimeout(timer)
 this.on = 0;
 this.offX= this.offX0; this.offY= this.offY0;
}

timer= null
 