JavaScripts -> Fenster -> Zufälliges Popup-Fenster mit Rotation

Mit diesem Script kann man eine Zufällige Seite in einem Pop-Up oder Pop-Under erscheinen lassen, welche sich darüberhinaus bei entsprechender Konfiguration des Scriptes auch noch ändert. Einbindung über <body onLoad="adrotate()">

Kompatibilität getestet:
Beispiel Anzeigen >>

Script-Code

<script type="text/javascript">
<!--
// = = ========================================================================== = =
// = = Arsenal Popup Rotator v1.0 (c) 2003 Triple-M / http://www.htmlarsenal.de = =
// = = ========================================================================== = =

// ----------------------------------------------------------------------------------
// -- Dieses Script und viele andere im --
// -- This script and many more in the --
// ----------------------------------------------------------------------------------
// -- HTML ARSENAL - Die Quelle für HTML, JavaScript, PHP --
// -- HTML ARSENAL - Your Source for HTML, JavaScript, PHP --
// ----------------------------------------------------------------------------------
// -- -= http://www.htmlarsenal.de =- --
// ----------------------------------------------------------------------------------

// Sie dürfen dieses Script für nicht-kommerzielle Zwecke nutzen, wenn diese Urheber-Notiz erhalten bleibt.
// You may use this Script for non-commercial causes as long as you include this copyright notice.

// Benutzung / Usage
// =================

// Einfach so: / Just like this:
// <body onLoad="adrotate()"> ...

// Veränderbare Einstellungen / Adjustable Settings
// ================================================

var width=400; // Breite des Popup-Fensters / width of the popup window
var height=300; // Höhe des Popup-Fensters / height of the popup window
var popunder=true; // Fenster unter dem aktiven? (Pop-Under) / window below the active one? (pop-under)
var rotateafter=0; // Automatisches Rotieren nach _ Sekunden (0=nicht aktiv) / Automatically rotate after _ seconds (0=not active)

var address=new Array("/tools/colors/","/tools/crypt/","/tools/popup/"); // Adressen der Popup-Seiten / URLs of popup pages

// Script-Code
// ===========

// Ab hier bitte nichts mehr verändern
// Please do not change anything from here on

var w;

function adrotate() {
  l=((screen.availWidth-width)/2);
  t=((screen.availheight-height)/2)

  w=window.open(address[Math.floor(Math.random()*address.length)],"ad","left="+l+", top="+t+", width="+width+", height="+height);
  w.document.location=address[Math.floor(Math.random()*address.length)];
  w.moveTo(l,t);
  w.resizeTo(width,height);
  if(popunder)window.focus();
  else w.focus();
  if(rotateafter)window.setTimeout("adrotate()",rotateafter*1000);
}

// ----------------------------
// -- Ende / End Script-Code --
// ----------------------------
// -- Popup Rotator --
// -- Author: Triple-M --
// -- www.htmlarsenal.de --
// -- 21.Feb.2004 --
// ----------------------------


//-->
</script>