
/* *******************************************************************************************
 *         Popup - Centered on the screen                                                    *
 ******************************************************************************************* */

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);
	}
}

/* *******************************************************************************************
 *         MouseOver-feature on buttons                                                      *
 ******************************************************************************************* */

function imgOver(id) {
	try {
		var oldSrc = document.getElementById(id).src ;
		var newSrc = oldSrc.replace(/_0\.(gif|jpe?g|png)/, "_1.$1") ;
		document.getElementById(id).src = newSrc ;
	} catch (e) {}
}
function imgOut(id) {
	try {
		var oldSrc = document.getElementById(id).src ;
		var newSrc = oldSrc.replace(/_1\.(gif|jpe?g|png)/, "_0.$1") ;
		document.getElementById(id).src = newSrc ;
	} catch (e) {}
}

/* *******************************************************************************************
 *         Flash-fix - IE6/IE7                                                                 *
 ******************************************************************************************* */

function fixFlashIE() {
	if (document.all && document.getElementsByTagName) {
		try {
			objects = document.getElementsByTagName("object") ;
			for (var i = 0; i < objects.length; i++) {
				objects[i].outerHTML = objects[i].outerHTML ;
			}
		} catch(e) {}
	}
}
if (window.attachEvent && document.all) {
	window.attachEvent("onload", function(){ fixFlashIE(); }) ;
}
