
function popWinOpen(winW,winH,sUrl,sName,iResize,iScroll,iStatus) {
	if (screen) {
		if ((screen.height - winH) < 150) {
			var winX = (screen.width - winW) / 2;
			var winY = 0;
		} else {
			var winX = (screen.width - winW) / 2;
			var winY = (screen.height - winH) / 2;
		}
		var popWindow = window.open(sUrl,sName,"resizable=" + iResize + ",menubar=0,scrollbars=" + iScroll + ",status=" + iStatus + ",width=" + winW + ",height=" + winH + ",top=" + winY + ",left=" + winX + "");
		if (popWindow) popWindow.focus();
	} else {
		window.open(sUrl,sName,"resizable=" + iResize + ",menubar=0,scrollbars=" + iScroll + ",status=" + iStatus + ",width=" + winW + ",height=" + winH);
	}
}

//<a href="/path/file.ext" onClick="popWinOpen(600,560,'/path/file.ext','myWin',0,0,0); return false">Linktext</a>

var transparentImage = "/images_gui/1x1.gif" ;

function fixTrans() {
	if (typeof document.body.style.maxHeight == 'undefined') {
		var imgs = document.getElementsByTagName("img") ;
		for (i = 0; i < imgs.length; i++) {
			if (imgs[i].src.indexOf(transparentImage) != -1) {
				return ;
			}
			if (imgs[i].src.indexOf(".png") != -1) {
				var src = imgs[i].src ;
				imgs[i].src = transparentImage ;
				imgs[i].runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')" ;
				imgs[i].style.display = "inline-block" ;
			}
		}	
	}
}

if (document.all && !window.opera) {
	attachEvent("onload", fixTrans) ;
}

