/* Pop Up */

openWin = function(url, width, height, bars) {
  window.open(url,'_blank','resizable=yes,scrollbars='+(bars?'yes':'no')+',status=no,toolbar=no,menubar=no,width='+width+',height='+height);
}


/* Rollover */

initRolloverImgs = function(){
  var i, img, loader, lowSrc, highSrc;
  var imgs = document.images;
  var ro = /(.*)\.(.*)\?ro/;
  var rm = /(.*)\.(.*)\?rom/;
  var menuImg = document.getElementsByName('menupic')[0];
  
  for (i=0; i<imgs.length; i++){
    img = imgs[i];
    if (ro.exec(img.src)){
      img.menu    = (rm.exec(img.src) && menuImg);
      img.lowSrc  = img.src;
      img.highSrc = RegExp.$1+'-a.'+RegExp.$2;
      img.menuSrc = RegExp.$1+'_hi.'+RegExp.$2;
      loader      = new Image(); 
      loader.src  = img.highSrc;
      if (img.menu) {
        loader2     = new Image(); 
        loader2.src = img.menuSrc;
      }
      
      img.onmouseover = function(e){ 
        this.src = this.highSrc; 
        if(this.menu) {
          menuImg.oldSrc = menuImg.src;
          menuImg.src = this.menuSrc;
        }
      };
      img.onmouseout  = function(e){ 
        if (!this.high) this.src = this.lowSrc; 
        if(this.menu) {
          menuImg.src = menuImg.oldSrc;
        }
      };
      img.setHigh     = function( ){ this.high = true;  this.onmouseover(); };
      img.setLow      = function( ){ this.high = false; this.onmouseout();  };
    }
  };
}


  

