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

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

function display(){
	document.write("<ul id=\"menu\">");
	document.write("<li><a href=\"#\">Technique</a>");
	document.write("<ul>");
	document.write("<li class=\"first\"><a href=\""+pathtoroot+"chap1.htm\">Why ?</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap2.htm\">Machine and Settings</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap3.htm\">Instrumentation</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap4.htm\">Anaesthesia</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap5.htm\">Microincisions</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\">Nucleofragmentation</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap9.htm\">I/A</a></li>");
	document.write("<li><a href=\""+pathtoroot+"chap10.htm\">Implantation</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\">Challenging Cases</a></li>");
/*	document.write("<li><a href=\""+pathtoroot+"resultats.htm\">Results</a></li>");
	document.write("<li><a href=\""+pathtoroot+"points_forts.htm\">15 Strong Points</a></li>");
	document.write("<li><a href=\""+pathtoroot+"pieges.htm\">15 Pitfalls</a></li>");
	document.write("<li><a href=\""+pathtoroot+"bibliographie.htm\">Bibliography</a></li>");*/
	document.write("<li><a href=\""+pathtoroot+"conclusion.htm\">Conclusions</a></li>");
	document.write("</ul>");
	document.write("<li><a href=\""+pathtoroot+"photos.htm\">Pictures Gallery</a>");
	document.write("</li>");
	document.write("<li><a href=\""+pathtoroot+"gallery.htm\">Videos Gallery</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 + "<body>\n";
  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;
function ShowVideo(number) 
{
	switch (number)
	{
		case 0 :
		{
			titre = "Irrigation / Aspiration";
			video = "ia.swf"
			break;
		}
		case 1 :
		{
			titre = "Horizontal Phaco-Chop";
			video = "chophor.swf"
			break;
		}
		case 2 :
		{
			titre = "Vertical Phaco-Chop";
			video = "chopvert.swf"
			break;
		}
		case 3 :
		{
			titre = "Incisions";
			video = "incisions.swf"
			break;
		}
		case 4 :
		{
			titre = "Capsulorhexis";
			video = "capsulorhexis.swf"
			break;
		}
		case 5 :
		{
			titre = "Stop and Chop";
			video = "stopchop.swf"
			break;
		}
	}

	if ( ! newWindow || newWindow.closed ) 
	{
		 newWindow = window.open("","", "top=256,left=352,width=320,height=256");
		 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=\"320\" height=\"256\" 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='320' height='256'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="Welcome on PhacoBimanuelle.net !";
t2="Do not forget to visit our partners";
var p=1;
function animStatus() {
	status=eval("t"+p);
	setTimeout("animStatus()",2000);
	p++;
	if (p==3) p=1;
}