// Incomedia WebSite X5 2007. All rights reserved.

function imZIZoom(sImage,iHeight,iWidth,sDescr) {
var imZIdiv_Backg = imGetLayer("imZIBackg");
var imZIdiv_Image = imGetLayer("imZIImage");
var imZIyScroll;
var imZIwindowHeight;
if (window.innerHeight && window.scrollMaxY)
imZIyScroll = window.innerHeight + window.scrollMaxY;
else if (document.body.scrollHeight > document.body.offsetHeight)
imZIyScroll = document.body.scrollHeight;
else
imZIyScroll = document.body.offsetHeight;
if (self.innerHeight)
imZIwindowHeight = self.innerHeight;
else if (document.documentElement && document.documentElement.clientHeight)
imZIwindowHeight = document.documentElement.clientHeight;
else if (document.body)
imZIwindowHeight = document.body.clientHeight;
imZIpageHeight = imZIyScroll < imZIwindowHeight ? imZIwindowHeight : imZIyScroll;
if (self.pageYOffset)
imZIyScroll = self.pageYOffset;
else if (document.documentElement && document.documentElement.scrollTop)
imZIyScroll = document.documentElement.scrollTop;
else if (document.body)
imZIyScroll = document.body.scrollTop;
imZIdiv_Backg.style.top = '0px';
imZIdiv_Backg.style.height = (imZIpageHeight + 'px');
imZIdiv_Backg.style.zIndex = '2000';
var imZIImageTop = imZIyScroll + ((imZIwindowHeight - 35 - iHeight) / 2);
var div_Descr = "";
if (sDescr!="") div_Descr = "<div id=\"imZICaption\">" + sDescr + "</div>";
imZIdiv_Backg.innerHTML = "<div id=\"imZIImage\" style=\"margin-top:" + ((imZIImageTop < 0) ? "0px" : imZIImageTop) + "px" + "; width: " + (iWidth + 14) + "px\"><img src=\"" + sImage + "\" width=\"" + iWidth + "\" height=\"" + iHeight + "\" />" + div_Descr + "</div>";
imZIdiv_Backg.style.display = "block";
}
function imZIHide(){
imGetLayer("imZIBackg").style.display = "none";
imGetLayer("imZIImage").innerHtml = "";
}
