/** * Fonctions du RedZone ITR */ var zone_page = "/redzone/index.php" function Rand (min, max) { return Math.round (Math.random () * (max - min + 1)) + min; } function DetectEcran() { var Haut, Larg; Haut = screen.height-200; Larg = screen.width; RedZoneWrite(Haut, Larg) } function RedZoneWrite(yTot, xTot) { document.write ("
"); // // document.write (""); document.write (""); //document.write (""); document.write ("\"REDZONE
"); } function RedZoneMove(id) { var x; var y; var x_max = document.body.scrollWidth - 3; var y_max = document.body.scrollHeight - 3; var i = 0; // hor: inclus dans 0 à 72 et 720 à ... // ver: sauf de 0 à 465 do { i++; x = Rand (0, x_max); y = Rand (0, y_max); } while ((x > 72 && x < 720) && (y < 465) && i < 50); if (i == 50) { x = 45; y = 324; } var divStyle = getStyleById (id); if (divStyle) { divStyle.left = x; divStyle.top = y; } } function RedZone () { if (window.location.href.indexOf (zone_page) != -1) { RedZoneMove ("rz"); } } var hex = new Array (16); for (var i = 0; i < 10; i++) { hex [i] = i; } hex [10] = 'a'; hex [11] = 'b'; hex [12] = 'c'; hex [13] = 'd'; hex [14] = 'e'; hex [15] = 'f'; function Hexa (r, g, b) { return "#" + hex [Math.floor (r / 16)] + hex [r % 16] + hex [Math.floor (g / 16)] + hex [g % 16] + hex [Math.floor (b / 16)] + hex [b % 16]; } function BgFader (sR, sG, sB, eR, eG, eB, step) { for (var i = 0; i < step; i++) { var red = Math.floor (sR + ((eR - sR) / step) * i); var green = Math.floor (sG + ((eG - sG) / step) * i); var blue = Math.floor (sB + ((eB - sB) / step) * i); document.bgColor = Hexa (red, green, blue); } } DetectEcran(); //RedZoneWrite ();