PicPath = '/bohtv/'; Channel = new Array('adverts','comic','comedy','talk','music','action','xxx'); Pictures = new Array(Channel.length); Pictures[0] = new Array('4.gif','37.jpg','63.jpg','58.jpg','44.jpg','21.gif','45.jpg','55.jpg','19.jpg','42.jpg','29.jpg','87.jpg','50.jpg','75.jpg','13.jpg','96.jpg','12.gif','52.jpg','89.jpg','20.jpg','30.jpg','31.jpg','90.jpg','54.jpg','32.jpg','66.jpg','69.jpg','3.gif','36.jpg','59.jpg','23.jpg','33.jpg','83.jpg','78.jpg','26.jpg','48.jpg','67.jpg','18.gif','64.jpg','60.jpg','99.jpg','61.jpg','41.jpg','73.jpg','71.jpg','6.jpg','92.jpg','46.jpg','95.jpg','10.jpg','74.jpg','76.jpg','16.gif','28.jpg','47.jpg','43.jpg','100.gif','7.gif','17.gif','88.jpg','24.jpg','91.jpg','98.jpg','22.jpg','1.jpg','77.jpg','56.jpg','72.jpg','93.jpg','25.jpg','9.jpg','5.gif','94.jpg','38.jpg','2.gif','86.jpg','79.jpg','11.jpg','27.jpg','70.jpg','51.jpg','97.jpg','40.jpg','57.jpg','39.jpg','82.jpg','34.jpg','35.jpg','49.jpg','81.jpg','85.jpg','14.gif','62.jpg','68.jpg','65.jpg','80.jpg','15.gif','84.jpg','8.jpg','53.jpg'); Pictures[1] = new Array('4.gif','14.jpg','20.jpg','9.gif','23.jpg','5.jpg','18.gif','2.jpg','6.gif','3.jpg','12.jpg','16.jpg','8.gif','15.jpg','7.gif','17.gif','24.jpg','13.gif','22.jpg','25.jpg','10.gif','11.jpg','21.jpg','19.gif','1.gif'); Pictures[2] = new Array('7.jpg','14.jpg','13.jpg','5.jpg','6.jpg','2.jpg','4.jpg','10.jpg','3.jpg','12.jpg','16.jpg','15.jpg','1.jpg','9.jpg','11.jpg','8.jpg'); Pictures[3] = new Array('7.jpg','13.jpg','5.jpg','6.jpg','2.jpg','4.jpg','10.jpg','3.jpg','12.jpg','1.jpg','9.jpg','11.jpg','8.jpg'); Pictures[4] = new Array('7.jpg','14.jpg','13.jpg','17.jpg','5.jpg','6.jpg','2.jpg','4.jpg','10.jpg','3.jpg','12.jpg','16.jpg','15.jpg','1.jpg','9.jpg','11.jpg','8.jpg'); Pictures[5] = new Array('7.jpg','14.jpg','19.jpg','13.jpg','20.jpg','17.jpg','18.jpg','23.jpg','26.jpg','5.jpg','6.jpg','2.jpg','4.jpg','10.jpg','3.jpg','12.jpg','16.jpg','15.jpg','24.jpg','22.jpg','1.jpg','25.jpg','9.jpg','11.jpg','21.jpg','8.jpg'); Pictures[6] = new Array('37.jpg','7.jpg','63.jpg','58.jpg','44.jpg','14.jpg','45.jpg','55.jpg','19.jpg','42.jpg','29.jpg','50.jpg','13.jpg','52.jpg','20.jpg','30.jpg','31.jpg','17.jpg','54.jpg','18.jpg','32.jpg','66.jpg','69.jpg','36.jpg','59.jpg','23.jpg','33.jpg','26.jpg','48.jpg','67.jpg','5.jpg','64.jpg','60.jpg','61.jpg','41.jpg','71.jpg','6.jpg','2.jpg','4.jpg','46.jpg','10.jpg','3.jpg','28.jpg','47.jpg','12.jpg','16.jpg','43.jpg','15.jpg','24.jpg','22.jpg','1.jpg','56.jpg','72.jpg','25.jpg','9.jpg','38.jpg','11.jpg','27.jpg','70.jpg','21.jpg','51.jpg','40.jpg','57.jpg','39.jpg','34.jpg','35.jpg','49.jpg','62.jpg','68.jpg','65.jpg','8.jpg','53.jpg'); // Configuration //////////// Interval = 4; // Sekunden zwischen den Bildern MaxPics = 15; // Anzahl der Bilder zwischen der Werbung MaxAdv = 3; // Anzahl der Werbe-Bilder MaxCounter = 3; // Anzahl der Klicks auf einen Channel, nach denen die Seite der GEZ aufgerufen wird StartPic = "bohtv.gif"; // TV-Startbild OffPic = "tv_off_sequence.gif"; // TV ausgeschaltet ChBtnOff = "btnchoff.gif"; // Bild für Programm-Button Off ChBtnOn = "btnchon.gif"; // Bild für Programm-Button On TVBtnOff = "btntvoff.gif"; // Bild für TV-Button Off TVBtnOn = "btntvon.gif"; // Bild für TV-Button On ///////////////////////////// TVOnOff = 0; // beim Starten ist der Monitor noch aus // StartIt // OnOffTV(); // Initialization function init() { TVOnOff = 1; // Fernseher eingeschaltet CountPics = 0; // Anzahl der gezeigten Bilder Adv = 0; // Werbung aktiv Counter = 0; // Zähler, wie oft ein Channel-Button gedrückt wurde LastPic=0; // Letztes Bild war nicht aus dieser Serie ActivePic = 0; // aktives Bild ActiveChannel = Math.round( (Math.random() * (Channel.length - 1)) +0.5); // Aktiver Kanal OldChannel = 0; // Alter Kanal } // And now - the Code // function BoH_TV() { if(Adv==0 && CountPics>=MaxPics) { Adv=1; CountPics=0; LastPic=0; } if(Adv==1 && CountPics>=MaxAdv) { Adv=0; CountPics=0; LastPic=0; } ChooseChannel=(Adv==0)?ActiveChannel:0; i=Math.round( (Math.random() * (Pictures[ChooseChannel].length - LastPic)) -0.5); LastPic=1; if(i>=ActivePic && CountPics>0) { i++; } document.TV.src=PicPath + Channel[ChooseChannel] + "/" + Pictures[ChooseChannel][i]; CountPics++; ActivateButton(); ActivePic=i; } function ActivateButton() { if(OldChannel!=ActiveChannel) { if(OldChannel>0) { BtnPic=eval("document.P" + OldChannel +".src='" + PicPath + ChBtnOff + "'"); } if(ActiveChannel>0) { BtnPic=eval("document.P" + ActiveChannel +".src='" + PicPath + ChBtnOn + "'"); } OldChannel=ActiveChannel; } } function ChangeChannel(Channel) { if(TVOnOff==1) { Counter++; if(ActiveChannel!=Channel) { window.clearInterval(TVTimer); ActiveChannel=Channel; BoH_TV(); TVTimer=window.setInterval('BoH_TV()',Interval*1000); Counter=1; } if(Counter==MaxCounter) { open("http://www.gez.de","GEZ"); Counter=1; } } } function OnOffTV() { if(TVOnOff==1) { TVOnOff=0; window.clearInterval(TVTimer); ActiveChannel=0; ActivateButton(); document.OnOff.src = PicPath + TVBtnOff; document.TV.src = PicPath + OffPic; } else { document.TV.src = PicPath + StartPic; document.OnOff.src = PicPath + TVBtnOn; init(); TVTimer=window.setInterval('BoH_TV()',Interval*1000); } }