function MM_openBrWindow(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
}

function popup(w,h,site) {
	x=screen.availWidth/2-w/2;
	y=screen.availHeight/2-h/2;
	var popupWindow=window.open('','','width='+w+',height='+h+',left='+x+',top='+y+',screenX='+x+',screenY='+y);
	popupWindow.document.write(site);	
}

function printWindow() {
	Browser = parseInt(navigator.appVersion);
	if (Browser >= 4) window.print();
}


// durchsichtige bilder

var opacity = new function()
{
    this.load = function()
    {
        this.loadNode(document.body);
    }
   
    this.loadNode = function(node)
    {
        if (node.nodeType == 1) // is there any constant for element-nodes?
        {
            if (this.testNode(node))
            {
                this.assimilateNode(node);
            }
            var subNodes = node.childNodes;
            for (var i = 0; i < subNodes.length; i++)
            {
                this.loadNode(subNodes[i]);
            }
        }
    }
   
    this.loadImages = function()
    {
        var imageNodes = document.getElementsByTagName("img");
        for (var i = 0; i < imageNodes.length; i++)
        {
            if (this.testNode(imageNodes[i]))
            {
                this.assimilateNode(imageNodes[i]);
            }
        }
    }
   
    this.testNode = function(node)
    {
        if (node.nodeType != 1) // is there any constant for element-nodes?
        {
            return false;
        }
        if (this.inverseFadeClass)
        {
            if (this.getNodeClass(node) != this.fadeClass)
            {
                return true;
            }
        }
        else
        {
            if (this.getNodeClass(node) == this.fadeClass)
            {
                return true;
            }
        }
        return false;
    }
   
    this.assimilateNode = function(node)
    {
        if (this.unsetFadeClass)
        {
            // standard
            if (typeof(node.className) != "undefined")
            {
                node.className = "";
            }
            // nicer standard ;-)
            if (typeof(node.getAttribute("class")) != "undefined")
            {
                node.setAttribute("class", "");
            }
            // IE-"standard"
            if (typeof(node.getAttribute("className")) != "undefined")
            {
                node.setAttribute("className", "");
            }
        }
        node.onmouseover = function anonymous() { opacity.fadeIn(this); };
        node.onmouseout = function anonymous() { opacity.fadeOut(this); };
        this.fadeOut(node, true);
    }
   
    this.getNodeClass = function(node)
    {
        // standard
        if (typeof(node.className) != "undefined")
        {
            return node.className;
        }
        // nicer standard ;-)
        else if (typeof(node.getAttribute("class")) != "undefined")
        {
            return node.getAttribute("class");
        }
        // IE-"standard"
        else if (typeof(node.getAttribute("className")) != "undefined")
        {
            return node.getAttribute("className");
        }
        return false;
    }
   
    this.fadeIn = function(node, useNoDelay)
    {
        this.setOpacity(node, this.darkOpacity, useNoDelay);
    }
   
    this.fadeOut = function(node, useNoDelay)
    {
        this.setOpacity(node, this.lightOpacity, useNoDelay);
    }
   
    this.setOpacity = function(node, newvalue, useNoDelay)
    {
        if (typeof(useNoDelay) == "undefined")
        {
            useNoDelay = false;
        }
        if (typeof(node.style.opacity) == "undefined" && typeof(node.style.MozOpacity) == "undefined" && typeof(node.filters) == "undefined")
        {
            useNoDelay = true;
        }
        if (useNoDelay)
        {
            this.setDirectOpacity(node, newvalue);
        }
        else
        {
            this.startDelayedOpacity(node, newvalue);
        }
    }
   
    this.startDelayedOpacity = function(node, newvalue)
    {
        var value = 0;
        if (typeof(node.style.opacity) != "undefined")
        {
            value = Math.round(node.style.opacity * 100);
        }
        else if (typeof(node.style.MozOpacity) != "undefined")
        {
            value = Math.round(node.style.MozOpacity * 100);
        }
        else if (typeof(node.filters) != "undefined" && typeof(node.filters.alpha) != "undefined" && typeof(node.filters.alpha.opacity) != "undefined")
        {
            value = node.filters.alpha.opacity;
        }
        if (newvalue == value)
        {
            return;
        }
        var i;
        for (i = 0; i < this.nodes.length; i++)
        {
            if (node == this.nodes[i])
            {
                this.nodes[i] = null;
            }
        }
        this.cleanup++;
        var nodeID = (this.nodes.push(node) - 1);
        var direction = 1;
        var delay = 0;
        if (newvalue < value)
        {
            direction = -1;
        }
        for (i = value; (direction == 1 && i <= newvalue) || (direction == -1 && i >= newvalue); i += (this.step * direction))
        {
            delay += this.stepdelay;
            window.setTimeout("opacity.setDelayedOpacity(" + nodeID + ", " + i + ");", delay);
        }
        if (i != newvalue)
        {
            delay += this.stepdelay;
            window.setTimeout("opacity.setDelayedOpacity(" + nodeID + ", " + newvalue + ");", delay);
        }
        delay += this.stepdelay;
        window.setTimeout("opacity.doCleanup();", delay);
    }
   
    this.setDelayedOpacity = function(nodeID, newvalue)
    {
        if (this.nodes[nodeID] != null)
        {
            this.setDirectOpacity(this.nodes[nodeID], newvalue);
        }
    }
   
    this.doCleanup = function()
    {
        this.cleanup--;
        if (this.cleanup == 0)
        {
            // clear all old nodes :)
            this.nodes = new Array();
        }
    }
   
    this.setDirectOpacity = function(node, newvalue)
    {
        if (newvalue < 0)
        {
            newvalue = 0;
        }
        if (newvalue > 100)
        {
            newvalue = 100;
        }
        if (typeof(node.style.opacity) != "undefined")
        {
            node.style.opacity = (newvalue / 100);
        }
        if (typeof(node.style.MozOpacity) != "undefined")
        {
            node.style.MozOpacity = (newvalue / 100);
        }
        if (typeof(node.filters) != "undefined" && typeof(node.filters.alpha) == "undefined")
        {
            node.style.filter = "alpha(opacity=" + newvalue + ")";
        }
        else if (typeof(node.filters) != "undefined" && typeof(node.filters.alpha.opacity) != "undefined")
        {
            node.filters.alpha.opacity = newvalue;
        }
    }
   
    // may be changed
    this.step = 5;
    this.stepdelay = 20;
    this.lightOpacity = 30;
    this.darkOpacity = 99;
    this.fadeClass = "fading";
    this.unsetFadeClass = true;
    this.inverseFadeClass = false;
    // must be set to this values
    this.cleanup = 0;
    this.nodes = new Array();
}