var theWindow = null;

function popupMedia(id, width, height) {
	// pad the width and height to account for our header, footer, margins, etc.
	width += 100;
	height += 150;

	var mediaURL = "media_popup.php?id=" + id;
	if (theWindow) {
		if (!theWindow.closed){
			theWindow.close();
		}	
	}			

	// open the window
	theWindow = open(mediaURL, "MediaPopup", "width="+width+",height="+height+",scrollbars=yes,resizeable=no,toolbar=no,menubar=no,titlebar=no,status=no,screenX=0,screenY=0");
}

function fixPNG(who) {
	var isIE = (navigator.appName == "Microsoft Internet Explorer" && navigator.userAgent.indexOf('Opera') == -1);
	if(isIE) {
		// filter for MSIE 6.x and 5.5
		var ie6xFilter = /^.*MSIE [6]\.[0-9].*$/;
		var ie55Filter = /^.*MSIE [5].*$/;
		
		if(ie6xFilter.test(navigator.userAgent) || ie55Filter.test(navigator.userAgent)) {
			who.onload = function(){}
			who.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src='+who.src+')';
			who.src = 'images/pixel.gif';
		}
	}
}