   function imageError(theImage) {
var msg = "Error: A file failed to load from URL:\n" + theImage.src + "\n\n Please try to reload.";
alert(msg);
chargement();
}
function testnavig(){
version=0;
if(navigator.appName ==  "Netscape")
{
netsc = true;
if (navigator.userAgent.indexOf("Netscape")!=-1){
navnetscape = true;
temp=navigator.userAgent.split("Netscape/");
version=parseFloat(temp[1]);
if (version>=7.0)
net7 = true;
}
if (navigator.userAgent.indexOf("Firefox")!=-1){
navfirefox = true;
temp=navigator.userAgent.split("Firefox/");
version=parseFloat(temp[1]);
if (version>=1.0)
fire1 = true;
}
}
if (navigator.appVersion.indexOf("MSIE")!=-1){
navie = true;
temp=navigator.appVersion.split("MSIE");
version=parseFloat(temp[1])
if (version>=5.5)
{
ie55 = true;
}
else
ie5 = true;
}
else
{
netsc = true;
}
}
function apparone(num){
var selectedItem=num;
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem).filters[0].Apply();
document.getElementById(selectedItem).style.visibility="visible";
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem).filters[0].Play();
document.getElementById("o"+selectedItem).style.visibility="visible";
NumIndex = NumIndex + 1;
document.getElementById("o"+selectedItem).style.zIndex = NumIndex;
}
function apparombre(num){
var selectedItem=num
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem+"000").filters[0].Apply();
document.getElementById(selectedItem+"000").style.visibility="visible";
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem+"000").filters[0].Play();
document.getElementById("o"+selectedItem+"000").style.visibility="visible";
document.getElementById("o"+selectedItem+"000").style.zIndex=NumIndex-1;
}
function apparzone(num){
var selectedItem=num
document.getElementById(selectedItem).style.visibility="visible";
document.getElementById("o"+selectedItem).style.visibility="visible";
NumIndex = NumIndex + 1;
document.getElementById("o"+selectedItem).style.zIndex=NumIndex;
}
function apparvideo(num){
var selectedItem=num
if ((ie55 == true) && (ie5 == false))
document.getElementById("t"+selectedItem).endElement();
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem).filters[0].Apply();
document.getElementById(selectedItem).style.visibility="visible";
document.getElementById("o"+selectedItem).style.visibility="visible";
if ((ie55 == true) && (ie5 == false))
document.getElementById("t"+selectedItem).mute="false";
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem).filters[0].Play();
if ((ie55 == true) && (ie5 == false))
document.getElementById("t"+selectedItem).beginElement();
NumIndex = NumIndex + 1;
document.getElementById("o"+selectedItem).style.zIndex=NumIndex;
}
function apparson(num){
var selectedItem=num
if ((ie55 == true) && (ie5 == false))
document.getElementById("t"+selectedItem).endElement();
if ((ie55 == true) && (ie5 == false))
document.getElementById("t"+selectedItem).mute="false";
if ((ie55 == true) && (ie5 == false))
document.getElementById("t"+selectedItem).beginElement();
else
document.getElementById("t"+selectedItem).Play();
}
function apparvideoanim(num){
var selectedItem=num
document.getElementById(selectedItem).style.visibility="visible";
document.getElementById("o"+selectedItem).style.visibility="visible";
if ((ie55 == true) && (ie5 == false))
document.getElementById("t"+selectedItem).endElement();
if ((ie55 == true) && (ie5 == false))
document.getElementById("t"+selectedItem).mute="false";
if ((ie55 == true) && (ie5 == false))
document.getElementById("t"+selectedItem).beginElement();
NumIndex = NumIndex + 1;
document.getElementById("o"+selectedItem).style.zIndex=NumIndex;
}
function apparvideo2(num){
var selectedItem=num;
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem).filters[0].Apply();
document.getElementById(selectedItem).style.visibility="visible";
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem).filters[0].Play();
document.getElementById("o"+selectedItem).style.visibility="visible";
document.getElementById("t"+selectedItem).Play();
NumIndex = NumIndex + 1;
document.getElementById("o"+selectedItem).style.zIndex=NumIndex;
}
function disparvideo(num){
var selectedItem=num;
var typvid= eval("typevideo" + selectedItem);
if (typvid == 0)
document.getElementById("t"+selectedItem).endElement()
else
document.getElementById("t"+selectedItem).Stop();
}
function apparanim(num,p){
var selectedItem=num
document.getElementById(selectedItem).style.visibility="visible";
document.getElementById("o"+selectedItem).style.visibility="visible";
if ((ie55 == true) && (ie5 == false))
document.getElementById("v"+selectedItem).endElement();
if ((ie55 == true) && (ie5 == false))
document.getElementById("v"+selectedItem).path=p;
if ((ie55 == true) && (ie5 == false))
document.getElementById("v"+selectedItem).beginElement();
NumIndex = NumIndex + 1;
document.getElementById("o"+selectedItem).style.zIndex=NumIndex;
}
function disparone(num){
var selectedItem=num
if (document.getElementById("o"+selectedItem))
{
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem).filters[0].Apply();
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem).filters[0].Play();
document.getElementById(selectedItem).style.visibility="hidden";
document.getElementById("o"+selectedItem).style.visibility="hidden";
document.getElementById("o"+selectedItem).style.zIndex=0;
}
}
function disparvite(num){
var selectedItem=num
if (document.getElementById("o"+selectedItem))
{
document.getElementById(selectedItem).style.visibility="hidden";
document.getElementById("o"+selectedItem).style.visibility="hidden";
document.getElementById("o"+selectedItem).style.zIndex=0;
}
}
function apparvite(num){
var selectedItem=num
if (document.getElementById("o"+selectedItem))
{
document.getElementById(selectedItem).style.visibility="visible";
document.getElementById("o"+selectedItem).style.visibility="visible";
NumIndex = NumIndex + 1;
document.getElementById("o"+selectedItem).style.zIndex=NumIndex;
}
}
function DisparTout(){
for (i=1;i<=3100;i++){
if (document.getElementById("o"+i))
{
document.getElementById(i).style.visibility="hidden";
document.getElementById("o"+i).style.visibility="hidden";
document.getElementById("o"+i).style.zIndex=0;
}
if (document.getElementById("o"+i+"000"))
{
document.getElementById(i+"000").style.visibility="hidden";
document.getElementById("o"+i+"000").style.visibility="hidden";
document.getElementById("o"+i+"000").style.zIndex=0;
}
}
}
function TraiteMO(num,col){
var selectedItem=num
var couleur=col
if (document.getElementById("o"+selectedItem))
{
document.getElementById(selectedItem).style.cursor = "pointer";
document.getElementById(selectedItem).style.color = "#"+couleur;
}
}
function TraiteMOimage(p,c){
if (finjouer == true)
{
var nompage = "";
var wholeurl = window.location.href;
var x = wholeurl.length;
while((wholeurl.substring(x,x-1)) != "/"){ x--; } clipstart = x;
nompage = wholeurl.substring(wholeurl.length,clipstart);
var whereis = nompage.indexOf("?");
if (whereis != -1)
{
var nompage2="";
nompage2 = nompage.substring(0,whereis);
nompage = nompage2;
}
if (nompage == p)
{
if (c == "1")
GoToCOL1(1);
if (c == "2")
GoToCOL2(1);
if (c == "3")
GoToCOL3(1);
if (c == "4")
GoToCOL4(1);
if (c == "5")
GoToCOL5(1);
if (c == "6")
GoToCOL6(1);
if (c == "7")
GoToCOL7(1);
if (c == "8")
GoToCOL8(1);
if (c == "9")
GoToCOL9(1);
if (c == "10")
GoToCOL10(1);
if (c == "11")
GoToCOL11(1);
if (c == "12")
GoToCOL12(1);
if (c == "13")
GoToCOL13(1);
if (c == "14")
GoToCOL14(1);
if (c == "15")
GoToCOL15(1);
if (c == "16")
GoToCOL16(1);
if (c == "17")
GoToCOL17(1);
if (c == "18")
GoToCOL18(1);
if (c == "19")
GoToCOL19(1);
if (c == "20")
GoToCOL20(1);
if (c == "21")
GoToCOL21(1);
if (c == "22")
GoToCOL22(1);
if (c == "23")
GoToCOL23(1);
if (c == "24")
GoToCOL24(1);
if (c == "25")
GoToCOL25(1);
if (c == "26")
GoToCOL26(1);
if (c == "27")
GoToCOL27(1);
if (c == "28")
GoToCOL28(1);
if (c == "29")
GoToCOL29(1);
if (c == "30")
GoToCOL30(1);
if (c == "31")
GoToCOL31(1);
if (c == "32")
GoToCOL32(1);
if (c == "33")
GoToCOL33(1);
if (c == "34")
GoToCOL34(1);
if (c == "35")
GoToCOL35(1);
if (c == "36")
GoToCOL36(1);
if (c == "37")
GoToCOL37(1);
if (c == "38")
GoToCOL38(1);
if (c == "39")
GoToCOL39(1);
if (c == "40")
GoToCOL40(1);
if (c == "41")
GoToCOL41(1);
if (c == "42")
GoToCOL42(1);
if (c == "43")
GoToCOL43(1);
if (c == "44")
GoToCOL44(1);
if (c == "45")
GoToCOL45(1);
if (c == "46")
GoToCOL46(1);
if (c == "47")
GoToCOL47(1);
if (c == "48")
GoToCOL48(1);
if (c == "49")
GoToCOL49(1);
if (c == "50")
GoToCOL50(1);
}
else
{
var chemin= p + "?a="+document.forms.formfond.a.value+"&b="+document.forms.formfond.b.value+"&c="+document.forms.formfond.c.value+"&d="+c +"&e="+fvar.va1.value+"&f="+fvar.va2.value+"&g="+fvar.va3.value+"&h="+fvar.va4.value+"&i="+fvar.va5.value ;
window.location.href = chemin;
}
}
}
function apparfond(col,fil,fic) {
if ((ie55 == true) && (ie5 == false))
document.getElementById("ofond").style.filter = fil;
if ((ie55 == true) && (ie5 == false))
document.getElementById("ofond").filters[0].apply();
if (fic != "")
document.getElementById("ofond").style.background= "url("+fic+")";
else
document.getElementById("ofond").style.background= "";
if (col != "")
document.getElementById("ofond").style.backgroundColor = "#"+col;
if ((ie55 == true) && (ie5 == false))
document.getElementById("ofond").filters[0].play();
}
function appardegrad(num,fil,col){
var selectedItem=num
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem).style.filter = fil;
else
document.getElementById("o"+selectedItem).style.backgroundColor = "#"+col;
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem).filters[0].Apply();
document.getElementById(selectedItem).style.visibility="visible";
if ((ie55 == true) && (ie5 == false))
document.getElementById("o"+selectedItem).filters[0].Play();
document.getElementById("o"+selectedItem).style.visibility="visible";
NumIndex = NumIndex + 1;
document.getElementById("o"+selectedItem).style.zIndex=NumIndex;
}
function sortie() {
window.close();
}
function initProgressbar(n, v){
document.write("<table cellpadding=0 cellspacing=1 bgcolor=" + barre_bordure + " width=" + barre_largeur + " height=" + barre_hauteur + ">");
document.write("	<tr>");
document.write("		<td id=" + n + " width=100% height=100% bgcolor="+ barre_fond +">");
document.write("		</td>");
document.write("	</tr>");
document.write("</table>");
changeProgressbar(n, v);
}
function RemplirBarre(v){
contenu = "<table cellpadding=0 cellspacing=0 width=" + v + "% height=100%>";
contenu += "<tr>";
contenu += "<td bgcolor=" + barre_couleur + " width=100% height=100% valign=middle align=center>";
contenu += "</td>";
contenu += "</tr>";
contenu += "</table>";
return(contenu);
}
function changeProgressbar(n, v){
v = Math.round((v/totmedia)*100);
if(document.getElementById){
if(document.getElementById("" + n + "")){
document.getElementById("" + n + "").innerHTML = (v > 100) ? RemplirBarre(100) : RemplirBarre(v);
}
}
else if(document.all)
{
if(document.all["" + n + ""])
{
document.all["" + n + ""].innerHTML = (v > 100) ? RemplirBarre(100) : RemplirBarre(v);
}
}
}
function chargement(){
if (chto == 0)
{
if (chargementfait == "0")
{
if (totmedia != "0")
{
countmedia=countmedia+1;
}
if (progressbar_active == 1){
document.getElementById("charge").style.visibility="visible";
document.getElementById("ocharge").style.visibility="visible";
changeProgressbar("progressbar1",countmedia);
}
if (countmedia==totmedia){
if (progressbar_active == 1){
document.getElementById("charge").style.visibility="hidden";
document.getElementById("ocharge").style.visibility="hidden";
}
if (coldepart == "1")
GoToCOL1(0);
if (coldepart == "2")
GoToCOL2(0);
if (coldepart == "3")
GoToCOL3(0);
if (coldepart == "4")
GoToCOL4(0);
if (coldepart == "5")
GoToCOL5(0);
if (coldepart == "6")
GoToCOL6(0);
if (coldepart == "7")
GoToCOL7(0);
if (coldepart == "8")
GoToCOL8(0);
if (coldepart == "9")
GoToCOL9(0);
if (coldepart == "10")
GoToCOL10(0);
if (coldepart == "11")
GoToCOL11(0);
if (coldepart == "12")
GoToCOL12(0);
if (coldepart == "13")
GoToCOL13(0);
if (coldepart == "14")
GoToCOL14(0);
if (coldepart == "15")
GoToCOL15(0);
if (coldepart == "16")
GoToCOL16(0);
if (coldepart == "17")
GoToCOL17(0);
if (coldepart == "18")
GoToCOL18(0);
if (coldepart == "19")
GoToCOL19(0);
if (coldepart == "20")
GoToCOL20(0);
if (coldepart == "21")
GoToCOL21(0);
if (coldepart == "22")
GoToCOL22(0);
if (coldepart == "23")
GoToCOL23(0);
if (coldepart == "24")
GoToCOL24(0);
if (coldepart == "25")
GoToCOL25(0);
if (coldepart == "26")
GoToCOL26(0);
if (coldepart == "27")
GoToCOL27(0);
if (coldepart == "28")
GoToCOL28(0);
if (coldepart == "29")
GoToCOL29(0);
if (coldepart == "30")
GoToCOL30(0);
if (coldepart == "31")
GoToCOL31(0);
if (coldepart == "32")
GoToCOL32(0);
if (coldepart == "33")
GoToCOL33(0);
if (coldepart == "34")
GoToCOL34(0);
if (coldepart == "35")
GoToCOL35(0);
if (coldepart == "36")
GoToCOL36(0);
if (coldepart == "37")
GoToCOL37(0);
if (coldepart == "38")
GoToCOL38(0);
if (coldepart == "39")
GoToCOL39(0);
if (coldepart == "40")
GoToCOL40(0);
if (coldepart == "41")
GoToCOL41(0);
if (coldepart == "42")
GoToCOL42(0);
if (coldepart == "43")
GoToCOL43(0);
if (coldepart == "44")
GoToCOL44(0);
if (coldepart == "45")
GoToCOL45(0);
if (coldepart == "46")
GoToCOL46(0);
if (coldepart == "47")
GoToCOL47(0);
if (coldepart == "48")
GoToCOL48(0);
if (coldepart == "49")
GoToCOL49(0);
if (coldepart == "50")
GoToCOL50(0);
chargementfait = "1";
}
}
}
}
function movedown(num){
if (surflechebas==1)
{
if (parseInt(document.getElementById("content"+num).style.top)>=(document.getElementById("content"+num).offsetHeight*(-1)+5))
document.getElementById("content"+num).style.top=parseInt(document.getElementById("content"+num).style.top)-speed+"px"
setTimeout("movedown("+num+")",20)
}
}
function moveup(num){
if (surflechehaut==1)
{
if (parseInt(document.getElementById("content"+num).style.top)<=0)
document.getElementById("content"+num).style.top=parseInt(document.getElementById("content"+num).style.top)+speed+"px"
setTimeout("moveup("+num+")",20)
}
}
function getcontent_height(num){
if (parseInt(document.getElementById("content"+num).style.top)<=0)
document.getElementById("content"+num).style.top=parseInt(0)+speed+"px"
}
function PersoOnKeyDown(){
if (fini ==  false)
{
if (debutcombat == false)
debutcombat = true;
}
var code = event.keyCode;
switch (code)
{
case 37:
document.getElementById("o"+persoact).style.left = persocpos(document.getElementById("o"+persoact).style.left) - persospeed
if (persocpos(document.getElementById("o"+persoact).style.left) < 0)
document.getElementById("o"+persoact).style.left = 0;
ArriveePerso();
break;
case 38:
document.getElementById("o"+persoact).style.top = persocpos(document.getElementById("o"+persoact).style.top) - persospeed
if (persocpos(document.getElementById("o"+persoact).style.top) < 0)
document.getElementById("o"+persoact).style.top = 0;
ArriveePerso();
break
case 39:
document.getElementById("o"+persoact).style.left = persocpos(document.getElementById("o"+persoact).style.left) + persospeed
if (persocpos(document.getElementById("o"+persoact).style.left) > tablargeur - persocpos(document.getElementById("o"+persoact).style.width))
document.getElementById("o"+persoact).style.left = tablargeur - persocpos(document.getElementById("o"+persoact).style.width);
ArriveePerso();
break
case 40:
document.getElementById("o"+persoact).style.top = persocpos(document.getElementById("o"+persoact).style.top) + persospeed
if (persocpos(document.getElementById("o"+persoact).style.top) > tabhauteur - persocpos(document.getElementById("o"+persoact).style.height))
document.getElementById("o"+persoact).style.top = tabhauteur - persocpos(document.getElementById("o"+persoact).style.height);
ArriveePerso();
break
default:
}
}
function persocpos(pos)
{
return parseInt(pos.substring(0, pos.length - 2))
}
function moveperso()
{
if (event.button==1 &&  dragautoriser)
{
document.getElementById("o"+persoact).style.pixelLeft=temp1+event.clientX-xperso
document.getElementById("o"+persoact).style.pixelTop=temp2+event.clientY-yperso
if (persocpos(document.getElementById("o"+persoact).style.left) < 0)
document.getElementById("o"+persoact).style.left = 0;
if (persocpos(document.getElementById("o"+persoact).style.top) < 0)
document.getElementById("o"+persoact).style.top = 0;
if (persocpos(document.getElementById("o"+persoact).style.left) > tablargeur - persocpos(document.getElementById("o"+persoact).style.width))
document.getElementById("o"+persoact).style.left = tablargeur - persocpos(document.getElementById("o"+persoact).style.width);
if (persocpos(document.getElementById("o"+persoact).style.top) > tabhauteur - persocpos(document.getElementById("o"+persoact).style.height))
document.getElementById("o"+persoact).style.top = tabhauteur - persocpos(document.getElementById("o"+persoact).style.height);
return false
}
}
function persodebutdrags(){
 if (event.srcElement.className=="persoDiv")
{
dragautoriser=true;
temp1=document.getElementById("o"+persoact).style.pixelLeft
temp2=document.getElementById("o"+persoact).style.pixelTop
xperso=event.clientX
yperso=event.clientY
}
}
function persofindrags()
{
if (event.srcElement.className=="persoDiv")
{
dragautoriser=false;
ArriveePerso();
}
}
function ArriveePerso(){
if (persocpos(document.getElementById("o"+persoact).style.left) <= parseInt((persoarriveex * 105) /100)){
if (persocpos(document.getElementById("o"+persoact).style.left) >= parseInt((persoarriveex * 95) /100)){
if (persocpos(document.getElementById("o"+persoact).style.top) <= parseInt((persoarriveey * 105) /100)){
if (persocpos(document.getElementById("o"+persoact).style.top) >= parseInt((persoarriveey * 95) /100)){
if (fini == false)
setTimeout("eval(persoaction);",0);
fini=true;
}
}
}
}
}
function bougeattaquant(num,vit){
if (debutcombat == true)
{
if (persocpos(document.getElementById("o"+persoact).style.left) < persocpos(document.getElementById("o"+num).style.left)){
document.getElementById("o"+num).style.left = persocpos(document.getElementById("o"+num).style.left) - persospeed;
}
else
{
 document.getElementById("o"+num).style.left = persocpos(document.getElementById("o"+num).style.left) + persospeed;
}
if (persocpos(document.getElementById("o"+persoact).style.top) < persocpos(document.getElementById("o"+num).style.top)){
document.getElementById("o"+num).style.top = persocpos(document.getElementById("o"+num).style.top) - persospeed;
}
else
{
document.getElementById("o"+num).style.top = persocpos(document.getElementById("o"+num).style.top) + persospeed;
}
Arriveeattaquant(num);
}
if (fini == false)
setTimeout("bougeattaquant("+num+","+vit+");",vit);
}
function Arriveeattaquant(num){
if (persocpos(document.getElementById("o"+persoact).style.left) <= parseInt((persocpos(document.getElementById("o"+num).style.left) * 105) /100))
{
if (persocpos(document.getElementById("o"+persoact).style.left) >= parseInt((persocpos(document.getElementById("o"+num).style.left) * 95) /100))
{
if (persocpos(document.getElementById("o"+persoact).style.top) <= parseInt((persocpos(document.getElementById("o"+num).style.top) * 105) /100))
{
if (persocpos(document.getElementById("o"+persoact).style.top) >= parseInt((persocpos(document.getElementById("o"+num).style.top) * 95) /100))
{
if (fini==false)
setTimeout("eval(animaction"+num+");",0);
 fini=true;
}
}
}
}
}
function mailit(){
window.location="mailto:"+varemail+"&body="+document.forms.fvar.va1.value+" - "+document.forms.fvar.va2.value+" - "+document.forms.fvar.va3.value+" - "+document.forms.fvar.va4.value+" - "+document.forms.fvar.va5.value+" "
}
function AnnuleTime(tmp){
if (tmp != null)
{
clearTimeout(tmp);
tmp = null;
}
}
function zoomplus(){
if(window.parent.document.body.style.zoom!=0) window.parent.document.body.style.zoom*=1.2; else window.parent.document.body.style.zoom=1.2;
}
function zoommoins(){
if(window.parent.document.body.style.zoom!=0) window.parent.document.body.style.zoom*=0.8; else window.parent.document.body.style.zoom=0.8;
}
function zoomnormal(){
window.parent.document.body.style.zoom=1;
}

