
  function EditLayer(idx, content) {
    if(document.getElementById)
      document.getElementById(idx).innerHTML = content;
    else {
      if (document.all[idx])
        document.all[idx].innerHTML = content;
    }
  }

  function EditTopLayer(idx, content) {
    if(top.document.getElementById)
      top.document.getElementById(idx).innerHTML = content;
    else {
      if (top.document.all[idx])
        top.document.all[idx].innerHTML = content;
    }
  }

  function EditHyperLink(idx, url) {
    if(document.getElementById)
      document.getElementById(idx).href = url;
    else {
      if (document.all[idx])
        document.all[idx].href = url;
    }
  }

  function EditTopHyperLink(idx, url) {
    if(top.document.getElementById)
      top.document.getElementById(idx).href = url;
    else {
      if (top.document.all[idx])
        top.document.all[idx].href = url;
    }
  }

  function showImg(MidImgPath, ImgTitle, ImgDesc, ImgWidth, ImgHeight, ImgLink) {
  	document.midImage.src = MidImgPath;
    EditLayer('imgTitle', ImgTitle);
    EditLayer('imgDesc', ImgDesc);
    EditHyperLink('imgLink', ImgLink);
    document.midImage.width  = ImgWidth;
    document.midImage.height = ImgHeight;

		self.scrollTo(0, 0);
  }

  function showImgTop(MidImgPath, ImgTitle, ImgDesc, ImgWidth, ImgHeight, ImgLink) {
  	top.document.midImage.src = MidImgPath;
    EditTopLayer('imgTitle', ImgTitle);
    EditTopLayer('imgDesc', ImgDesc);
    EditTopHyperLink('imgLink', ImgLink);
    top.document.midImage.width  = ImgWidth;
    top.document.midImage.height = ImgHeight;

		self.scrollTo(0, 0);
  }
