// START DER KONFIGURATION // Bilder ID Namen var bild =[ "teaser", "teaser2", "teaser3"]; // Div ID Namen vor den Bildern var divtag =["wteaser", "wteaser2", "wteaser3"]; // Art der Banner-Anzeige // 1 = alle zusammen // 2 = jeder einzelnd // 1 => z.b. 3 Stk. auf einmal var modus = 1; // Bilder Pfad (Hier ein reroute Pfad) var imgpath = "swappic"; // ENDE DER KONFIGURATION // Blanko Links teaserlink = ["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","",""] var showImgNr = 0; var maxTeaser = divtag.length; var curTeaser = 0; var choosenbanner = 0; function jumper (whatid) { // alert(teaserlink[whatid]); if (!whatid) jump(teaserlink[0]); else jump(teaserlink[whatid]); } function banner(chosen) { var tmp_fullname = imgpath+"/"+banners[chosen][1]; // based on the path to the sponsors folder (previously defined) and the "banners" element refered to by the random number "chosen" a fullname path to a sponsor is created if (document.images) { if (document.layers && divtag!=null) { // for netscape browsers if (modus == 2) eval('document.'+ divtag[curTeaser] +'.document.images["'+bild[curTeaser]+'"].src = '+tmp_fullname) else { for(i=0;i< maxTeaser;i++) { eval('document.'+ divtag[curTeaser] +'.document.images["'+bild[curTeaser]+'"].src = '+tmp_fullname) } } } else { // for other browser - internet explorer if (modus == 2) { document.images[ bild[curTeaser] ].src = tmp_fullname; teaserlink[0] = banners[curTeaser][0]; } else { for(i=0;i< maxTeaser;i++) { if (choosenbanner >= banners.length) choosenbanner = 0; document.images[ bild[i] ].src = imgpath+"/"+banners[choosenbanner][1]; teaserlink[i] = banners[choosenbanner][0]; choosenbanner++; } } } // image in webpage is set to relevant sponsor } url = banners[chosen][0]; // url is set to respective sponsor url } function jump(newurl) { if (!newurl) // opens a new webpage with the following properties and the url of the respective sponsor new_window=window.open("http://"+url,"new_win","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=740,height=580"); if (newurl) // opens a new webpage with the following properties and the url of the respective sponsor new_window=window.open("http://"+newurl,"new_win","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=740,height=580"); } function rotate(time) { // :: Zufall // rand=(banners.length-1)*Math.random(); // chosen=Math.round(rand); // :: reihenfolge showImgNr++; if(showImgNr >= banners.length) showImgNr = 0; chosen = showImgNr; // based on the length of the "banners" array a mathematically random number is chosen which is between 0 and "banners" length // this number is passed to the function banner() banner(chosen); setTimeout('rotate('+time+')',time); if (modus == 2) { curTeaser++; if (curTeaser >= maxTeaser)curTeaser = 0; } // rotates banner, by recalling itself after time set in body tag of webpage has elapsed. rotate() is called from body tag } function video(url) { new_video=window.open("images/"+url,"new_video","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=400,height=300"); } function dn() { return true; }