/***********************************************
* Flexi Slideshow- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var orderrandom=new Array()
var variableslide=new Array()


var lower = 2
var higher = 50

var hasard =0

//variableslide[x]=["path to image", "OPTIONAL link for image", "OPTIONAL text description (supports HTML tags)"]
//bandeau_credit_agricole.gif
//CAMPAGNE SG 1: variableslide[0]=['http://ad.fr.doubleclick.net/ad/N4022.handitec.mcfr/B3480142;sz=468x60;ord=[timestamp]?', 'http://ad.fr.doubleclick.net/jump/N4022.handitec.mcfr/B3480142;sz=468x60;ord=[timestamp]?', 'Handicap et Emploi à la Société Générale']
//CAMPAGNE SG 2: http://careers.socgen.com/groupe/fr/decouvrir/mission-handicap.html

//CAMPAGNE SG 3: http://s0b.bluestreak.com/ix.e?hr&s=8041357 (du 3 mars au 3 juin 2010) FERMEE
//hasard= parseInt((Math.random() * (higher-lower))) + lower
//orderrandom[hasard]=['Annonceur/SG_2010_mars_468-60.gif', 'http://s0b.bluestreak.com/ix.e?hr&s=8041357', 'PASS pour l\'Emploi à la Société Générale']


hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
orderrandom[hasard]=['Annonceur/Ascier_09_bandeau_468_60_ascier.gif', 'http://www.handitec.com/affpub.asp?pub=33', 'Ascier']

hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
orderrandom[hasard]=['Annonceur/Bloc_HECA_anim_468x60.gif', 'http://www.handitec.com/affpub.asp?pub=28', 'Handicap et Emploi au Crédit Agricole']

//SEP as du ciné desactivée le 28/4/10
//variableslide[1]=['Annonceur/sepaducine_2010_468x60.gif','http://www.handitec.com/affpub.asp?pub=29','SEPasducine mais la sclérose en plaques']

//FERMEE LE 3 MAI 2010
//hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
//orderrandom[hasard]=['Annonceur/boutiq_handicap_468x60.gif','http://www.handroit.com/Affpub.asp?pub=34','Handi-access, la boutique du handicap']
//variableslide[1]=['http://ad.fr.doubleclick.net/ad/N4022.handitec.mcfr/B3889003;sz=468x60;ord=[timestamp]?', 'http://ad.fr.doubleclick.net/jump/N4022.handitec.mcfr/B3889003;sz=468x60;ord=[timestamp]?', 'Handicap et Emploi à la Société Générale']

hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
orderrandom[hasard]=['Annonceur/handiassur_pub.gif', 'http://www.handitec.com/affpub.asp?pub=3', 'Handi Assur']

//hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
//orderrandom[hasard]=['Annonceur/Banniere-Paris-2010.gif','http://www.autonomic-expo.com/paris/2010/fr/','Salon Autonomic Paris, 9-10 et 11 juin 2010']


hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
orderrandom[hasard]=['Annonceur/autonhome_ban_468x60.gif','http://www.handitec.com/affpub.asp?pub=37','Auton\'home Constructeur de maisons individuelles adaptées et accessibles']


hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
orderrandom[hasard]=['Annonceur/banniere_metz_2010.gif','http://www.autonomic-expo.com/est/2010/fr/','Salon Autonomic Grand Est les 16 et 17 septembre 2010']


var newordre=0;
//REORDONNE de 0 à n les vrais values
for (o=0;o<51;o++) {
	//document.write(" - "+orderrandom[o]);
	if (orderrandom[o]) {
		variableslide[newordre]=orderrandom[o]
		newordre++
	}
}


//configure the below 3 variables to set the dimension/background color of the slideshow

var slidewidth='468px' //set to width of LARGEST image in your slideshow
var slideheight='68px' //set to height of LARGEST iamge in your slideshow, plus any text description
var slidebgcolor='#FFFFFF'

//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=10000

////Do not edit pass this line////////////////

var ie=document.all
var dom=document.getElementById

for (i=0;i<variableslide.length;i++){
var cacheimage=new Image()
cacheimage.src=variableslide[i][0]
}

var currentslide=0

function rotateimages(){
contentcontainer='<center>'
if (variableslide[currentslide][1]!="")
contentcontainer+='<a title="'+variableslide[currentslide][2]+'" target="_blank" href="'+variableslide[currentslide][1]+'">'
contentcontainer+='<img src="'+variableslide[currentslide][0]+'" border="0" vspace="3">'
if (variableslide[currentslide][1]!="")
contentcontainer+='</a>'
contentcontainer+='</center>'


//if (variableslide[currentslide][2]!="")
//contentcontainer+=variableslide[currentslide][2]

if (document.layers){
crossrotateobj.document.write(contentcontainer)
crossrotateobj.document.close()
}
else if (ie||dom)
crossrotateobj.innerHTML=contentcontainer
if (currentslide==variableslide.length-1) currentslide=0
else currentslide++
setTimeout("rotateimages()",slidedelay)
}

if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')

function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : ie? document.all.slidedom : document.slidensmain.document.slidenssub
if (document.layers)
document.slidensmain.visibility="show"
rotateimages()
}

if (ie||dom)
start_slider()
else if (document.layers)
window.onload=start_slider
