function demarre_P1()
{
for (i=1;i<nbre+1;i++)
{
photo="d"+i;
dphoto=i;
document.getElementById(photo).innerHTML="<div id='"+dphoto+"' style='float:left;position:relative'><img src='"+sortie+"/"+sortie+"-"+i+".jpg' width='125px'><"+"/"+"div>";

}
montre('1');
}


function montre(photo)
{

document.getElementById(photo).parentNode.style.visibility='visible';
document.getElementById(photo).style.left=0+"px";
document.getElementById(photo).style.top=0+"px";
deplace(photo,0,0);
}



function deplace(photo,pos,deb)
{posV=0;
sensH=0;
sensV=0;

if (ch_d.indexOf(","+photo+",")!=-1)
{

document.getElementById(photo).style.left=-120+pos+"px";
sensH=1;
}
if (ch_g.indexOf(","+photo+",")!=-1)
{document.getElementById(photo).style.left=120-pos+"px";
sensH=-1;}
if (ch_b.indexOf(","+photo+",")!=-1)
{posV=pos;
document.getElementById(photo).style.top=-90+pos+"px";
sensV=1;}
if (ch_h.indexOf(","+photo+",")!=-1)
{posV=pos;
document.getElementById(photo).style.top=90-pos+"px";
sensV=-1;}

if ((pos<120)&&(posV<90))
{

pos=pos+2;
setTimeout("deplace("+photo+","+pos+",0)",2);
}

else if(photo<nbre)
{

document.getElementById(photo).style.zIndex=2;
photo=photo+1;
montre(photo);
document.getElementById("Tcharge").style.width=950-(photo/nbre*302)+"px";
document.getElementById("Tcharge").style.left=322+(photo/nbre*302)+"px";
}

if(photo==nbre)
{

setTimeout("fin("+photo+")",1000);
}
}

function fin(photo)
{
document.getElementById(photo).style.zIndex=2;
for (i=1;i<nbre+1;i++)
{
document.getElementById(i).style.left="";
document.getElementById(i).style.top="";
document.getElementById(i).style.position="absolute";
}


}

function consulte(page)
{
eval("window.open('"+page+"','marches')");
}