/* 
    Titel: JavaScript Layout-Kontrolle
    Hier sind alle globalen Layoutvogaben und Skripte enthalten
*/


function RealDetect(url){

     var RealMode=0;
     var RealPlayer5=0;
     var RealPlayer4=0;
     var RealPlayerG2=0;

     if (navigator.userAgent.indexOf("MSIE")< 0 )
     {
     numPlugins = navigator.plugins.length;
     for (i = 0; i < numPlugins; i++)
     {
             plugin = navigator.plugins[i];
             if (plugin.name.substring(0,10)=="RealPlayer")
             {
                     RealMode=1;
             }
     }
     }

     document.write('<SCRIPT LANGUAGE=VBScript\> \n');
     document.write('on error resume next \n');
     document.write('RealPlayerG2 = (NOT IsNull(CreateObject("rmocx.RealPlayer G2 Control")))\n');
     document.write('RealPlayer5 = (NOT IsNull(CreateObject("RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)")))\n');
     document.write('RealPlayer4 = (NOT IsNull(CreateObject("RealVideo.RealVideo(tm) ActiveX Control (32-bit)")))\n');
     document.write('</SCRIPT\> \n');

     if ( RealPlayerG2 || RealPlayer5 || RealPlayer4 ) 
     {
        IEPlugin = 1;
   		document.write('<OBJECT ID="RealPlayerIE" NAME="RealPlayerIE2"CLASSID="CLSID:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"> \n');
		document.write('</OBJECT> \n');
		PluginVersion = document.RealPlayerIE.GetVersionInfo();
		opener.top.pv = PluginVersion;
			     }
	else if ( RealMode )
	{
		NSPlugin = 1;
     	document.write('<EMBED TYPE="audio/x-pn-realaudio-plugin" NAME="RealPlayerNS" ID="RealPlayerNS2" CONTROLS="HomeCtrl" HEIGHT=0 WIDTH=0> \n');
		document.write('</EMBED> \n');
		PluginVersion = document.RealPlayerNS.GetVersionInfo();
		opener.top.pv = PluginVersion;
	}
     else 
     {
         PluginError = 1;
     }
	
	urlneu = opener.top.url;
	location.href = urlneu; 
	 
}


function ZweiFrames(URL1,F1,URL2,F2)   {  
    parent.frames[F1].location.href=URL1;
    parent.frames[F2].location.href=URL2;
	}
	
/* Oeffnet abhaengig vom Browser das Videofenster, mit Datenuebergabe des Videonamens*/

function openFenster(url) {
 
		linkwindow = window.open(url,'Link','width=600,height=200,status=no,locationbar=no,dependent=yes,resizable=no,toolbar=no,screenY=0,screenX=20');
		linkwindow.focus();
}

function openFenster1(url) {
 
		linkwindow = window.open(url,'Link','width=600,height=500,status=no,locationbar=no,dependent=yes,resizable=no,toolbar=no,screenY=0,screenX=20');
		linkwindow.focus();
}


function openWinReal(url,width,height) {
		top.url = url;
		linkwindow = window.open('realdetect.htm','Link','width='+ width +',height='+ height +',status=no,locationbar=no,dependent=yes,resizable=no,toolbar=no,screenY=0,screenX=20');
		linkwindow.focus();
}

function openWinVideo(url,width,height) {
		linkwindow = window.open(url,'Link','width='+ width +',height='+ height +',status=no,locationbar=no,dependent=yes,resizable=no,toolbar=no,screenY=0,screenX=20');
		linkwindow.focus();
}

function openWin(url,width,height) {
		linkwindow = window.open(url,'Link','width='+ width +',height='+ height +',status=no,locationbar=no,dependent=yes,resizable=no,toolbar=no,screenY=0,screenX=20');
		linkwindow.focus();
}

function openVideo(url,banner) {
 
	var bName = navigator.appName; 
	var videons = "../video/videons.php3?banner=" + banner + "&vid=" + url;
	var videoie = "../video/videoie.php3?banner=" + banner + "&vid=" + url;
	
	if (bName == "Netscape"){

		videowindow = window.open(videons,'Video','width=400,height=320,status=no,locationbar=no,dependent=yes,resizable=no,toolbar=no,screenY=0,screenX=20');
		videowindow.focus();
	}
	
	else {
	
		videowindow = window.open(videoie,'Video','width=400,height=320,status=no,locationbar=no,dependent=no,resizable=no,toolbar=no,screenY=0,screenX=20');
		videowindow.focus();
	}
	

}

function livevideo() {
 
	var bName = navigator.appName; 
	var videons = "../video/videonsl.htm"
	var videoie = "../video/videoiel.htm"
	
	if (bName == "Netscape"){

		videowindow = window.open(videons,'Video','width=400,height=371,status=no,locationbar=no,dependent=yes,resizable=no,toolbar=no,screenY=0,screenX=20');
		videowindow.focus();
	}
	
	else {
	
		videowindow = window.open(videoie,'Video','width=400,height=371,status=no,locationbar=no,dependent=yes,resizable=no,toolbar=no,screenY=0,screenX=20');
		videowindow.focus();
	}
	

}

function openWindow(url) {

		fenster = window.open(url,'Glossar','width=750,height=500,status=no,scrollbars=yes,locationbar=no,dependent=yes,resizable=yes,toolbar=no,screenY=0,screenX=20');
		fenster.focus();
	
}

function openWindowEuro(url) {

		fenster = window.open(url,'Glossar','width=790,height=510,status=no,scrollbars=yes,locationbar=no,dependent=yes,resizable=no,toolbar=no,screenY=0,screenX=20');
		fenster.focus();
	
}

function openVideoBanner(url,pos) {
	var bName = navigator.appName; 
	var videons = "../video/videobannerns.php3?pos=" + pos + "&vid=" + url + "&banner=1";
	var videoie = "../video/videobannerie.php3?pos=" + pos + "&vid=" + url + "&banner=1";
	
	if (bName == "Netscape"){

		videowindow = window.open(videons,'Video','width=400,height=371,status=no,locationbar=no,dependent=yes,resizable=no,toolbar=no,screenY=0,screenX=20');
		videowindow.focus();
	}
	
	else {
	
		videowindow = window.open(videoie,'Video','width=400,height=371,status=no,locationbar=no,dependent=no,resizable=no,toolbar=no,screenY=0,screenX=20');
		videowindow.focus();
	}
	

}

function openVideoWFS(url,banner) {
 
	var bName = navigator.appName; 
	var videons = "../video/videowfsns.php3?banner=" + banner + "&vid=" + url;
	var videoie = "../video/videowfsie.php3?banner=" + banner + "&vid=" + url;
	
	if (bName == "Netscape"){

		videowindow = window.open(videons,'Video','width=400,height=371,status=no,locationbar=no,dependent=yes,resizable=no,toolbar=no,screenY=0,screenX=20');
		videowindow.focus();
	}
	
	else {
	
		videowindow = window.open(videoie,'Video','width=400,height=371,status=no,locationbar=no,dependent=no,resizable=no,toolbar=no,screenY=0,screenX=20');
		videowindow.focus();
	}
	

}
