function item(pic_over, pic_out, name,link)
{
  this.pic_over = new Image();
  this.pic_out = new Image();
  this.pic_over.src=pic_over;
  this.pic_out.src=pic_out;
  this.name = name;
  this.link = link;
}
function MenuPic(name,base,ext,width,height)
{
  this.name   = MenuPic.arguments[0];
  this.width  = width;
  this.height = height;

  this.items  = new Array();
  this.len;
  this.ismenu = MenuPic.arguments.length > 6;
  this.Show = _Show;
  if(this.ismenu)
  {
    var j=0;
    for(var i=5; i<MenuPic.arguments.length; i+=2)
    {
      var num = j < 9 ? "0"+eval(j+1):eval(j+1);
      this.items[j] = new item(base+num+"2."+ext,
                                 base+num+"1."+ext,
                                 MenuPic.arguments[i],
                                 MenuPic.arguments[i+1]);
      j++;
    }
    this.len=j;
  }
}
function _Show()
{
 if (this.ismenu)
 {
   document.write("<NOBR>");
   for(var i=0; i<this.len; i++)
    document.write(
      "<A href="+this.items[i].link+
      " onmouseover=\"document.images."+this.name+i+".src='"+
         this.items[i].pic_over.src+"'\""+
      " onmouseout=\"document.images."+this.name+i+".src='"+
         this.items[i].pic_out.src+"'\""+
      "><IMG name="+this.name+i+" border=0 src="+this.items[i].pic_out.src+
      " width="+this.width+" height="+this.height+
      " alt=\""+this.items[i].name+"\"></A>");
   document.write("</NOBR>");
 }
}
