
window.onerror = null;
window.defaultStatus="";

// Browserabfrage
NN=((navigator.appName=='Netscape')&&(parseInt(navigator.appVersion)==4))?true:false;
OP=window.opera;
DHTML=(document.getElementById||document.all||document.layers);

noDHTML();

// Nav-Repositionierung/Reload nach Resize
function reloadPage(init) {
    if((NN)&&(init==true)) {
        document.pgW=innerWidth;
        document.pgH=innerHeight;
        onresize=reloadPage;
    } else if((NN)&&(innerWidth!=document.pgW||innerHeight!=document.pgH)) {
        location.reload();
    } else {
        onresize=reloadPage;
//      myOnResizeFunction();
    }
}

// Ausgabe bei nicht-DHTML-tauglichen Browsern
function noDHTML() {
    if (!DHTML) {
    	self.location="http://www.s-e-i-n.ch/keinDhtml.htm";
    }
}
// Navigation-Swap
function navSwapOver(image) {
    imageOver = eval("auswahl_b.src")
    if (document.layers) {
       	document.images[""+image].src = imageOver;
    } else {
        document[""+image].src = imageOver;
    }
}
function navSwapOut(image) {
    imageOut = eval("auswahl_a.src")
    if (document.layers) {
       	document.images[""+image].src = imageOut;
    } else {
        document[""+image].src = imageOut;
    }
}
// Image-Swap
function imageSwapOver(image) {
    imageOver = eval(image+"_b.src")
    if (document.layers) {
       	document.images[""+image].src = imageOver;
    } else {
        document[""+image].src = imageOver;
    }
}
function imageSwapOut(image) {
    imageOut = eval(image+"_a.src")
    if (document.layers) {
       	document.images[""+image].src = imageOut;
    } else {
        document[""+image].src = imageOut;
    }
}
function openWindow(what, breite, hoehe){
      WindowX = (screen.width/2)-(breite/2)
      WindowY = (screen.height/2)-(hoehe/2)
      window.open('photos/'+what, 'sein', 'toolbar=no,resizable=no,scrollbars=no, width='+breite+',height='+hoehe+',screenY='+WindowY+',top='+WindowY+',left='+WindowX+',screenX='+WindowX).focus();
}
function openTextWindow(what, breite, hoehe){
	  if(musikWindow){
	  	if(!musikWindow.closed){
		   musikWindow.focus();
		} 
      }
      var WindowX = (screen.width/2)-(breite/2)
      var WindowY = (screen.height/2)-(hoehe/2)
      textWindow = window.open('texte/'+what, 'sein', 'toolbar=no,resizable=yes,scrollbars=yes, dependent=yes, width='+breite+',height='+hoehe+',screenY='+WindowY+',top='+WindowY+',left='+WindowX+',screenX='+WindowX);
	  textWindow.focus();
} 
function openImageWindow(what, breite, hoehe){
	  if(musikWindow){
	  	if(!musikWindow.closed){
		   musikWindow.focus();
		} 
      }
      var WindowX = (screen.width/2)-(breite/2)
      var WindowY = (screen.height/2)-(hoehe/2)
      textWindow = window.open('bilder/'+what, 'image', 'toolbar=no,resizable=yes,scrollbars=yes, dependent=yes, width='+breite+',height='+hoehe+',screenY='+WindowY+',top='+WindowY+',left='+WindowX+',screenX='+WindowX);
	  textWindow.focus();
} 
function openVideoWindow(what, breite, hoehe){
      var WindowX = (screen.width/2)-(breite/2)
      var WindowY = (screen.height/2)-(hoehe/2)
      textWindow = window.open('video/'+what, 'video', 'toolbar=no,resizable=no,scrollbars=no, dependent=yes, width='+breite+',height='+hoehe+',screenY='+WindowY+',top='+WindowY+',left='+WindowX+',screenX='+WindowX);
	  textWindow.focus();
} 
function playSong(what){
		if(textWindow){
		  if(!textWindow.closed){
		     textWindow.focus();
		  }
  	   }
	  var breite = 196;
	  var hoehe = 120;
      var WindowX = (screen.width/2)+234
      var WindowY = (screen.height/2)-(hoehe/2)
      musikWindow = window.open('musik/grammophon.htm?'+what, 'musik', 'toolbar=no,resizable=no,scrollbars=no, dependent=yes, width='+breite+',height='+hoehe+',screenY='+WindowY+',top='+WindowY+',left='+WindowX+',screenX='+WindowX);  
	  musikWindow.focus();
}