<!-- Allgemeine Javascript-Funktionen //-->


var myWindow = 0;

<!-- Funktion zum Oeffnen eines Fensters //-->
 function FensterAuf(url,fname,parameter)
   {
     if (myWindow!=0)  {  myWindow.close();  }
     myWindow = window.open(url,fname,parameter);
     myWindow.focus();
   } // END FUNCTION

<!-- Funktion zum Anzeigen der Videoshows //-->
 function Videoshow(kategorie, video)
   {
      verz='';
      if (kategorie != '')  verz = '?kategorie='+kategorie;
      if (video != '')      verz = '?video='+video;

      document.location.href = 'videoshow.php'+verz;
//      F111=window.open('videoshow.php'+verz,'_videoshow','width=960,height=750,resizable=yes,top=15,left=5,scrollbars=yes');
//      F111.focus();
   } // END FUNCTION




  function start_omssinglevideo(omsvideoid, omsplaylistid, omsplayerid)
    {
    if ((omsvideoid!='') && (omsplaylistid!='') && (omsplayerid!=''))
      {
        window.open('video/oms-video-center/index.html?bcpid='+omsplayerid+'&bclid='+omsplaylistid+'&bctid='+omsvideoid, '_self', '');
      } // END IF
    } // END FUNCTION






<!--  Funktionen für die Slideshows  //-->
 function Slideshow(verz)
   {
      if (verz=='')
        { alert('Kein Verzeichnis angegeben!');  }
      else
        {
          F11=window.open('slide_index.php?'+verz,'_slideshow','width=1020,height=750,resizable=yes,top=15,left=3,scrollbars=yes');
          F11.focus();
        }  // END IF
   } // END FUNCTION

 function Slideshowdirekt(verz, picnr)
   {
      if (verz=='')
        { alert('Kein Verzeichnis angegeben!');  }
      else
        {
          F11=window.open('slide_index.php?'+verz+'&picnr='+picnr,'_slideshow','width=1020,height=750,resizable=yes,top=15,left=3,scrollbars=yes');
          F11.focus();
        }  // END IF
   } // END FUNCTION




function div_facebooklikebutton(url)
  {
    if (document.getElementById('div_fblike'))
	  {
//	  alert(url);
	  document.getElementById('div_fblike').innerHTML = '<iframe src="http://www.facebook.com/plugins/like.php?href='+url+'&amp;layout=button_count&amp;show_faces=true&amp;width=100&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>';
	  } // END IF
  } // END FUNCTION



var headdivanzahl = 0;  // Anzahl der Divs
var headdivcounter = 0;  // lfd. Nr. der Divs
var headdivwechsel = 1;  // automatischer Wechsel?

function headerwechsel(nr)
  {
    if ((document.getElementById('div_header')) && (document.getElementById('div-headervorlage-'+nr)))
	  {
	    document.getElementById('div_header').innerHTML = document.getElementById('div-headervorlage-'+nr).innerHTML;
		headdivcounter = nr;
	  } // END IF
  }  // END FUNCTION  


 function headerwechselstart()
  {
    if ((document.getElementById('div_header')) && (headdivanzahl>0))
	  {
		if (headdivcounter==0) { headdivcounter = 1; }
		if (headdivcounter>headdivanzahl) { headdivcounter = 1; }
		headerwechsel(headdivcounter);
		headdivcounter = headdivcounter+1;
		if (headdivwechsel==1)  { window.setTimeout("headerwechselstart()", 4000); }
	  } // END IF
  } // END FUNCTION
  
 function initheaderwechsel(anzahl)
  {
    if ((document.getElementById('div_header')) && (anzahl>0))
	  {
	    headdivanzahl = anzahl;
		headdivcounter = 1;
		headerwechselstart();
	  } // END IF
  }  // END FUNCTION  

function setheaddivwechsel(anaus)
  {
    if ((document.getElementById('div_header')) && (headdivanzahl>0))
	  {
	    headdivwechsel = anaus;
		headdivcounter = headdivcounter-1;
		headerwechselstart();
	  } // END IF
  }  // END FUNCTION  



  
  
  
  
  

function requestAkttitel()
  {
    var req = false;
    if (!req)
      {
          try   {  req = new ActiveXObject("Msxml2.XMLHTTP"); }
          catch(e)
          {
              try { req = new ActiveXObject("Microsoft.XMLHTTP");   }
              catch(e)  { req = null;   }
          }  // END CATCH
      } // END IF

    // Mozilla, Opera und Safari
    if (!req  && typeof XMLHttpRequest != 'undefined') {  req = new XMLHttpRequest();    }

    req.onreadystatechange = function()
      {
        var responseakttitel = 'tt';
            if ((req.readyState == 4) && (req.status == 200))
              {
                var responseakttitel = (req.responseText);
                document.getElementById('div_akttitel').innerHTML = responseakttitel;
                if (responseakttitel!='')  { document.getElementById('div_akttitel').style.display='block'; }
                else { document.getElementById('div_akttitel').style.display='none'; }
              } else {
//                document.getElementById('div_akttitel').style.display='none';
              }  // END IF
    };  // END FUNCTION

//    req.open('POST', 'http://intra/neuesawseite/aktuellertitel/saw.txt');
    req.open('POST', 'get_akttitelsaw.php');
    req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    req.send();


    // Aktualisierung aller 5 Sek.
    window.setTimeout("requestAkttitel()", 5000);

  }  // END FUNCTION
