var ap_flash = "0";

function apagoPixel(ap_pixel, ap_groups, ap_server, sessionID) {

         //------------------------------------------------------------
         // Groups verarbeiten
         //------------------------------------------------------------
         //if (ap_groups!="") ap_groups = "&groups=" + escape(ap_groups);
	if (ap_groups!="") ap_groups = "&groups=" + ap_groups;


         //------------------------------------------------------------
         // Host ermitteln
         //------------------------------------------------------------
         var ap_host = location.protocol + "//" + location.host;
	var ap_port = location.port;

         if (ap_port!="") ap_host += ":" + ap_port;
	if(ap_server) {
		ap_host = ap_server;
	}

         //------------------------------------------------------------
         // Referrer ermitteln
         //------------------------------------------------------------
         var ap_referrer=document.referrer;
         if (typeof(top.document)=="object") ap_referrer=top.document.referrer;

         if (ap_referrer.substring(0,ap_host.length)==ap_host) {
           ap_referrer = "";
         } else {
	  if (ap_referrer!="") ap_referrer = "&referrer=" + escape(ap_referrer);
         }

         if (ap_host!="") ap_host = "&server=" + escape(ap_host);

         //------------------------------------------------------------
         // Netscape-Plugins ermitteln
         //------------------------------------------------------------
         var ap_plugins = "";
	if(navigator.appName.indexOf("Microsoft")!=-1){
		for(i=0;i<navigator.plugins.length;++i)
        			ap_plugins+=navigator.plugins[i].name+";";
	}

         if (ap_plugins!="") ap_plugins = "&plugins=" + escape(ap_plugins);

         //------------------------------------------------------------
         // Flash-Version ermitteln
         //------------------------------------------------------------
  	if (navigator.appName.indexOf("Microsoft")==-1) {
	  if (navigator.plugins != null && navigator.plugins.length > 0) {
	     var flashPlugin = navigator.plugins["Shockwave Flash"];
 	     if (typeof flashPlugin == "object") {
	       if (flashPlugin.description.indexOf("3.") != -1)      ap_flash = "3";
	       else if (flashPlugin.description.indexOf("4.") != -1) ap_flash = "4";
	       else if (flashPlugin.description.indexOf("5.") != -1) ap_flash = "5";
	       else if (flashPlugin.description.indexOf("6.") != -1) ap_flash = "6";
	       else if (flashPlugin.description.indexOf("7.") != -1) ap_flash = "7";
	       else if (flashPlugin.description.indexOf("8.") != -1) ap_flash = "8";
	     }
	  }
         } else {
    	    document.write("<scr");
             document.write("ipt language=\"VBScript\"\> \n");
	    document.write("on error resume next \n");
  	    document.write("For i = 2 to 8\n");
	    document.write("If Not(IsObject(CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" & i))) Then \n");
	    document.write("ap_flash = i \n");
	    document.write("Else \n");
	    document.write("ap_flash = i \n");
	    document.write("End If \n");
	    document.write("Next \n");
	    document.write("</scr");
             document.write("ipt\> \n");
	}
         ap_flash = "&flash=" + ap_flash;

         //------------------------------------------------------------
         // sessionID für Unique-User weiterreichen, falls vorhanden
         //------------------------------------------------------------
         var ap_sessionID = "";
         if(typeof(sessionID)!="undefined"){
                 ap_sessionID = "&sessionID="+sessionID;
         }

         //------------------------------------------------------------
         // Bildschirm-Einstellungen ermitteln
         //------------------------------------------------------------
	var ap_width  = screen.width;
	var ap_height = screen.height;
	var ap_color  = (navigator.appName.indexOf("Microsoft")!=-1)? screen.pixelDepth : screen.colorDepth;

         var ap_screen = "&swidth="+ap_width+"&sheight="+ap_height+"&scolor="+ap_color;

         //------------------------------------------------------------
         // JavaScript erlaubt
         //------------------------------------------------------------
         var ap_java = "&java=true";

         //------------------------------------------------------------
         // Cookies erlaubt ermitteln
         //------------------------------------------------------------
         var ap_cookies = navigator.cookieEnabled;

         if (ap_cookies!="") ap_cookies = "&cookies=" + ap_cookies;

         //------------------------------------------------------------
         // Betriebsystem ermitteln
         //------------------------------------------------------------
         var ap_platform = navigator.platform;

         if (ap_platform!="") ap_platform = "&platform=" + ap_platform;

         //------------------------------------------------------------
         // User Language ermitteln
         //------------------------------------------------------------
         var ap_ul = "";

	if(navigator.appName.indexOf("Microsoft")!=-1){
         	ap_ul = "&ul=" + escape(navigator.language);
         }

	var im = new Image();
//         alert(ap_pixel + "?ts=" + (new Date()).getTime() + ap_referrer + ap_host + ap_groups + ap_sessionID + ap_plugins + ap_flash + ap_screen + ap_ul + ap_java + ap_platform + ap_cookies);
	im.src = ap_pixel + "?ts=" + (new Date()).getTime() + ap_referrer + ap_host + ap_groups + ap_sessionID + ap_plugins + ap_flash + ap_screen + ap_ul + ap_java + ap_platform + ap_cookies;
}