// stylescheets
css_Mac_IE = "/_common/ie.css";
css_Win_IE = "/_common/ie.css";
css_Mac_NS = "/_common/ns.css";
css_Win_NS = "/_common/ns.css";

//browserdetectionsd dsfsd fdsfds f dsfsd fsdf

var MAC_NS, PC_NS, IE, PC_MOZ, MOZ;
MAC_NS  = false;  MAC_IE      = false;
PC_NS   = false;  PC_IE       = false;
IE      = false;  NS          = false;
PC_MOZ  = false;  MAC_MOZ     = false;
LINUX   = false;
MOZ     = false;  BROWSERVERSION  = 0;

p     = parent;

BROWSERVERSION = navigator.appVersion.substring(0,1);

if( navigator.userAgent.indexOf("Opera") != -1 )
{
  PC_IE=true;
}

if( navigator.userAgent.indexOf("Gecko")!= -1 )
{
  if( navigator.appVersion.indexOf("Mac")!= -1 )
  {
    MAC_MOZ = true;
    MOZ   = true;
  }
  else
  {
    PC_MOZ  = true;
    MOZ   = true;
  }
}

LINUX = navigator.userAgent.indexOf("inux") != -1;

if( navigator.appVersion.indexOf("Mac") != -1 )
{
  if(navigator.appName=="Netscape")
  {
    MAC_NS = true;
    NS     = true;
  }
  else
  {
    MAC_IE = true;
    IE     = true;
  }
}
else
{
  if( navigator.appName=="Netscape" )
  {
    PC_NS = true;
    NS    = true;
  }
  else
  {
    PC_IE = true;
    IE    = true;
  }
}
// Fenster öffnen
// bsp. javascript:MM_openBrWindow('pfad','name','status=no,menubar=no,scrollbars=yes,width=480,height=470')
function MM_openBrWindow(theURL,winName,features,w,h)
{
	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=(screen.height)?(screen.height-h)/2:100;
		
	features += ',top='+TopPosition+',left='+LeftPosition;
  OpenWin = window.open(theURL,winName,features);
  OpenWin.opener = self;
  OpenWin.focus();
}
function MM_openBrWindowCenter(theURL,winName,features,w,h)
      {
				LeftPosition=(screen.width)?(screen.width-w)/2:100;
				TopPosition=(screen.height)?(screen.height-h)/2:100;
				
				features += ',top='+TopPosition+',left='+LeftPosition;
        OpenWin = window.open(theURL,winName,features);
        OpenWin.opener = self;
        OpenWin.focus();
      }
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_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_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];}
}
var Weite;
var Hoehe;

function zoom() {
			
			var hoben = (Hoehe / 2) - 296;
			var woben = (Weite / 2) + 220;
			var hunten = (Hoehe / 2) + 228;
			var wunten = (Weite / 2) - 362;
			var hsubmenu = (Hoehe / 2) + 230;
			var wsubmenu = (Weite / 2) + 100;
			
			
			if(document.all)
      {
      	document.all["linienoben"].style.top = hoben;
      	document.all["linienoben"].style.left = woben;
      	document.all["linienunter"].style.top = hunten;
      	document.all["linienunter"].style.left = wunten;
      	document.all["menuunten"].style.top = hsubmenu;
      	document.all["menuunten"].style.left = wsubmenu;
      	
      }
			else if(document.layers)
			{
				document.layers["linienoben"].style.top = hoben;
				document.layers["linienoben"].style.left = woben;
				document.layers["linienunter"].style.top = hunten;
				document.layers["linienunter"].style.left = wunten;
				document.layers["menuunten"].style.top = hsubmenu;
				document.layers["menuunten"].style.left = wsubmenu;

			}
			else if  ((document.getElementById) && (navigator.appName=="Netscape"))
      {
				document.getElementById("linienoben").style.top = hoben;
				document.getElementById("linienoben").style.left = woben;
				document.getElementById("linienunter").style.top = hunten;
				document.getElementById("linienunter").style.left = wunten;
				document.getElementById("menuunten").style.top = hsubmenu;
				document.getElementById("menuunten").style.left = wsubmenu;
      }
    }

function Fensterweite()
{
 if (window.innerWidth) return window.innerWidth;
 else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
 else return 0;
}

function Fensterhoehe()
{
 if (window.innerHeight) return window.innerHeight;
 else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
 else return 0;
}

function neuAufbau()
{
 if (Weite != Fensterweite() || Hoehe != Fensterhoehe())
 window.history.go(0);
}

function display_flash(name,breite,hoehe,color,bild)
{	
	var test = false;
	if ( flashavaible != false )
	{		
		test = "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+breite+"' height='"+hoehe+"' border='0' id='"+name+"'><param name='movie' value='/_flash/"+name+".swf'><param name='bgcolor' value='#"+color+"'><embed src='/_flash/"+name+".swf' name='"+name+"' id='"+name+"' swliveconnect=true quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+breite+"' height='"+hoehe+"' border='0'></embed></object>";
		document.write(test);
	}
	else
	{		
			test = "<a href=\"http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&Lang=German&P5_Language=German\" target=\"_blank\">Flash-Plug-in herunterladen</a>";
			document.write(test);
			MM_openBrWindow('popup/flashpopup.php','NoFlash','status=no,menubar=no,scrollbars=no,width=150,height=150')
	}
}

function searchlexikon()
{
	var linklexikon = "/popup/lexikon_popup.php?search="+document.searchitem.search.value;
	MM_openBrWindow(linklexikon,'Lexikon','status=no,menubar=no,scrollbars=yes,width=620,height=440',620,440)
}

function openForum()
{
	MM_openBrWindow('/popup/forum_popup.php','Forum','status=no,menubar=no,scrollbars=yes,width=620,height=550',620,550)
}
