// ppb.js
//
// coded by gaetan

window.defaultStatus = "Psychotherapeutinnen- und Psychotherapeutenverzeichnis beider Basel"

function nsresizebug() {
if (owidth != innerWidth || oheight != innerHeight) self.location.reload(false);
}

if (document.layers) {
 owidth   = innerWidth;
 oheight  = innerHeight;
 onresize = nsresizebug;
}

function doRollOver() {
 if (arguments.length > 1)
  window.status = (arguments[1]) ? arguments[1] : window.defaultStatus;

 img = 'p_'+this.id;

 if (arguments.length == 3)
  img = img+arguments[2];

 document.images[img].src = this.img[arguments[0]].src;
 
 return true;
}

roObj.prototype.ro = doRollOver;

function roObj(name) {
 this.id         = name;
 this.img        = new Array( new Image(), new Image() );
 this.img[0].src = 'img/text/'+name+'0.gif';
 this.img[1].src = 'img/text/'+name+'1.gif';
 
 return this;
}

function initRO(list) {
 for (i=0; i < list.length; i++) {
   document['ro_'+list[i]] = new roObj(list[i]);
 }
}

