 // -----------------------------------------------------------------------------------
        // This file contains common JavaScripts
        // -----------------------------------------------------------------------------------
        // 
        // :: BrowserDetection       -> returns some variables, which browser is used
        // :: MM_openBrWindow        -> opens new browserwindow
        // :: MM_findObj             -> returns layerreference, for show/hide layer
        // :: MM_showHideLayers      -> shows/hides layers in NS4 / IE4
        // :: getInsideWindowWidth() -> returns WindowWidth
        // :: getInsideWindowHeiht() -> returns WindowHeight
        //
        // -----------------------------------------------------------------------------------

        // Browserdetection
        MAC_NS = false; MAC_IE = false; 
        PC_NS  = false; PC_IE  = false;
        IE     = false; NS     = false;
        BROWSERVERSION = 0;
        
        if((navigator.appVersion.indexOf("Mac")!= -1)){
                if(navigator.appName=="Netscape") {
                        BROWSERVERSION = navigator.appVersion.substring(0,1);
                        MAC_NS = true;
                        NS     = true;
                } else {
                        BROWSERVERSION = navigator.appVersion.substring(0,1);
                        MAC_IE = true;
                        IE     = true;
                }
        } else {
                if(navigator.appName=="Netscape") {
                        BROWSERVERSION = navigator.appVersion.substring(0,1);
                        PC_NS = true;
                        NS    = true;
                } else {
                        BROWSERVERSION = navigator.appVersion.substring(0,1);
                        PC_IE = true;
                        IE    = true;
                }
        }

        // Gets Layer Reference
        function MM_findObj(n, d) { //v3.0
                var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
                d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
                if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
                for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
        }

        // Gets Layer Reference
        function tmt_findObj(n){
                var x,t; if((n.indexOf("?"))>0&&parent.frames.length){t=n.split("?");
                x=eval("parent.frames['"+t[1]+"'].document.getElementById('"+t[0]+"')");
                }else{x=document.getElementById(n)}return x;
        }

        // Show/Hode Layer
        function MM_showHideLayers() { 
                var i,p,v,obj,args=MM_showHideLayers.arguments;if(document.getElementById){
                for (i=0; i<(args.length-2); i+=3){ obj=tmt_findObj(args[i]);v=args[i+2];
                v=(v=='show')?'visible':(v='hide')?'hidden':v;
                if(obj)obj.style.visibility=v;}} else{
                for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
                if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
                obj.visibility=v; }}
        }
        
        // Opens New BrowserWindow
        function MM_openBrWindow(theURL,winName,features) { 
                
                // neues Fenster oeffnen
                OpenWin = window.open(theURL,winName,features);
                
                // eigene Instanz an neues Fenster ¸bergeben
                OpenWin.opener = self;
                
                // eigenes Fenster in den Hintergrund
                //top.blur();
                
                // neues Fenster fokussieren
                OpenWin.focus();    
	}       
	
	// Shows URL in Main window (link clicked in popup)
	function popupShowMain( url ) {
		top.opener.top.document.location= url;
		window.close();
	}
	
        // sets Menu to item
        function setMenu( target, item ) { 
        	if( top.loaded == 1 ) {
			target.selectedIndex = item;                
		}
	}    	         


        
        // -----------------------------------------------------------------------------------
        // EOF
        // -----------------------------------------------------------------------------------
