// barre de navigation avec arbre
// Auteur : Julien Kronegg (jkronegg@bigfoot.com)
// Date   : 13 septembre 2001

//nav_bar_location = "file://c:/projets/ws_pierre/nav_bar/";
//nav_bar_location = "http://www.pierreandregetaz.ch/nav_bar/";
nav_bar_location = "./nav_bar/";
//site_location    = "file://c:/projets/ws_pierre/";
//site_location    = "http://www.pierreandregetaz.ch/";
site_location    = "./";

document.write('<table BORDER=0 CELLSPACING=0 CELLPADDING=0>')
document.write('  <tr>')
document.write('    <td ALIGN=center VALIGN=center width=192 height=176 background="'+nav_bar_location+'ramures1.jpg">')
if (document.location.href!=site_location+"index.html" &&
    document.location.href!=site_location) {
  // afficher le lien de retour à la home page ssi la page qui est affichée n'est pas la home page
  document.write('    <a href='+site_location+'index.html><img src='+nav_bar_location+'logo_pg_60x48_black.gif border=1 width=60 height=48 alt="retourner à la page principale"></a>')
}//end if
document.write('    &nbsp;</td>')
document.write('  </tr>')
document.write('  <tr>')
document.write('    <script>')
                      // alonger le tronc pour que l'arbre prenne toute la heuteur de l'écran
document.write('      document.write("<td ALIGN=LEFT VALIGN=TOP colspan=1 background='+nav_bar_location+'tronc.jpg width=192 height="+(window.innerHeight-177-138-16)+">")')
document.writeln('    </script>')
document.writeln('    <blockquote>') // <!-- à la place du blockquote, on peut ajouter une case contenant des &nbsp aux tableaux-liens => permet de maitriser la taille de l'espacement du bord-->
link_item("Entreprise",               site_location+"entreprise.html",     "XXX", "XXX0");
link_item("Exemples de réalisations", site_location+"exemples.html",       "XXX", "XXX1");
link_item("Commentaires des clients", site_location+"commentaires.html",   "XXX", "XXX2");
link_item("Devis en ligne",           site_location+"devis_en_ligne.html", "XXX", "XXX3");
link_item("Contact",                  site_location+"contact.html",        "XXX", "XXX4");
document.writeln('    </blockquote>')
document.writeln('    </td>')
document.writeln('  </tr>')
document.writeln('  <tr>')
document.writeln('    <td ALIGN=LEFT VALIGN=TOP width=142><img SRC="'+nav_bar_location+'souche.jpg" width=192 height=138></td>')
document.writeln('  </tr>')
document.writeln('</table>')


function link_item(texte, lien, image, nom) {
  // ajoute un item dans la barre de navigation
  //
  // texte = le texte du lien
  // lien = l'URL du lien
  // image = nom de l'image associée (sans la fin '_on.gif'). l'image doit être dans le répertoire de la barre de navigation
  // nom = référence de nom pour les mouseover
  document.writeln('    <table><tr><td background='+nav_bar_location+'fond_planche4.jpg width=120 height=30><table><tr>')
  document.writeln('<td><a href='+lien+' onMouseOver="document.'+nom+'.src=\''+nav_bar_location+image+'_on.gif\';" onMouseOut="document.'+nom+'.src=\''+nav_bar_location+image+'_off.gif\';"><img src='+nav_bar_location+image+'_off.gif border=0 name='+nom+'></a></td>')
  document.writeln('<td><a href='+lien+' onMouseOver="document.'+nom+'.src=\''+nav_bar_location+image+'_on.gif\';" onMouseOut="document.'+nom+'.src=\''+nav_bar_location+image+'_off.gif\';">'+texte+'</a>&nbsp;</td></tr></table></td></tr></table>')
}//end link_item