oscrs = {};
oscr.speed = 100; 
function oscr(wnId, zedId, cntId) {
  this.id = wnId; oscrs[this.id] = this;
  this.animString = "oscrs." + this.id;
  this.load(zedId, cntId);
}
oscr.prototype.load = function(zedId, cntId) {
  if (!document.getElementById) return;
  var wndo, zed;
  if (this.zedId) {
    zed = document.getElementById(this.zedId);
    zed.style.visibility = "hidden";
  }
  zed = document.getElementById(zedId);
  wndo = document.getElementById(this.id);
  zed.style.top = this.y = 0; zed.style.left = this.x = 0;
  this.maxY = (zed.offsetHeight - wndo.offsetHeight > 0)? zed.offsetHeight - wndo.offsetHeight: 0;
  this.wd = cntId? document.getElementById(cntId).offsetWidth: zed.offsetWidth;
  this.maxX = (this.wd - wndo.offsetWidth > 0)? this.wd - wndo.offsetWidth: 0;
  this.zedId = zedId;
  zed.style.visibility = "visible";
  this.on_load(); this.ready = true;
}

oscr.prototype.on_load = function() {}  

oscr.prototype.shiftTo = function(zed, x, y) {
  zed.style.left = (this.x = x) + "px"; 
  zed.style.top = (this.y = y) + "px";
}

oscr.GeckoTableBugFix = function() {
  var i, wndo, holderId, holder, x, y;
	if ( navigator.userAgent.indexOf("Gecko") > -1 && navigator.userAgent.indexOf("Firefox") == -1 ) {
    oscr.hold = [];
    for (i=0; arguments[i]; i++) {
      if ( oscrs[ arguments[i] ] ) {
        wndo = document.getElementById( arguments[i] );
        holderId = wndo.parentNode.id;
        holder = document.getElementById(holderId);
        document.body.appendChild( holder.removeChild(wndo) );
        wndo.style.zIndex = 1000;
        x = holder.offsetLeft; y = holder.offsetTop;
        wndo.style.left = x + "px"; wndo.style.top = y + "px";
        oscr.hold[i] = [ arguments[i], holderId ];
      }
    }
   window.addEventListener("resize", oscr.rePositionGecko, true);
  }
}

oscr.rePositionGecko = function() {
  var i, wndo, holder, x, y;
  if (oscr.hold) {
    for (i=0; oscr.hold[i]; i++) {
      wndo = document.getElementById( oscr.hold[i][0] );
      holder = document.getElementById( oscr.hold[i][1] );
      x = holder.offsetLeft; y = holder.offsetTop;
      wndo.style.left = x + "px"; wndo.style.top = y + "px";
    }
  }
}