//Function to open new windows
function openWin(URL, Width, Height)
{
	aWindow=window.open(URL,"PopUp","width="+Width+",height="+Height+",resizable=yes,scrollbars=yes,left=100,top=60");
    aWindow.resizeTo(Width, Height);
    aWindow.focus();
    if(aWindow.opener == null)
    {
        aWindow.opener = window;
        aWindow.opener.name = "opener";
    }
}

//Function to pop up windows for images.
function ImgPop(zeTitle, zeDescription, zeCopyright, zeSource, level)
{
	popUrl = "";
    popTitle = zeTitle;
	popDescription = zeDescription;
    popCopyright = zeCopyright;
    popSource = zeSource;
    if (popDescription == "description")
        popDescription = "";
    
    width=650;
    height=750;
    //If resolution is 640x480
    if(screen.width < 800)
        height=350;
    //If resolution is 800x600
    else if(screen.width < 1024)
        height=500;

	for (i=1; i<= level; i++)
	{
		popUrl = popUrl + "../";
	}
	popUrl = popUrl + "inc/popup.html";
	openWin(popUrl, width, height);
}
