/* Dropdown */

DropDown = function() {
    if (document.all&&document.getElementById) {
        navRoot = document.getElementById("nav");
        for (i=0; i<navRoot.childNodes.length; i++) {
            node = navRoot.childNodes[i];
            if (node.nodeName=="LI") {
                node.onmouseover=function() {
                    this.className+=" over";
                }
                node.onmouseout=function() {
                    this.className=this.className.replace(" over", "");
                }
            }
        }
    }
}


/* Newsticker */

//Specify path to xml file
/*
var xmlsource="ticker.txt"

//load xml file
if (window.ActiveXObject)
   var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
else if (document.implementation && document.implementation.createDocument)
     var xmlDoc= document.implementation.createDocument("","doc",null);
if (typeof xmlDoc!="undefined") {
   xmlDoc.load(xmlsource)
}


//Regular expression used to match any non-whitespace character
var notWhitespace = /\S/

function NewsTicker(){
    //Cache "messages" element of xml file
    tickerobj=xmlDoc.getElementsByTagName("xmlticker")[0]

    //REMOVE white spaces in XML file. Intended mainly for NS6/Mozilla
    for (i=0;i<tickerobj.childNodes.length;i++) {
        if ((tickerobj.childNodes[i].nodeType == 3)&&(!notWhitespace.test(tickerobj.childNodes[i].nodeValue))) {
            tickerobj.removeChild(tickerobj.childNodes[i])
            i--
        }
    }
    document.getElementById("news-ticker").innerHTML=tickerobj.childNodes[1].firstChild.nodeValue
    msglength=tickerobj.childNodes.length
    currentmsg=2
    themessage=''
    setInterval("rotatemsg()",tickerobj.childNodes[0].firstChild.nodeValue)
}

function rotatemsg() {
    var msgsobj=tickerobj.childNodes[currentmsg]
    if (msgsobj.getAttribute("url")!=null) {
       themessage='<a href="'+msgsobj.getAttribute("url")+'"'
       if (msgsobj.getAttribute("target")!=null)
          themessage+=' target="'+msgsobj.getAttribute("target")+'"'
          themessage+='>'
    }
    themessage+=msgsobj.firstChild.nodeValue
    if (msgsobj.getAttribute("url")!=null)
    themessage+='</a>'

    //Rotate msg and display it in DIV:
    document.getElementById("news-ticker").innerHTML=themessage
    currentmsg=(currentmsg<msglength-1)? currentmsg+1 : 1
    themessage=''
}

function fetchxml(){
if (xmlDoc.readyState==4)
   NewsTicker()
else
    setTimeout("fetchxml()",10)
}

if (window.ActiveXObject)
   fetchxml()
else if (typeof xmlDoc!="undefined")
     xmlDoc.onload=NewsTicker
*/


function Ansicht(imageName,imageWidth,imageHeight,alt,posLeft,posTop)
{ 
   newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",left="+posLeft+",top="+posTop); 
   newWindow.document.open(); 
   newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
   newWindow.document.write('<a href="#" onMouseDown="self.close()" title="Bildansicht schließen">'); 
   newWindow.document.write('<img border=0 src='+imageName+' width='+imageWidth+' height='+imageHeight+' title="Bildansicht schließen" alt='+alt+'>'); 
   newWindow.document.write('</a>'); 
   newWindow.document.write('</body></html>'); 
   newWindow.document.close(); 
   newWindow.focus(); 
}
