window.onload=start;

function start(){
  	montre();
	timelinePlay("animLogo");
	BoutonDroit();
}

function montre(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}

function BoutonDroit() {
         if((event.button==2)||(event.button==3)||(event.button==4)){
         alert('Photo Etienne Challet. "Mouettes atricilles (Larus atricicilla), Guyane".');
         }
         document.onmousedown=BoutonDroit;
}

function creerfenetre() {
         f = window.open ("","fenetre","width=500,height=500","scrollbars=1");
}

var newWindow = null;

function afficheNote(contentURL,windowName,windowWidth,windowHeight) {
widthHeight = 'height=' + windowHeight + ',width=' + windowWidth;
newWindow = window.open(contentURL,windowName,widthHeight,'locationbar=no,menubar=no,personalbar=no,toolbar=no,statusbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no');
newWindow.focus()
}
function cloreNote() {
if (newWindow != null)  {
newWindow.close();
 newWindow = null;
}
}

function findObj(n, d) {
         var p,i,x;
         if(!d) d=document;
         if((p=n.indexOf("?"))>0&&parent.frames.length){
             d=parent.frames[n.substring(p+1)].document;
             n=n.substring(0,p);
         }
         if(!(x=d[n])&&d.all) x=d.all[n];
         for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
         for(i=0;!x&&d.layers&&i<d.layers.length;i++) x= findObj(n,d.layers[i].document);
         if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function  showHideLayers() {
          var i,p,v,obj,args= showHideLayers.arguments;
          for (i=0; i<(args.length-2); i+=3)
          if ((obj= findObj(args[i]))!=null) {
             v=args[i+2];
             if (obj.style) {
                obj=obj.style;
                v=(v=='show')?'visible':(v='hide')?'hidden':v;
             }
             obj.visibility=v;
          }
}

function  timelinePlay(tmLnName, myID) {
          var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=false;
          if (document.Time == null)  initTimelines(); //la vrai premiere fois
          tmLn = document.Time[tmLnName];
          if (myID == null) { myID = ++tmLn.ID; firstTime=true;}// si renouvellement, incr ID
          if (myID == tmLn.ID) {
             setTimeout('timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
             fNew = ++tmLn.curFrame;
                  for (i=0; i<tmLn.length; i++) {
                      sprite = tmLn[i];
                      if (sprite.charAt(0) == 's') {
                         if (sprite.obj) {
                            numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
                            if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {
                               keyFrm=1;
                               for (j=0; j<sprite.values.length; j++) {
                                   props = sprite.values[j];
                                   if (numKeyFr != props.length) {
                                      if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
                                      else sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
                                   }
                                   else {
                                        while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
                                        if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
                                           if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
                                           else sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
                                        }
                                   }
                               }
                            }
                         }
                      }
                      else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
                      if (fNew > tmLn.lastFrame) tmLn.ID = 0;
                  }
          }
}

function  timelineGoto(tmLnName, fNew, numGotos) {
          var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,lastKeyFr,propNum,theObj;
          if (document.Time == null)  initTimelines(); //la vrai premiere fois
          tmLn = document.Time[tmLnName];
          if (numGotos != null)
          if (tmLn.gotoCount == null) tmLn.gotoCount = 1;
          else if (tmLn.gotoCount++ >= numGotos) {tmLn.gotoCount=0; return}
          jmpFwd = (fNew > tmLn.curFrame);
          for (i = 0; i < tmLn.length; i++) {
              sprite = (jmpFwd)? tmLn[i] : tmLn[(tmLn.length-1)-i];
              if (sprite.charAt(0) == "s") {
                 numKeyFr = sprite.keyFrames.length;
                 firstKeyFr = sprite.keyFrames[0];
                 lastKeyFr = sprite.keyFrames[numKeyFr - 1];
                 if ((jmpFwd && fNew<firstKeyFr) || (!jmpFwd && lastKeyFr<fNew)) continue;
                 for (keyFrm=1; keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]; keyFrm++);
                 for (j=0; j<sprite.values.length; j++) {
                     props = sprite.values[j];
                     if (numKeyFr == props.length) propNum = keyFrm-1
                     else propNum = Math.min(Math.max(0,fNew-firstKeyFr),props.length-1);
                     if (sprite.obj != null) {
                        if (props.prop2 == null) sprite.obj[props.prop] = props[propNum];
                        else sprite.obj[props.prop2][props.prop] = props[propNum];
                     }
                 }
              }
              else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
          }
          tmLn.curFrame = fNew;
          if (tmLn.ID == 0) eval(' timelinePlay(tmLnName)');
}

