// JavaScript Document
function hover(obj){
  if(document.all){
    UL = obj.getElementsByTagName('ul');
    if(UL.length > 0){
      sousMenu = UL[0].style;
      if(sousMenu.display == 'none' || sousMenu.display == ''){
        sousMenu.display = 'block';
      }else{
        sousMenu.display = 'none';
      }
    }
  }
}

function setHover(){
  LI = document.getElementById('menu').getElementsByTagName('li');
  nLI = LI.length;
  for(i=0; i < nLI; i++){
    LI[i].onmouseover = function(){
      hover(this);
    }
    LI[i].onmouseout = function(){
      hover(this);
    }
  }
}

function displayMenu(){
	document.write("<ul id=\"menu\">");
	document.write("<li class=\"first\"><a href=\"#\">Le Cristallin</a>");
	document.write("<ul>");
	document.write("<li><a href=\""+pathtoroot+"anat1.htm\">Définition</a></li>");
	document.write("<li><a href=\""+pathtoroot+"anat2.htm\">Historique</a></li>");
	document.write("<li><a href=\""+pathtoroot+"anat3.htm\">Intérêts</a></li>");
	document.write("<li><a href=\""+pathtoroot+"anat4.htm\">Embryologie</a></li>");
	document.write("<li><a href=\""+pathtoroot+"anat5.htm\">Macroscopie</a></li>");
	document.write("<li><a href=\""+pathtoroot+"anat6.htm\">Histologie</a></li>");
	document.write("<li><a href=\""+pathtoroot+"anat7.htm\">Physiologie</a></li>");
	document.write("<li><a href=\""+pathtoroot+"anat8.htm\">Exploration</a></li>");
	document.write("<li><a href=\""+pathtoroot+"anat9.htm\">Voies d'Abord</a></li>");
	document.write("<li class=\"last\"><a href=\""+pathtoroot+"anat_fin.htm\">Conclusion</a></li>");
	document.write("</ul>");
	document.write("</li>");
	document.write("<li><a href=\"#\">Technique</a>");
	document.write("<ul>");
	document.write("<li class=\"first\"><a href=\""+pathtoroot+"chap1.htm\">Pourquoi ?</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap2.htm\">Machine et réglages</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap3.htm\">Instrumentation</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap4.htm\">Anesthésie</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap5.htm\">Micro-incisions</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap6.htm\">Capsulorhexis</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap7.htm\">Hydrodissection</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap8.htm\">Nucléofracture</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap9.htm\">I/A</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap10.htm\">Implants</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap11.htm\">Complications</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap12.htm\">Associations</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap13.htm\">Transition</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap14.htm\">Cas difficiles</a></li>");
	document.write("<li><a href=\""+pathtoroot+"resultats.htm\">Résultats</a></li>");
	document.write("<li><a href=\""+pathtoroot+"points_forts.htm\">15 points forts</a></li>");
	document.write("<li><a href=\""+pathtoroot+"pieges.htm\">15 pièges à éciter</a></li>");
	document.write("<li><a href=\""+pathtoroot+"conclusion.htm\">Conclusion</a></li>");
	document.write("<li><a href=\""+pathtoroot+"bibliographie.htm\">Références</a></li>");
	document.write("</ul>");
	document.write("</li>");
	document.write("<li><a href=\""+pathtoroot+"actualites.htm\">Actualités</a>");
	document.write("</li>");
	document.write("<li><a href=\""+pathtoroot+"photos.htm\">Photos</a>");
	document.write("</li>");
	document.write("<li><a href=\""+pathtoroot+"galerie.htm\">Vidéos</a>");
	document.write("</li>");
	document.write("<li><a href=\""+pathtoroot+"newsletter.php\">Newsletter</a>");
	document.write("</li>");
	document.write("<li><a href=\""+pathtoroot+"films.htm\">Cataract.TV</a>");
	document.write("</li>");
	document.write("</ul>");
}

function AjoutFavo() {
if ((navigator.appName.indexOf("Microsoft",0)>=0) && (parseInt(navigator.appVersion)>=4))
	{
		window.external.AddFavorite("http://www.phacobimanuelle.net/index.html","Le site de la phaco bimanuelle" );
	}
	else 
	{
		alert("Cette fonction n'est proposée que pour Internet Explorer 4 et +")
	}
}

function toggle(id){
if (document.getElementById) { 
    // Navigateur qui supporte DHTML officiel
	// alert("DHTML supporté !");
	if (document.getElementById(id).style.display=="")
		document.getElementById(id).style.display="none";
	else
		document.getElementById(id).style.display="";
	}
}

function EnvoieMail(adr1, adr2, sujet) {
  var l
  l = "mailto" + ":" + adr1 + "@" + adr2
  if ( sujet ) l = l + "?subject=" + sujet
  document.location = l
}

