function iZoom(path, defaultWidth, defaultHeight, description, medianote)
{
	//function init()
    //{
        // Resize
        var taskBarWidth  = 8;
        var taskBarHeight = 32;
        var margin = 0;

		var img = document.images[0];
		
        //var additional = document.getElementById("link").offsetHeight + document.getElementById("close").offsetHeight;
       // var additional = document.getElementById("link").offsetHeight;

        // calculate the dimensions
        var maxwidth  = (screen.availWidth  - taskBarWidth  - margin * 2)*0.8;
        var maxheight = (screen.availHeight - taskBarHeight - margin * 2)*0.8;

		if (defaultWidth > maxwidth || defaultHeight > maxheight)
		{
			var ratio = img.offsetWidth / img.offsetHeight;
			var imgwidth = defaultWidth;
			var imgheight = defaultHeight;

			var aspectXY = imgwidth / imgheight;
			var aspectYX = imgheight / imgwidth;

            if ((maxwidth / imgwidth) < (maxheight / imgheight))
        	{
        		var targety = imgheight * (maxwidth / imgwidth);
        		var targetx = maxwidth;
        	} else {
        		var targetx = imgwidth * (maxheight / imgheight);
        		var targety = maxheight;
        	}

    		defaultWidth = targetx;
    		defaultHeight = targety;			
		}

		// resize the window

		width = defaultWidth+ (margin*2);
		height = defaultHeight+ (margin*2);
        //self.resizeTo(width, height);

        // position
        var xwin = parseInt(screen.availWidth / 2)  - parseInt(width / 2);
        var ywin = parseInt(screen.availHeight / 2) - parseInt(height / 2);

        // center window
       // self.moveTo(xwin, ywin);
   // }

	window.open("imgpopup.php?imgpath="+path+"", "imgPopup", "left="+xwin+", top="+ywin+", width="+defaultWidth+", height="+defaultHeight+", dependent=yes, menubar=no, resizable=no, toolbar=no");
}