function  initTimelines() {
          var ns = navigator.appName == "Netscape";
          var ns4 = (ns && parseInt(navigator.appVersion) == 4);
          var ns5 = (ns && parseInt(navigator.appVersion) > 4);
          document.Time = new Array(2);
          document.Time[0] = new Array(6);
          document.Time["animLogo"] = document.Time[0];
          document.Time[0].Name = "animLogo";
          document.Time[0].fps = 15;
          document.Time[0][0] = new String("behavior");
          document.Time[0][0].frame = 26;
          document.Time[0][0].value = " showHideLayers('animEclair','','show')";
          document.Time[0][1] = new String("behavior");
          document.Time[0][1].frame = 32;
          document.Time[0][1].value = " showHideLayers('animEclair','','hide')";
          document.Time[0][2] = new String("behavior");
          document.Time[0][2].frame = 46;
          document.Time[0][2].value = " showHideLayers('animEclair','','hide')";
          document.Time[0][3] = new String("behavior");
          document.Time[0][3].frame = 52;
          document.Time[0][3].value = " showHideLayers('animEclair','','show')";
          document.Time[0][4] = new String("sprite");
          document.Time[0][4].slot = 1;
          if (ns4) document.Time[0][4].obj = document["medoc"];
          else if (ns5) document.Time[0][4].obj = document.getElementById("medoc");
          else document.Time[0][4].obj = document.all?document.all["medoc"] : null;
          document.Time[0][4].keyFrames = new Array(1, 12, 25);
          document.Time[0][4].values = new Array(4);

          // GESTION DU DEPLACEMENT:
          if (ns5) document.Time[0][4].values[0] = new Array("-199px", "-206px", "-213px", "-221px", "-228px", "-235px", "-242px", "-250px", "-257px", "-264px", "-272px", "-278px", "-273px", "-267px", "-260px", "-254px", "-247px", "-241px", "-227px", "-220px", "-213px", "-206px", "-200px", "-192px");
          else document.Time[0][4].values[0] = new Array(-199,-206,-213,-221,-228,-235,-242,-250,-257,-264,-272,-278,-273,-267,-260,-254,-247,-241,-234,-227,-220,-213,-207,-200,-192);
          document.Time[0][4].values[0].prop = "left";

          if (ns5) document.Time[0][4].values[1] = new Array("63px", "62px", "62px", "61px", "60px", "60px", "59px", "58px", "57px", "56px", "55px", "51px", "47px", "44px", "41px", "39px", "37px", "34px", "32px", "30px", "28px", "26px", "23px", "21px", "19px");
          else document.Time[0][4].values[1] = new Array(63,62,62,61,60,60,59,58,57,56,55,51,47,44,41,39,37,34,32,30,28,26,23,21,19);
          document.Time[0][4].values[1].prop = "top";

          if (!ns4) {
             document.Time[0][4].values[0].prop2 = "style";
             document.Time[0][4].values[1].prop2 = "style";
          }
          document.Time[0][4].values[2] = new Array("inherit","inherit","inherit");
          document.Time[0][4].values[2].prop = "visibility";
          if (!ns4) document.Time[0][4].values[2].prop2 = "style";
          document.Time[0][4].values[3] = new Array("8","8","8");
          document.Time[0][4].values[3].prop = "zIndex";
          if (!ns4) document.Time[0][4].values[3].prop2 = "style";
          document.Time[0][5] = new String("behavior");
          document.Time[0][5].frame = 39;
          document.Time[0][5].value = " showHideLayers('animEclair','','show')";
          document.Time[0].lastFrame = 52;
          document.Time[1] = new Array(3);
          document.Time["inCytoAnim"] = document.Time[1];
          document.Time[1].Name = "inCytoAnim";
          document.Time[1].fps = 15;
          document.Time[1][0] = new String("behavior");
          document.Time[1][0].frame = 1;
          document.Time[1][1] = new String("behavior");
          document.Time[1][1].frame = 8;
          document.Time[1][2] = new String("behavior");
          document.Time[1][2].frame = 15;
          document.Time[1].lastFrame = 15;
          for (i=0; i<document.Time.length; i++) {
              document.Time[i].ID = null;
              document.Time[i].curFrame = 0;
              document.Time[i].delay = 1000/document.Time[i].fps;
          }
}

//-->

