/***********************************************
* 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

//Livre confort -> début 16 nov 2011
hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
orderrandom[hasard]=['Annonceur/livre_confort_468x60.gif', 'http://www.handitec.com/affpub.asp?pub=42', 'La première librairie grand caractère !']



hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
orderrandom[hasard]=['Annonceur/heca_2011_468x60.gif', 'http://www.handitec.com/affpub.asp?pub=28', 'Handicap et Emploi au Crédit Agricole']

hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
orderrandom[hasard]=['Annonceur/autonhome_2012_468x60.gif','http://www.handitec.com/affpub.asp?pub=37','Auton\'home Constructeur de maisons individuelles adaptées et accessibles']


//INTEGRANCE FIN 27-12-2011
//hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
//orderrandom[hasard]=['Annonceur/ban_integrance_468x60.gif', 'http://www.handitec.com/affpub.asp?pub=40', 'Intégrance, la mutuelle qui nous rassemble']

//ASCIER FIN 27-12-2011
//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']


//CNAG jusqu'au 22-23 novembre 2011
//hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
//orderrandom[hasard]=['Annonceur/CNAG_2011_bandeau.jpg', 'http://www.handitec.com/affpub.asp?pub=41', '6eme congrès national de l\'animation en Gérontologie']


//FIN RENNES 2011 le 30 sept 2011
//hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
//orderrandom[hasard]=['Annonceur/banniere_rennes_2011.gif','http://www.autonomic-expo.com/ouest/2011/fr/','Salon Autonomic Grand Ouest les 29 et 30 septembre 2011']


//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']

//CAMPAGNE SG 4: Sept-Oct 2010 et novembre
//hasard= parseInt((Math.random() * (higher-lower))) + lower
//orderrandom[hasard]=['http://ad.doubleclick.net/ad/N3021.287522.HANDROIT.COM/B4975026;sz=468x60;ord=[timestamp]?', 'http://ad.doubleclick.net/clk;231957271;56605011;a', 'PASS pour l\'Emploi à la Société Générale']

//OFFERT CAMPAGNE SEMAINE POUR L'EMPLOI
//hasard= parseInt((Math.random() * (higher-lower))) + lower
//orderrandom[hasard]=['Annonceur/2010_Semaine_emploi_468x60.gif', 'http://www.semaine-emploi-handicap.com/', 'La Semaine pour l’emploi des personnes handicapées']

//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']

//AUTONOMIC GRAND EST 2010
//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']

//AUTONOMIC SUD 2011
//hasard= parseInt((Math.random() * (higher-lower))) + lower
//document.write(" - "+hasard);
//orderrandom[hasard]=['Annonceur/banniere_toulouse_2011.gif','http://www.autonomic-expo.com/sud/2011/fr/','Salon Autonomic Sud les 21 et 22 avril 2011']

//HANDIASSUR FIN 6 mars 2011
//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']

//MONUMENTS NATIONAUX campagne 24 sept 2010 .... au 24 octobre FIN réelle le 30 décembre 2010
//hasard= parseInt((Math.random() * (higher-lower))) + lower
//orderrandom[hasard]=['Annonceur/monuments_468x60.gif', 'http://www.handitec.com/affpub.asp?pub=38', 'Découvrez l´opération ´Monuments pour tous´ !']



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=11000

////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

