
  var FlashMode = 0;
    
  // PlugIn-Detect
  if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)
  { if (navigator.plugins && navigator.plugins["Shockwave Flash"] && (versionIndex = navigator.plugins["Shockwave Flash"].description.indexOf(".")) != - 1)
	{ var versionString = navigator.plugins["Shockwave Flash"].description.substring(versionIndex-2, versionIndex);
	  versionIndex = parseInt(versionString);
	  if (versionIndex >= 5)
	  { FlashMode = 1; }
	}
  }
  // ActiveX-Detect
  else if ((navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0) && (navigator.userAgent.indexOf("Windows") >=0))
  { document.writeln('<script language="VBScript">');
    document.writeln('detectableWithVB = False');
    document.writeln('If ScriptEngineMajorVersion >= 2 then');
    document.writeln('detectableWithVB = True');
    document.writeln('End If');

    document.writeln('on error resume next');
    document.writeln('If detectableWithVB Then');
    document.writeln('FlashMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))');
    document.writeln('End If');
    document.writeln('</scr' + 'ipt>');
  }
	
	
	function flash_sound_off()
	{
		// durchlaufe alle Player-Movies
		for(var i = 0; i < player_movies.length; i++)
		{
			// InternetExplorer-DOM (aber nicht Opera)
			if(document.all && !window.opera)
			{ var flashDOM = document.all[player_movies[i]]; }
			// alle anderen Browser
			else
			{ var flashDOM = document.embeds[player_movies[i]]; }
			
			// ermittele die abgespielten Frames im Stream-Movie
			stream_frame = 0;
			stream_frame = flashDOM.TCurrentFrame("_level1");
			
			// wenn schon 1 oder mehr Frames abgelaufen sind, stoppe diesen Movie
			if(stream_frame >= 1)flashDOM.SetVariable("stopit", 1);
		}
	}
	
	
	/**
		Get-Parameter aus Pfad extrahieren und als Array zurückgeben
		
		Aufruf mit 0, 1 oder 2
		0 => erzeugt ein Array der Form array[0], ...[1] ...[2]
		1 => erzeugt ein assoziatives Array der Form array['var1'], ...['var2'], ...['var3']
		2 => erzeugt ein gemischtes Array der Form array[0], ...['var1'], ...[1], ...['var2']
	*/
	function getGetVars(GET_str, format)
	{
		_GET = new Array();
		
		// ? herausfiltern
		GET_str = GET_str.substring(1, GET_str.length);
		
		pairs_arr = GET_str.split("&");

		for(i = 0; i < pairs_arr.length; i++)
		{
			thePair_arr = pairs_arr[i].split("=");
				
			if(format == 0 || format == 2)_GET[i] = thePair_arr[1];
			if(format == 1 || format == 2)_GET[thePair_arr[0]] = thePair_arr[1];
		}
		
		return _GET;
	}
	
	
	function getPathInfo()
	{
		// www.domain.de:80
		theHost = document.location.hostname;
		
		// http://www.domain.de:80/testdir/testdir2/test.htm#test?test=0
		theHref = document.location.href;
		
		// http://
		theProtocol = theHref.substring(0, theHref.indexOf(theHost));
		
		// #test
		theAnchor = document.location.hash;
		
		// ?test=0
		theGetVars = document.location.search;
		
		// _GET-Array erzeugen
		if(theGetVars.length > 0)_GET = getGetVars(theGetVars, 2);
		
		// http://www.domain.de:80/testdir/testdir2/test.htm
		theLocation = theHref;
		if(theLocation.indexOf("#") > 0)theLocation = theLocation.substring(0, theLocation.indexOf("#"));
		if(theLocation.indexOf("?") > 0)theLocation = theLocation.substring(0, theLocation.indexOf("?"));
		
		// /testdir/testdir2/test.htm
		theUNIXPath = theLocation.substring(theProtocol.length + theHost.length, theLocation.length);
		
		// /testdir/testdir2
		theUNIXDir = theUNIXPath.substring(0, theUNIXPath.lastIndexOf("/"));
		
		// testdir2
		theDir = theUNIXDir.substring(theUNIXDir.lastIndexOf("/") + 1, theUNIXDir.length);
		
		pathInfo = new Array();
		pathInfo['host'] = theHost;
		pathInfo['href'] = theHref;
		pathInfo['protocol'] = theProtocol;
		pathInfo['anchor'] = theAnchor;
		pathInfo['get'] = theGetVars;
		pathInfo['location'] = theLocation;
		pathInfo['unixpath'] = theUNIXPath;
		pathInfo['unixdir'] = theUNIXDir;
		pathInfo['dir'] = theDir;
		
		return pathInfo;
	}

	
	function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,winAlign,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v2.0
		var leftPos=0,topPos=0,autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
		if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
		if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
		if (winAlign && winAlign != "" && popWidth > 0 && popHeight > 0) {
			if (document.all || document.layers || document.getElementById) {w = screen.availWidth; h = screen.availHeight;}
			if (winAlign.indexOf("center") != -1) {topPos = (h-popHeight)/2;leftPos = (w-popWidth)/2;}
			if (winAlign.indexOf("bottom") != -1) topPos = h-popHeight; if (winAlign.indexOf("right") != -1) leftPos = w-popWidth; 
			if (winAlign.indexOf("left") != -1) leftPos = 0; if (winAlign.indexOf("top") != -1) topPos = 0; 						
			features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
		if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
		if (window["popupWindow"] == null) window["popupWindow"] = new Array();
		var wp = popupWindow.length;
		popupWindow[wp] = window.open(theURL,winName,features);
		if (popupWindow[wp].opener == null) popupWindow[wp].opener = self;  
		if (document.all || document.layers || document.getElementById) {
			if (borderless && borderless != "") {popupWindow[wp].resizeTo(popWidth,popHeight); popupWindow[wp].moveTo(leftPos, topPos);}
			if (alwaysOnTop && alwaysOnTop != "") {
				ontopIntervalHandle = popupWindow[wp].setInterval("window.focus();", 50);
				popupWindow[wp].document.body.onload = function() {window.setInterval("window.focus();", 50);}; }
			if (autoCloseTime && autoCloseTime > 0) {
				popupWindow[wp].document.body.onbeforeunload = function() {
					if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
					window.onbeforeunload = null;	}  
				autoCloseTimeoutHandle = window.setTimeout("popupWindow["+wp+"].close()", autoCloseTime * 1000); }
			window.onbeforeunload = function() {for (var i=0;i<popupWindow.length;i++) popupWindow[i].close();}; }   
		document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
	}
	
	function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  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);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
