<!--

var neues;
var didopen=false;

function bigchat(theURL,winName) { 
    if  (didopen)  neues.close();
	didopen=true;
 features = "width=800,height=500,scrollbars=no,resizable=yes";
 neues = window.open(theURL,"chat",features);
}

function mailbox(theURL,winName) { 
 features = "width=800,height=500,scrollbars=yes,resizable=yes";
 neues = window.open(theURL,"mail",features);
}

function html_code(theURL,winName) { 
    if  (didopen)  neues.close();
	didopen=true;
 features = "width=500,height=250,scrollbars=yes,resizable=no";
 neues = window.open(theURL,"displaywindow",features);
}

function vorschau(theURL,winName) { 
    if  (didopen)  neues.close();
	didopen=true;
 features = "width=800,height=800,scrollbars=yes,resizable=yes";
 neues = window.open(theURL,"vorschau",features);
}

function rangliste(theURL,winName) { 
    if  (didopen)  neues.close();
	didopen=true;
 features = "width=1000,height=770,scrollbars=yes,resizable=yes";
 neues = window.open(theURL,"rangliste",features);
}

function openPaymentPopup(url) { 
  newwindow = window.open(url, 'callandpay', 'height=404,width=320,resizable=no,menubar=no,status=no,location=no,toolbar=no,titlebar=no,scrollbars=no,directories=no'); 
  if (window.focus) {newwindow.focus();} 
}
var pageLayer = {
    layerElement    : null,
    maxLayerOpacity : 0.7,
    
    addRemoveLayer : function() {
        if (this.layerElement == null) {
            // create layer element
            this.layerElement = document.createElement('div');
            
            // attach event
            this.layerElement.onmousedown = function() {
                pageLayer.fadeLayer(-0.1, pageLayer.maxLayerOpacity);
            }
            
            // set styles of layer element
            this.layerElement.style.position        = 'absolute';
            this.layerElement.style.top             = '0px';
            this.layerElement.style.left            = '0px';
            this.layerElement.style.width           = '100%';
            this.layerElement.style.height          = document.documentElement.scrollHeight + 'px';
            this.layerElement.style.minHeight       = '100%';    // for IE
            this.layerElement.style.backgroundColor = '#000';
            //document.documentElement.style.overflow = 'hidden';
            
            // add layer to body
            document.getElementsByTagName('body')[0].appendChild(this.layerElement);
        } else {
            // remove layer and make document scrollable
            document.getElementsByTagName('body')[0].removeChild(this.layerElement);
            document.documentElement.style.overflow = 'visible';
            this.layerElement = null;
            document.getElementById('mydiv').innerHTML = '';
        }
    },
    
    fadeLayer : function(addend) {
        var opacity;
        
        // if not called by timeout
        if (arguments[1] == null) {
            // add layer
            this.addRemoveLayer();
            
            if (addend > 0) {
                opacity = 0;
            } else if (addend < 0) {
                opacity = this.maxLayerOpacity;
            } else {
                return;
            }
        } else {
            opacity = arguments[1];
        }
        
        opacity += addend;
        
        // prevent rounding errors
        opacity = Math.round(opacity * 10) / 10;
        
        // if maximum or minimum is exceeded
        if (opacity > this.maxLayerOpacity) {
            return;
        } else if (opacity < 0) {
            // remove layer before exit
            this.addRemoveLayer();
            return;
        }
        
        // check for Internet Explorer
        if (navigator.userAgent.indexOf('MSIE') > -1) {
            this.layerElement.style.filter = 'Alpha(opacity=' + (opacity * 100) + ')';
        } else {
            this.layerElement.style.opacity = opacity;
        }
        
        setTimeout('pageLayer.fadeLayer(' + addend + ', ' + opacity + ');', 20);
    }
};
//-->
