// URLs of slides
var chemin= "img/";
// Ajouter images ici entre guillemets , separées par des virgules .   
var slideurl=new Array("vign1_cina.jpg",
					   "vign1_chaix.jpg",
					   "vign3_sifas.jpg",
					   "vign4_buro.jpg",
					   "vign5_xxl.jpg",
					   "vign6_azureenerang.jpg",
					   "vign7_detonge.jpg",
					   "vign8_linea.jpg",
					   "vign9_molineo.jpg",
					   "vign10_funiscelli.jpg",
					   "vign11_richelieu.jpg")

// Ajouter les commentaire pour chaque vignette entre guillemets , separées par des virgules .
var slidealt=new Array("INTERIEUR CONSEIL CINNA",
					   "CHAIX DECORATION",
					   "SIFAS",
					   "MEUBLES JK DECORATION",
					   "XXL",
					    "AZUREENNE DE RANGEMENT",
					   "DE TONGE",
					   "LINEA CUISINE",
					   "MOBICLUB MOLINELLO",
					   "MEUBLES FUSCIELLI",
					   "MEUBLES JK DECORATION")

// Liens vers la page avec l'ancre
var lien = new Array("http://www.meublecotedazur.com/cnaem/index.php?page=mag&id=109",
					 "http://www.meublecotedazur.com/cnaem/index.php?page=mag&id=58",
					 "http://www.meublecotedazur.com/cnaem/index.php?page=mag&id=95",
					 "http://www.meublecotedazur.com/cnaem/index.php?page=mag&id=87",
					 "http://www.meublecotedazur.com/cnaem/index.php?page=mag&id=53",
					 "http://www.meublecotedazur.com/cnaem/index.php?page=mag&id=46",
					 "http://www.meublecotedazur.com/cnaem/index.php?page=mag&id=62",
					 "http://www.meublecotedazur.com/cnaem/index.php?page=mag&id=69",
					 "http://www.meublecotedazur.com/cnaem/index.php?page=mag&id=48",
					 "http://www.meublecotedazur.com/cnaem/index.php?page=mag&id=74",
					 "http://www.meublecotedazur.com/cnaem/index.php?page=mag&id=87");


// comments displayed below the slides
var slidecomment=new Array("ali1","ali2","ali0")

// the width of the slideshow (pixels)
var scrollerwidth=1000

// the height of the slideshow (pixels)
var scrollerheight=82

// font-attributes for the comments
var slidefont="Arial"
var slidefontcolor="blue"
var slidefontsize="2"

// do not edit below this line
var allpicturewidth
var distancepictopic=0
var scrollerleft=0
var scrollertop=0
var pause=1
var step=1
var newstep=step
var clipleft,clipright,cliptop,clipbottom
var i_picture=0
var timer
var picturecontent=""
var ns4=document.layers?1:0
var ns6=document.getElementById&&!document.all?1:0
var ie=document.all?1:0

var preloadedimages=new Array()
for (i=0;i<slideurl.length;i++){
	preloadedimages[i]=new Image()
	preloadedimages[i].src=slideurl[i]
}

function init() {
    if (ie) {
		allpicturewidth=document.all.picturediv.offsetWidth
		document.all.picturediv.style.posTop=scrollertop
        document.all.picturediv.style.posLeft=scrollerleft+scrollerwidth
		clipleft=0
		clipright=0
		cliptop=0
		clipbottom=scrollerheight
		document.all.picturediv.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
		document.all.picturediv.style.visibility="visible"
		scrollpicture()
    }
	if (ns6) {
		allpicturewidth=document.getElementById('emptypicturediv').offsetWidth
		document.getElementById('picturediv').style.top=scrollertop
        document.getElementById('picturediv').style.left=scrollerleft+scrollerwidth
		clipleft=0
		clipright=0
		cliptop=0
		clipbottom=scrollerheight
		document.getElementById('picturediv').style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
		document.getElementById('picturediv').style.visibility="visible"
		scrollpicture()
    }
	if (ns4) {
		allpicturewidth=document.roof.document.picturediv.document.width
		document.roof.document.picturediv.top=scrollertop
		document.roof.document.picturediv.left=scrollerleft+scrollerwidth
		document.roof.document.picturediv.clip.left=0
		document.roof.document.picturediv.clip.right=0
		document.roof.document.picturediv.clip.top=0
		document.roof.document.picturediv.clip.bottom=scrollerheight
		document.roof.document.picturediv.visibility="visible"
        scrollpicture()
    }
}

