// djora 25 Jan 2009 
// add browser detection in order to calculate pop-up position
function Popup(image, container)
{
	var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
	var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
	var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;

    var elem = document.getElementById(container);
    if (elem == undefined) return;
    elem.style.visibility="visible";
    elem.visibility="visible";
    var cert = [302, 356];    
        
    var scroll = Scroll(); 
    var pos = Pos(image);
    
    var screen = Screen();  
    var imagesize = ImageSize(image.src);
             
    elem.style.width = cert[0] + 'px';    
	elem.style.height = cert[1] + 'px';
	var coord = Adjust(screen, cert, pos, imagesize, scroll);
    elem.style.left = coord[0] -250 +'px';
	if ( isIE && isWin && !isOpera ) { 
	    elem.style.left = coord[0] + 150 +'px';
	}	
	elem.style.top = coord[1] +'px';	
};
