IconGray = new Image(6, 6);
IconWhite= new Image(6, 6);

IconWhite.src = "http://www.optivo.de/docroot/img/dot/white.gif";
IconGray.src = "http://www.optivo.de/docroot/img/dot/gray.gif";

function ShowMenu(strMenuName, bShowMenu, objSource) {
	var	objNode = document.getElementById(strMenuName);
	if (objSource && objSource.className != "primary_nav_sel") {
        // IE6 hack otherwise the sub menu would be shown all the time
        objSource.style.overflow = (bShowMenu ? "visible" : "hidden");

        var objChild = objSource.getElementsByTagName("a");
		objSource.style.backgroundColor = (bShowMenu ? "red" : "#CCCCCC");
		if (objChild.length > 0) {
			objChild[0].style.color = (bShowMenu ? "white" : "black");
        }
		objChild = objSource.getElementsByTagName("img");

		if (objChild.length > 0) {
			objChild[0].src = (bShowMenu ? IconWhite.src : IconGray.src);
        }
    }

	if (objNode != null) {
        objNode.style.visibility= (bShowMenu ? 'visible' : 'hidden');
        objSource.style.overflow = (bShowMenu ? "visible" : "hidden");
    }
}

function openpopup (myfile, myname, breite, hoehe, resizeable, scrollbars) {
	if (myname == '') {
        myname = 'coreg';
    }
	if(resizeable == null || !resizeable) {
		resizeable = '0';
	} else {
		resizeable = '1';
    }
    if (scrollbars == null || !scrollbars) {
		scrollbars = '0';
	} else {
		scrollbars = '1';
		breite = parseInt(breite) + 22;
	}

	var params = "width=" + breite + ",height=" + hoehe + ",resizable=" + resizeable + ",status=0,scrollbars=" + scrollbars + ",toolbar=0";
	var newwin = window.open(myfile ,myname ,params);
	if (newwin != null) {
		newwin.focus();
    }
    return newwin;
}
