if(window.event + "" == "undefined") event = null;

function HM_f_PopUp(){return false};
function HM_f_PopDown(){return false};

popUp = HM_f_PopUp;
popDown = HM_f_PopDown;
    
var windowArray = new Array();

function popupPicture(mylink, windowname, width, height)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
awindow = window.open(href, windowname, 'scrollbars=no,menubar=no,toolbar=no,width=' + width + ' ,height=' + height);
windowArray[windowArray.length] = awindow;
return false;
}
    
function popupLink(mylink, windowname, width, height)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
awindow = window.open(href, windowname, 'scrollbars=yes,menubar=yes,toolbar=yes,width=' + width + ' ,height=' + height);
windowArray[windowArray.length] = awindow;

return false;
}
	

//since the parent window of the picture is already a popup, let's clean up any stray child picture windows when we close.
//only closes one right now. could be modified to close an array full.
function closeWindows()
{
	var theWindow;
	for(var i=0; i<windowArray.length; i++)
	{
		theWindow = windowArray[i];
		if(theWindow)
			theWindow.close();
	}

}	