function ShowPopup() {
var newWindow
if ( ! newWindow || newWindow.closed ) {
  	 newWindow = window.open( "", "", "height=250,width=250")
  	 if ( ! window.opener ) {
  	    newWindow.opener = window
  	 }
  }
  var content = "<html><head><title>A venir</title></head>\n"
  content = content + "<body background=\"../images/popup.jpg\" style=\"text-align:center\" >\n <div style=\"vertical-align:middle;line-height:100px\"><h4>BIENTOT EN LIGNE ...</h4>\n"
  content = content + "<p align=\"center\"><input type=\"button\" value=\"Fermer\" name=\"Close\" onClick=\"window.close()\" ></p>\n"
  content = content + "</body></html>\n"
  newWindow.document.write( content )
  newWindow.document.close()
  newWindow.focus()
}

function Welcome() {
var newWindow
if ( ! newWindow || newWindow.closed ) {
  	 newWindow = window.open( "", "", "height=513,width=700")
  	 if ( ! window.opener ) {
  	    newWindow.opener = window
  	 }
  }
  var content = "<html><head><title>Phacobimanuelle.net - Joyeuses Fêtes et bonne année</title></head>\n"
  content = content + "<link rel=\"stylesheet\" type=\"text/css\" href=\"../scripts/noel.css\"/>";
  content = content + "<div id=\"global\">";
  content = content + "<h1><br/>JOYEUSES  FETES <br/>ET<br/>BONNE ANNEE 2006<br/>sur phacobimanuelle.net</h1>\n";
  content = content + "<p>A l’approche de cette fin d’année, le Rédacteur en chef, le Conseil éditorial et toute l’équipe de <span class=\"gras\">phacobimanuelle.net</span> remercient tous les partenaires et toutes les personnes qui ont soutenu le site en 2005 et leur donnent rendez-vous en 2006.</p>";
  content = content + "<h5>Nous  vous souhaitons à tous de passer de joyeuses fêtes de Noël<br/>et une Très Bonne Année 2006 sur phacobimanuelle.net</h5>";
  content = content + "<p align=\"center\"><input type=\"button\" value=\"Fermer\" name=\"Close\" onClick=\"window.close()\" ></p>\n"
  content = content + "</body></html>\n"
  newWindow.document.write( content )
  newWindow.document.close()
  newWindow.focus()
}

var newWindow;
var titre;
var video;
var largeur;
var hauteur;
function ShowVideo(number) 
{
	switch (number)
	{
		case 0 :
		{
			titre = "Irrigation / Aspiration";
			video = "ia.swf";
			largeur = 320;
			hauteur = 256;
			break;
		}
		case 1 :
		{
			titre = "Phaco-Chop Horizontal";
			video = "chophor.swf";
			largeur = 320;
			hauteur = 256;
			break;
		}
		case 2 :
		{
			titre = "Phaco-Chop Vertical";
			video = "chopvert.swf";
			largeur = 320;
			hauteur = 256;
			break;
		}
		case 3 :
		{
			titre = "Incisions";
			video = "incisions.swf";
			largeur = 320;
			hauteur = 256;
			break;
		}
		case 4 :
		{
			titre = "Capsulorhexis";
			video = "capsulorhexis.swf";
			largeur = 320;
			hauteur = 256;
			break;
		}
		case 5 :
		{
			titre = "Stop and Chop";
			video = "stopchop.swf";
			largeur = 320;
			hauteur = 256;
			break;
		}
		case 6 :
		{
			titre = "Febraromics";
			video = "Febraromicsl.swf";
			largeur = 350;
			hauteur = 325;
			break;
		}
	}

	if ( ! newWindow || newWindow.closed ) 
	{
		 newWindow = window.open("","", "top=256,left=352,width="+largeur+",height="+hauteur+"");
		 if ( ! window.opener ) 
		 {
			newWindow.opener = window
		 }
	 }
var content = "<html><head><title>"+titre+"</title></head>\n";
  content = content + "<body onblur='window.close()' onclick='window.close()' style='margin:\"0\"'>\n";
  content = content + "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=" + largeur + " height="+ hauteur +" id=\"stopchop\" align=\"middle\"> \n";
  content = content + "<param name=\"allowScriptAccess\" value=\"sameDomain\" /> \n";
  content = content + "<param name=\"movie\" value='../video/"+video+"' /><param name=\"quality\" value=\"high\" /><param name='bgcolor' value='#ffffff' /><embed src='../video/"+video+"' quality='high' bgcolor='#ffffff' name='"+video+"' width='"+largeur+"' height='"+hauteur+"'align='middle' allowScriptAccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /> \n";
  content = content + "</object>\n";
  content = content + "</body></html>\n"
  newWindow.document.write( content )
  newWindow.document.close()
  newWindow.focus()
}

t1="Bienvenue sur PhacoBimanuelle.net !";
t2="N'oubliez pas de visiter nos partenaires";
var p=1;
function animStatus() {
	status=eval("t"+p);
	setTimeout("animStatus()",2000);
	p++;
	if (p==3) p=1;
}
