// 21.02.2002 P Webmaster(): Spr ausgebaut, w_webmaster.php fix
// 03.03.2002 P onError MeinFehler ausgebaut
// 04.03.2002 P de__webmaster.php fix, fname bei Webmaster übergeben

// Netscape Bug beheben
if (!window.wsave) {window.onresize=nsfreshup;wsave=window.innerWidth;hsave=window.innerHeigth;}
function nsfreshup() {
 if (wsave != window.innerWidth || hsave != window.innerHeigth) history.go(0);
return
}

var csep ="&";
var par_string="";

function Go(x) {
 document.forms[0].reset();
 if(x != "nothing") {
  semi = x.indexOf(";");
  if (semi==-1) { top.frames[hauptfenster].location.href=x; }
  else {
  ZweiFrames(x.substr(0,semi),x.substr(semi+1));}
 }
 document.forms[0].elements[0].blur();
return
}
function Booki(pech,glueck) {
 browser = Browser();
 switch (browser) {
  case "IE4":
window.external.AddFavorite(top.frames[hauptfenster].document.url,top.frames[hauptfenster].document.title);
   alert(glueck);break;
  default:alert(pech);break;
}
return
}
function setBgColor(id,farbe) {
browser=Browser();
switch (browser) {
 case "NS4":document.layers[id].document.bgColor = farbe;break;
 default: HoleElement(id).style.backgroundColor = farbe;break;
}
return
}
function ZweiBut(name,datei1,datei2,breite,hoehe,thref,ttarget,tbeschr) {
vorlad1 = new Image();
vorlad1.src =datei1;
vorlad2 = new Image();
vorlad2.src = datei2;
if (tbeschr==null) {tbeschr=name};
ausgabe='<a target="'+ttarget+'" href="'+thref +'"';
ausgabe=ausgabe+' onMouseOver="ButWechsel('+"'"+name+"','"+datei2+"')"+'"';
ausgabe=ausgabe+' onMouseOut="ButWechsel('+"'"+name+"','"+datei1+"')"+'"'+'>';
ausgabe=ausgabe+'<img vspace="0" hspace="0" name="'+name+'" src="'+datei1+'"';
ausgabe=ausgabe+' width="'+breite+'" height="'+hoehe+'" border="0" alt="'+tbeschr+'" title="'+name+'"></a>';
document.write(ausgabe);
return
}
function ButWechsel(bname,bdatei) {
 document[bname].src = bdatei;
return
}
function NoRechteMaus() {
if(window.Event) {document.captureEvents(Event.CLICK | Event.MOUSEDOWN)}
document.onmousedown = rechte_maustaste;
document.onclick     = rechte_maustaste;
return
}
function rechte_maustaste(e) {
text='Sorry, hier ist die rechte Maustaste nicht erlaubt!';
if(window.Event){if(e.which == 3) {alert(text);return false}}
else {if((event.button & 0x2) == 0x2){alert(text);return false}}
return true
}
function Webmaster(html,hoehe) {
 if(html==null) {html='de__webmaster.php'; }
 if(hoehe==null) {hoehe=480}
 tparm=top.frames[menuefenster].location.href.split('?');
 par_dat='hauptf='+tparm[0]+'&'+tparm[1];
NeuesFenster(html+'?'+par_dat,640,hoehe,'x','yes','no','center','middle',html.substr(0,8));
return
}
function Kopf(tziel,tspr)
{if ((tziel != null)&&(tziel !="")) {ich="_"+tziel+"."; spr=tspr;}
 else {
  ich=location.href.match(/_[a-zA-Z0-9]*\./);
  if ((ich == null)||(ich == "")) {ich="home";}
 }
 SParm('url',ich);
 if (top.frames.length == frames_anz)
  {top.frames[menuefenster].location.href='de__menue.php?'+par_string; }
 else
  {top.location.href ='de__index.php?'+par_string;}
return
}
function SParm(feldname,inhalt) {
if (par_string=="") {
 parm=window.location.search.split("?");
 if (parm[1]==null) {par_string="";} else {par_string=parm[1];}
}
parm = par_string.split(feldname+'=');
if(parm[1] == null){par_string = parm[0]+feldname+'='+inhalt+csep}
else {
 rest = parm[1].split(csep);
 par_string = parm[0]+feldname+'='+inhalt+csep;
 for (i=1; i<rest.length-1 ; i++ ) {par_string = par_string + rest[i]+csep;}}
return;
}
function HParm(feldname) {
 parm=window.location.search.split("?");
 if (parm[1]==null) {par_string="";} else {par_string=parm[1];}
 parm = par_string.split(feldname+'=');
 if(parm[1] == null){wert = null} else {wert = parm[1].split(csep)[0];}
return wert;
}
function Browser() {
 if (document.layers) {browser="NS4";}
 if (document.all) {browser="IE4";}
 if (parseInt(navigator.appVersion) >= 5 && navigator.appName == "Netscape")
  {browser="NS6";}
return browser
}
function HoleElement(name) {
browser = Browser();
switch (browser) {
 case "NS4":element=document.layers[name];break;
 case "IE4":element=document.all[name];break;
 case "NS6":element=document.getElementById(name);break;
}
return element
}
function ZweiFrames(URL1,URL2) {
 HParm('url');
 SParm('url',"_"+URL1+".");
 top.frames[menuefenster].location.href='de__menue.php?'+par_string;
 top.frames[hauptfenster].location.href=URL2;
return
}
function NeuesFenster(datei,w,h,art,scroll,resize,align,valign,fname) {
if ((fname==null)||(fname=="")) {fname= "extfenster";}
if ((align==null)||(align=="")) {align= "left";}
if ((valign==null)||(valign=="")) {valign= "top";}
if ((art==null)||(art=="")) {art= "b";}
if ((scroll==null)||(scroll=="")) {scroll= "no";}
if ((resize==null)||(resize=="")) {resize= "no";}
if (art=="b") {
 if ((h==null)||(h=="")) {h=50;}
 if ((w==null)||(w=="")) {w=50;}}
if (art=="h") {datei=datei+".php";}
switch (align) {
 case "left": x = 12;break;
 case "center": x = (screen.width-w)/2;break;
 case "right": x = screen.width-w-12;break;}
switch (valign) {
 case "top": y = 12;break;
 case "middle": y = (screen.height-h)/2;break;
 case "bottom": y = screen.height-h-12;break;}
var option = "toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars="+scroll+",screenX="+x+",screenY="+y+",resizable="+resize+",copyhistory=no,width=" + w +",height="+ h;
window.open(datei,fname,option);
return
}