  function showImageOverlay(imageUrl, id) {
    var windowWidth;
    var windowHeight;
    var scrollTop;
    var scrollLeft;

    if(document.all) {
			windowWidth = self.document.body.clientWidth;
			windowHeight = self.document.body.clientHeight;
			scrollTop = document.body.scrollTop;
			scrollLeft = document.body.scrollLeft;
		} else {
			windowWidth = self.innerWidth;
			windowHeight = self.innerHeight;
			scrollTop = document.documentElement.scrollTop;
			scrollTop = document.documentElement.scrollLeft;
		}

		var heightBack = windowHeight + 500 + scrollTop + document.body.style.paddingTop + document.body.style.paddingBottom ;
		var widthBack = windowWidth + scrollLeft  +document.body.style.paddingLeft + document.body.style.paddingRight;

    var arrayPageSize = getPageSize();
  	var posTop = getPageScroll() + (arrayPageSize[3] / 13);

    var overlay = document.getElementById("imageOverlay");
    var container = document.getElementById("imageContainer");
    var img = document.getElementById("imageOverlayImg");
    var back = document.getElementById("imageOverlayBack");

    img.src = imageUrl;

    container.style.top = posTop + "px";
    back.style.width = widthBack + "px";
    back.style.height = heightBack + "px";
    overlay.style.display = "block";

    if (document.getElementById("mFullsizeAd")) {
      document.getElementById("mFullsizeAd").className = 'mBannerHidden';
    }
    if (document.getElementById("mSkyscraperAd")) {
      document.getElementById("mSkyscraperAd").className = 'mBannerHidden';
    }
  }

  function hideImageOverlay() {
    var container = document.getElementById("imageOverlay");

    container.style.display = "none";

    if (document.getElementById("mFullsizeAd")) {
      document.getElementById("mFullsizeAd").className = 'mFullsizeAd';
    }
    if (document.getElementById("mSkyscraperAd")) {
      document.getElementById("mSkyscraperAd").className = 'mSkyscraperAd';
    }

  }

  function showOverlay(id) {
    var windowWidth;
    var windowHeight;
    var scrollTop;
    var scrollLeft;

    if(document.all) {
			windowWidth = self.document.body.clientWidth;
			windowHeight = self.document.body.clientHeight;
			scrollTop = document.body.scrollTop;
			scrollLeft = document.body.scrollLeft;
		} else {
			windowWidth = self.innerWidth;
			windowHeight = self.innerHeight;
			scrollTop = document.documentElement.scrollTop;
			scrollTop = document.documentElement.scrollLeft;
		}

		var heightBack = windowHeight + 500 + scrollTop + document.body.style.paddingTop + document.body.style.paddingBottom ;
		var widthBack = windowWidth + scrollLeft  +document.body.style.paddingLeft + document.body.style.paddingRight;

    var arrayPageSize = getPageSize();
  	var posTop = getPageScroll() + (arrayPageSize[3] / 10);

    var overlay = document.getElementById(id +"Overlay");
    var container = document.getElementById(id +"Container");
    var back = document.getElementById(id + "OverlayBack");

    back.style.width = arrayPageSize[0] + "px";
    back.style.height = arrayPageSize[1] + "px";
    overlay.style.display = "block";

    if (document.getElementById("mFullsizeAd")) {
      document.getElementById("mFullsizeAd").className = 'mBannerHidden';
    }
    if (document.getElementById("mSkyscraperAd")) {
      document.getElementById("mSkyscraperAd").className = 'mBannerHidden';
    }
  }

  function hideOverlay(id) {
    var overlay = document.getElementById(id + "Overlay");

    overlay.style.display = "none";

    if (document.getElementById("mFullsizeAd")) {
      document.getElementById("mFullsizeAd").className = 'mFullsizeAd';
    }
    if (document.getElementById("mSkyscraperAd")) {
      document.getElementById("mSkyscraperAd").className = 'mSkyscraperAd';
    }

  }


function getPageScroll(){

	var yScroll;

	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
	}

	return yScroll;
}


function getPageSize(){

  var windowWidth,windowHeight;
  if (self.innerHeight) // all except Explorer
  {
    windowWidth = self.innerWidth;
    windowHeight = self.innerHeight;
  }
  else if (document.documentElement && document.documentElement.clientHeight)
    // Explorer 6 Strict Mode
  {
    windowWidth = document.documentElement.clientWidth;
    windowHeight = document.documentElement.clientHeight;
  }
  else if (document.body) // other Explorers
  {
    windowWidth = document.body.clientWidth;
    windowHeight = document.body.clientHeight;
  }

  var pageWidth,pageHeight;
  pageWidth = document.body.parentNode.scrollWidth;
  pageHeight = document.body.parentNode.scrollHeight;

  return new Array(pageWidth,pageHeight,windowWidth,windowHeight);
}

/*
function getPageSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return [ myWidth, myHeight ];
}

function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  return [ scrOfX, scrOfY ];
}
*/