function scrollpicture() {
    if (ie) {
		if (document.all.picturediv.style.posLeft>=scrollerleft-allpicturewidth) {
			document.all.picturediv.style.posLeft-=step
			clipright+=step
			if (clipright>scrollerwidth) {
				clipleft+=step
			}
			document.all.picturediv.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
			var timer=setTimeout("scrollpicture()")
		}
		else {
			resetposition()
		}
	}
	if (ns6) {
		if (parseInt(document.getElementById('picturediv').style.left)>=scrollerleft-allpicturewidth) {
	document.getElementById('picturediv').style.left=parseInt(document.getElementById('picturediv').style.left)-step
			clipright+=step
			if (clipright>scrollerwidth) {
				clipleft+=step
			}
			document.getElementById('picturediv').style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
			var timer=setTimeout("scrollpicture()",pause)
		}
		else {
			resetposition()
		}
	}
   if (ns4) {
		if (document.roof.document.picturediv.left>=scrollerleft-allpicturewidth) {
			document.roof.document.picturediv.left-=step
			document.roof.document.picturediv.clip.right+=step
			if (document.roof.document.picturediv.clip.right>scrollerwidth) {
				document.roof.document.picturediv.clip.left+=step
			}
			var timer=setTimeout("scrollpicture()",pause)
		}
		else {
			resetposition()
		}
	}
}

function onmsover() {
	step=0
}
function onmsout() {
	step=newstep
}

function resetposition() {
	if (ie) {
        document.all.picturediv.style.posLeft=scrollerleft+scrollerwidth
		clipleft=0
		clipright=0
		document.all.picturediv.style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
        scrollpicture()
	}
	if (ns6) {
		allpicturewidth=document.getElementById('emptypicturediv').offsetWidth
        document.getElementById('picturediv').style.left=scrollerleft+scrollerwidth
		clipleft=0
		clipright=0
		document.getElementById('picturediv').style.clip ="rect("+cliptop+" "+clipright+" "+clipbottom+" "+clipleft+")"
        scrollpicture()
	}
	if (ns4) {
		document.roof.document.picturediv.left=scrollerleft+scrollerwidth
		document.roof.document.picturediv.clip.left=0
		document.roof.document.picturediv.clip.right=0
        scrollpicture()
	}
}

picturecontent=""
picturecontent+="<table cellpadding=5 cellspacing=5 border=0>"
picturecontent+="<tr>"
for (i=0;i<=slideurl.length-1;i++) {
	picturecontent+="<td>"
	picturecontent+="<a href='"+lien[i]+"' onMouseOver=\"javascript:onmsover()\" onMouseOut=\"javascript:onmsout()\">"
	picturecontent+="<img src=\""+chemin+slideurl[i]+"\" border=0 Alt='"+slidealt[i]+"'></a>"
	picturecontent+="</td>"
}
picturecontent+="</tr>"
picturecontent+="</tr></table>"

if (ie || ns6) {
	document.write('<div style="position:relative;width:'+scrollerwidth+'px;height:'+scrollerheight+'px;overflow:hidden">')
	document.write('<div id="picturediv" style="position:absolute;top:0px;left:0px;height:'+scrollerheight+'px;visibility:hidden">'+picturecontent+'</div>')
	document.write('</div>')
	document.write('<div id="emptypicturediv" style="position:absolute;top:0px;left:0px;height:'+scrollerheight+'px;visibility:hidden">'+picturecontent+'</div>')
}
