function doFocus(suchbegriff,cDefault)
{
  if (suchbegriff.value == cDefault )suchbegriff.value = "";
}

function doBlur(eingabefeld,cDefault)
{
  if (eingabefeld.value == "" )eingabefeld.value = cDefault;
}

function popupweraprof(adresse) {
FensterAuf = this.open(adresse, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,height=500,width=550");
}

function ultima_popup(adresse, sizex, sizey, wname) {
    if(parseInt(sizex) <= 0){ sizex = 650;} else {sizex=parseInt(sizex);}
    if(parseInt(sizey) <= 0){ sizey = 500;} else {sizey=parseInt(sizey);}
    if(wname==''){wname='ultima_popupwindow';}
    FensterAuf = this.open(adresse, wname, "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=" + parseInt(sizex) + ",Height="+parseInt(sizey));
    FensterAuf.focus();
}

function videofenster(adresse,typ) {
FensterAuf = this.open('http://www.hsw.uni-wuppertal.de/showVideos.html?videourl=' + adresse + '&typ=' + typ, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,height=425,width=400");
}

function changePic (objname,mode) {
if (mode==1)
{
       bild = document.getElementById(objname);
       bild.src = "http://www.hsw.uni-wuppertal.de/" + objname + "_aktiv.jpg";
}
else
{
       bild = document.getElementById(objname);
       bild.src = "http://www.hsw.uni-wuppertal.de/" + objname + ".jpg";
}
       }

function showDiv (objname)  {
       div = document.getElementById(objname);
       div.style.visibility="visible";
}

function pullDiv (objname, nWidth, nHeight)
{
     oObj = document.getElementById(objname);

     // --- Setze linken Rand neu
     oStyle = oObj.style;
     cLeft = oStyle.left;
     if ( cLeft != '' )
     {
        cLeft = cLeft.substring(0,cLeft.length-2);
        nLeft = parseInt(cLeft);
        nLeft -= nWidth;
        cLeft = nLeft.toString() + "px";
        oObj.style.left  = cLeft;
     }

     // --- Setze oberen Rand neu
     oStyle = oObj.style;
     cTop = oStyle.top;
     if ( cTop != '' )
     {
        cTop = cTop.substring(0,cTop.length-2);
        nTop = parseInt(cTop);
        nTop = nHeight;
        cTop = nTop.toString() + "px";
        oObj.style.top  = cTop;
     }

     // --- ShowIt
     oObj.style.visibility="visible";
}

function dropDiv (objname, nWidth)
{
     oObj = document.getElementById(objname);

     // --- Setze linken Rand neu
     oStyle = oObj.style;
     cLeft = oStyle.left;
     if ( cLeft != '' )
     {
        cLeft = cLeft.substring(0,cLeft.length-2);
        nLeft = parseInt(cLeft);
        nLeft += nWidth;
        cLeft = nLeft.toString() + "px";
        oObj.style.left  = cLeft;
     }

     // --- ShowIt
     oObj.style.visibility="hidden";
}
function hideDiv (objname) {
       div = document.getElementById(objname);
       div.style.visibility="hidden";
}
/*
 * changeClass: replaces class of main navi <LI> elements to highlight active 1st level main category.
 * Since "Home" must not be highlighted, a counter is used to skip "Home" (=first <LI> node)
*/
function changeClass(oldclass) {
	cName = oldclass + 'main';
	cNewName = oldclass + 'ACTmain';
	var rootUL = document.getElementById('navistart'); 
        var Knoten = rootUL.firstChild;
        var iCnt = 0;
        while (Knoten != null) {
		if (Knoten.nodeName == 'LI') {
                    iCnt++;
                    if (Knoten.className == cName) {
                        if (iCnt>1) {
			    Knoten.className = cNewName;
                        }
		     }
                }
                Knoten = Knoten.nextSibling;
        }
}
