var bild="teaser"; var divtag="wteaser"; var ieNummer=2; var imgpath = "swappic"; var showImgNr = 0; 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 eval('document.'+divtag+'.document.images["'+bild+'"].src = '+tmp_fullname) } else { // for other browser - internet explorer document.images[bild].src = tmp_fullname; } // image in webpage is set to relevant sponsor } url = banners[chosen][0]; // url is set to respective sponsor url } function firstBannerLoop(pick) { var tmp_fname = imgpath+"/"+toArray[pick][1]; if (document.images) { if (document.layers && divtag!=null) { // for netscape browsers eval('document.'+divtag+'.document.images["'+bild+'"].src = '+tmp_fname); } else { // for other browser - internet explorer document.images[bild].src = tmp_fname; } // image in webpage is set to relevant sponsor } url = toArray[pick][0]; // url is set to respective sponsor url } function jump() { // 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"); } function rotate(time) { if(toArray.length>0) { // :: Zufall // rand=(toArray.length-1)*Math.random(); // pick=Math.round(rand); // :: reihenfolge showImgNr++; if(showImgNr >= toArray.length) showImgNr = 0; pick = showImgNr; firstBannerLoop(pick); toArray.splice(pick,1); } else { // :: 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); // rotates banner, by recalling itself after time set in body tag of webpage has elapsed. rotate() is called from body tag } function dn() { return true; }