function sImover()
{
  if (!this.sImage) return;
  if (!this.sImage._loaded) return;
  clearInterval(this._timer);
  this._timer = setInterval("sIgrow('"+this.id+"',true)",this.sIdt);
  var position = getElemPos(this);
  var l = this.sDiv.style.left = position.left + this.offsetWidth+this.sIlft;
  if (isOpera)
    this.sDiv.style.left = l + parseInt(this.sDiv.style.paddingLeft);
  this.sDiv.style.top = position.top;
  this.sDiv.style.display="block";
}
function sImout()
{
  if (!this.sImage) return;
  if (!this.sImage._loaded) return;
  clearInterval(this._timer);
  this._timer = setInterval("sIgrow('"+this.id+"',false)",this.sIdt);
}
function sIgrow(id,grow)
{
  var stp=false,o = document.getElementById(id); if (!o) return;
  o.sImage.style.width = o.sIcw; o.sImage.style.height = o.sIch;
  if (isOpera)
      o.sDiv.style.width = o.sIcw + 2*parseInt(o.sDiv.style.paddingLeft);
  if (grow) {
    if (o.sIcw < o.sIw) o.sIcw += o.sIdw; else stp=true;
    if (o.sIch < o.sIh) o.sIch += o.sIdh; else stp=true;
  } else {
    if (o.sIcw > o.sIdw) o.sIcw -= o.sIdw; else stp=true;
    if (o.sIch > o.sIdh) o.sIch -= o.sIdh; else stp=true;
  }
  if (stp) {
    clearInterval(o._timer);
    if (grow) {o.sImage.style.width = o.sIcw = o.sIw; o.sImage.style.height = o.sIch = o.sIh;}
    else o.sDiv.style.display="none";
  }
}
function sIonclick()
{
  if (this._url)
    window.location = this._url;
}
function sIonload()
{
 if (!this._loaded)
 {
  var o = this.mi;
  o.sIw = this.width; o.sIh = this.height;

  if(o.sIh==0) o.sIh = 490;
  if(o.sIw==0) o.sIw = 648;

  o.sIdw = o.sIw / this.s; o.sIdh = o.sIh / this.s;
  this.style.width = o.sIcw = 0;
  this.style.height = o.sIch = 0;
  o.sDiv.style.display="none";
  o.sDiv.style.visibility="";
  this._loaded=true;
 }
}
function InitSI(o,img,lft,tp,t,s,url)
{
  if (!document.getElementById) return;
  if (o.sImage == null)
  {
    o.sDiv = document.body.appendChild(document.createElement("div"));
    o.sImage = o.sDiv.appendChild(document.createElement("img"));
    document.getElementById("ssImgDiv").appendChild(o.sDiv);

    o.sDiv.style.position="absolute";
    o.sDiv.style.backgroundImage="url(/shared/img/layoutimages/sshotbar-top.gif)";

    o.sDiv.style.backgroundRepeat ="no-repeat";
    o.sDiv.style.backgroundColor="#edf6fb";
    o.sDiv.style.borderStyle="solid";
    o.sDiv.style.borderColor="#dcedf5";
    o.sDiv.style.borderWidth="1px 1px 1px 1px";
    o.sDiv.style.padding="10px";
    o.sDiv.style.paddingTop="35px";

    o.sDiv.style.visibility="hidden";
    o.sDiv.style.zIndex=110;

    o.sIlft=lft; o.sDiv.style.top=tp;
    o.sImage.mi = o;
    o.sImage.s  = s;
    o.sImage.onload = sIonload;
    o.sIdt = t; o._url = url;
    o.onmouseover=sImover;
    o.onmouseout=sImout;
    o.onclick=sIonclick;
    if (url != null) {  
      if (document.all)
        o.style.cursor = "hand";
      else
        o.style.cursor = "pointer";
    }
    o.sImage.src = img;
  }
}

