function axPopUp(URL, w, h) {
        var day = new Date();
        var id = day.getTime();
        eval("var page"+id+" = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+w+",height="+h+",left = 350,top = 150,dependent=yes,alwaysRaised=yes');");
}




var isPopupOpen = false;

function showIndicator(pathToFile, imgW, imgH)
{
	if(isPopupOpen == true)
	{
		document.getElementById('img_popup').style.display = 'none';
		isPopupOpen = false;
		return;
	}
	
    var availHeight;
    var availWidth;
 
    if(typeof(window.innerWidth) == 'number')
    {
        availHeight = window.innerHeight;
        availWidth = window.innerWidth;
    }
    else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
    {
        availHeight = document.documentElement.clientHeight;
        availWidth = document.documentElement.clientWidth;
    }
    else if(document.body && (document.body.clientWidth || document.body.clientHeight))
    {
        availHeight = document.body.clientHeight;
        availWidth = document.body.clientWidth;
    }
    
    var indicatorWidth = imgW;
    var indicatorHeight = imgH;
    var left = (availWidth / 2) - (indicatorWidth/2);
    var top = (availHeight / 2) - (indicatorHeight/2);
    
    var indicator = document.getElementById('img_popup');
    
    indicator.style.border="1px solid gray";
    indicator.style.background="white";
    indicator.style.position="absolute";
    indicator.style.zIndex="999";
    indicator.style.top=top+"px";
    indicator.style.left=left+"px";
    indicator.style.display="block";
    indicator.style.width = imgW + 'px';
    indicator.style.height = imgH + 'px';
    
    indicator.innerHTML = "<a href='#' onclick='showIndicator()'><img src='"+pathToFile+"' alt='' /></a>";
    
    isPopupOpen = true; 
    
}
 