function CheckPlugin(plugin) {
  if ((navigator.plugins && navigator.plugins[plugin]) ||
      (navigator.appName.indexOf('Microsoft') != -1 &&
       navigator.appVersion.indexOf('Mac') == -1 &&
       navigator.appVersion.indexOf('3.1') == -1)) {
         return true;
  } else return false;
}

var cwIE = false, 	// true = internet explorer
	cwMZ = false, 	// true = mozilla
	cwVS = 0, 		// versionsnummer
	cwOLD = false,  // true = browser veraltet
	cwJV = false, 	// true = java-enabled
	cwFL = false, 	// true = mit flash-plugin
	cwSX, cwSY;		// bildschirmpixel

imago = new Array(24);

function Status() {

          for (i=0; i < imago.length; ++i)  imago[i] = new Array(2);

		  var s = navigator.appCodeName;
		  if ( navigator.appName.indexOf("Microsoft")>=0 )
		  {
			  cwIE = true;
		  	  cwVS = parseFloat( navigator.appVersion.substr( navigator.appVersion.indexOf("MSIE") + 5, 4) );
			  if (cwVS<6)	cwOLD = true;
		  }
		  else cwIE = false;
		  
		  if ( navigator.appName.indexOf("Netscape")>=0 )
		  {
			  cwMZ = true;
		  	  cwVS = parseFloat( navigator.appVersion );
			  if (cwVS<5)	cwOLD = true;
		  }
		  else cwMZ = false;

          cwJV  = navigator.javaEnabled();
          cwFL  = CheckPlugin('Shockwave Flash');
          cwSX  = screen.availWidth;
          cwSY  = screen.availHeight;
/*
		  if ( (cwIE && (cwVS < 4)) || (cwNS && (cwVS < 4)) )
                 SWindow("newBrowser", "nwbrwsr.htm", 10,10,500,560);

		  if (navigator.appName.indexOf("Netscape") != -1) {
				document.captureEvents( Event.MOUSEDOWN )
		  };
		  document.onmousedown = click;
*/		  
		  
/*document.oncontextmenu = function(){return false}
if(document.layers) {
    window.captureEvents(Event.MOUSEDOWN);
    window.onmousedown = function(e){
        if(e.target==document)return false;
    }
}
else {
    document.onmousedown = function(){return false}
}
*/		  
}

function SetImago( nr, imago1, imago2 )  {  imago[nr][0] = new Image();  imago[nr][0].src = imago1;
                                            imago[nr][1] = new Image();  imago[nr][1].src = imago2;
                                         }

/*
function click(evt)
{
	if (navigator.appName.indexOf("Microsoft") != -1)
	{
  		if (event.button==2) 
		{	alert('\n          ©  1999 / 2001  by\n\n  W W W . C L A U S W E B E R . D E     ');
			return false
  		};
	};
	if (navigator.appName.indexOf("Netscape") != -1) 
	{
  		if ( evt.which == 3 ) 
		{	alert('          ©  1999 / 2001  by\n\n  W W W . C L A U S W E B E R . D E     ');
   			return false
  		};
 	};
};
*/
function OnImago(nr)    {   if (imago)
                                   document.images["imago" + nr].src = imago[nr][1].src;
                            else alert();
}

function OutImago(nr)   {   if (imago)
                                   document.images["imago" + nr].src = imago[nr][0].src;
                            else alert();
}

function BWindow( name, adr, x, y, w, h )
{
                para = "width=" + w + ",height="  + h + ",screenX=" + x + ",screenY=" + y +
                       ",toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes," +
                       "scrollbars=yes,resizable=yes,target=_blank";
                window.open( adr, name, para );
				window.blur();
}

function SWindow( name, adr, x, y, w, h )
{
                para = "width=" + w + ",height="  + h + ",screenX=" + x + ",screenY=" + y +
                       ",toolbar=no,location=no,directories=no,status=no,menubar=no," +
                       "resizable=no,target=_blank,dependent=yes";
                window.open( adr, name, para );
				window.blur();
}


function SWindow2( name, adr, x, y, w, h )
{
                para = "width=" + w + ",height="  + h + ",screenX=" + x + ",screenY=" + y +
                       ",toolbar=no,location=no,directories=no,status=no,menubar=no," +
                       "scrollbars=yes,resizable=no,target=_blank,dependent=yes";
                window.open( adr, name, para );
}

function PopUpStop() {
      para = "width=120,height=100,screenX=400,screenY=300," +
             "toolbar=0,location=0,directories=0,status=0,menubar=0," +
             "scrollbars=0,resizable=0";
      w = window.open( "theend.swf", "m", para);
      window.setTimeout("w.close();",20000);
}
