/* feelLucky.js */ 
/* ---( http://www.webdeveloper.com/animations/Holiday.html )--- */ 
/* ---( http://javascript.internet.com/navigation/feeling-lucky.html )--- */ 
/* ---( http://www.internet.com/sections/webdev.html )--- */ 
/* Paste this code into an external JavaScript file named: feelLucky.js */
/* This script and many more are available free online at */ 
/* The JavaScript Source :: http://javascript.internet.com */ 
/* Created by: Will Bontrager :: http://www.bontragerconnection.com/ */ 
// Leave next line as is. 
var Lucky = new Array();
// The cookie to keep track of which "lucky" destinations 
// have already been visited needs a name. Okay to change
//  the cookie name. 
var FeelLuckyCookieName = "FeelLuckyCookie";
// When a "lucky" destination has been decided upon, shall 
// the browser open a new window with the desitination URL?
// (Specify "y" or "yes" if yes new window; otherwise "".)
var NewWindow = "y";
// Specify your lucky destination URLs here. The first is 
// assigned to Lucky[0], the next to Lucky[1], and so 
// forth, in numerical sequence -- as many as you want.
Lucky[0] = "http://www.2xmoinscher.com/?Coupon=4321";
Lucky[1] = "http://astore.amazon.fr/cddvdnewsco0a-21";
Lucky[2] = "http://www.ticketnet.fr/shop/fr/thematique.asp?genre=FE&idtier=2096738";
Lucky[3] = "http://clic.reussissonsensemble.fr/click.asp?ref=364859&site=4439&type=b65&bnb=65";
Lucky[4] = "http://clic.reussissonsensemble.fr/click.asp?ref=364859&site=4401&type=text&tnb=9";
Lucky[5] = "http://action.metaffiliation.com/suivi.php?mclic=S37EF4DCED121";
Lucky[6] = "http://action.metaffiliation.com/suivi.php?mclic=S417B94DCED162";
Lucky[7] = "http://action.metaffiliation.com/suivi.php?mclic=S417864DCED121";
Lucky[8] = "http://www.cestpascher.com/cadeaux.html";
Lucky[9] = "http://www.cestpascher.com/chansons.html";
Lucky[10] = "http://www.cestpascher.com/jouets.html";
Lucky[11] = "http://www.cestpascher.com/jouets3ans.html";
Lucky[12] = "http://www.cestpascher.com/voyages.html";
// No additional JavaScript customizations are required. //
var TabChar = String.fromCharCode(9);
var CurrentCookie = '';
function GetLuckyCookie() {
  var cookiecontent = '';
  if(document.cookie.length > 0) {
  	 var cookiename = FeelLuckyCookieName + '=';
  	 var cookiebegin = document.cookie.indexOf(cookiename);
  	 var cookieend = 0;
  	 if(cookiebegin > -1) {
     	cookiebegin  += cookiename.length;
     	cookieend = document.cookie.indexOf(";",cookiebegin);
     	if(cookieend < cookiebegin) { cookieend = document.cookie.length; }
     	cookiecontent = document.cookie.substring(cookiebegin,cookieend);
    }
  }
  return cookiecontent;
}
function PutLuckyCookie(value) {
  if(CurrentCookie.length > 0) { value = CurrentCookie + TabChar + value; }
  value = escape(value);
  document.cookie = FeelLuckyCookieName + "=" + value;
}
function YesMakeMeLucky() { 
  CurrentCookie = GetLuckyCookie();
  CurrentCookie = unescape(CurrentCookie);
  if(CurrentCookie == '.') { CurrentCookie = ''; }
  var LuckyVisitedList = CurrentCookie.split(TabChar);
  if(LuckyVisitedList.length >= Lucky.length) {
   	document.cookie = FeelLuckyCookieName + "=.";
   	CurrentCookie = '';
   	LuckyVisitedList = Array();
  }
  for(var i = 0; i < LuckyVisitedList.length; i++) { Lucky[LuckyVisitedList[i]] = ''; }
  var LuckyL = new Array();
  for(var i = 0; i < Lucky.length; i++) {
   	if(Lucky[i].length > 0) { LuckyL.push('' + i + TabChar + Lucky[i]); }
  }
  var LuckyDestinationNumber = 0;
  if(LuckyL.length > 1) { LuckyDestinationNumber = Math.ceil((Math.random() * LuckyL.length) - 1); }
  var LuckyNumberPlace = new Array();
  LuckyNumberPlace = LuckyL[LuckyDestinationNumber].split(TabChar);
  PutLuckyCookie(LuckyNumberPlace[0]);
  NewWindow = NewWindow.toLowerCase();
  if(NewWindow.substr(0,1) == "y") { window.open(LuckyNumberPlace[1]); }
  else { document.location = LuckyNumberPlace[1]; }
}
/* --- FIN SCRIPT feelLucky.js */ 
// 
/* --- DEBUT SCRIPT RAMDOM --- */ 
/* ---( http://javascriptsource.com )--- */ 
/* ---( http://www.webdeveloper.com/animations/Holiday.html )--- */ 
/* This script and many more are available free online at */ 
/* The JavaScript Source!! http://javascript.internet.com */ 
/* Original:  jsCode.com */ 
/* Web Site:  http://jscode.com */ 
/* STEP TWO: Copy this code into the BODY of your HTML document  */ 
/* This script and many more are available free online at */ 
/* The JavaScript Source!! http://javascript.internet.com */ 
/* Original:  jsCode.com */ 
/* Web Site:  http://jscode.com */ 
/* <script language="JavaScript"> */ 
// ==============================================
// Copyright 2003 by jsCode.com
// Source: jsCode.com
// Author: etLux
// Free for all; but please leave in the header.
// ==============================================
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array. Rememeber
// to increment the theImages[x] index!
theImages[0] = 'http://www.parisgratuit.com/images-xmas/xmas-wreath1.gif'
theImages[1] = 'http://www.parisgratuit.com/images-xmas/xmas-tree2.gif'
theImages[2] = 'http://www.parisgratuit.com/images-xmas/xmas-ornamentA.gif'
theImages[3] = 'http://www.parisgratuit.com/images-xmas/xmas-catsantahat.gif'
// ======================================
// do not change anything below this line
// ======================================
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function LuckyshowImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
/* --- DEBUT SCRIPT RAMDOM --- */ 