function MM_findObj(n, d) { //v4.0
  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=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_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 Survol(balise, couleur)
{
 balise.style.color = couleur;
}

function Quitte(balise, coul)
{
 balise.style.color = (balise.style.color==coul) ? coul : '';
}

function dimpage()
{
hauteur = screen.height;
largeur = screen.width;
if (hauteur>600){
 hauteur = 740;
 }
if (largeur>850){
 largeur = 850;
 }
window.resizeTo(largeur,hauteur);
window.moveTo(0,0);
return true;
}
function dimpage2()
{
hauteur = screen.height;
largeur = screen.width;
if (hauteur>620){
 hauteur = 620;
 }
if (largeur>850){
 largeur = 850;
 }
window.resizeTo(largeur,hauteur);
window.moveTo(0,25);
return true;
}

function dimpage3()
{
hauteur = screen.height;
largeur = screen.width;
if (hauteur>600){
 hauteur = 715;
 }
if (largeur>850){
 largeur = 850;
 }
window.resizeTo(largeur,hauteur);
window.moveTo(0,25);
return true;
}

function changeclass(qui,laquelle)
{
document.getElementById(qui).className = laquelle;
}

function ouvsorti(fichier)
{
larg = (screen.width>850) ? 850 : screen.width;
var fen = window.open(fichier,'sorti','top=25,left=0,width=larg,height=600,resizable=yes,scrollbars=yes,toolbar=no,status=no,menubar=no');
fen.focus();
}

function ouvpage(fichier)
{
var fen = window.open(fichier,'base');
fen.focus();
}

function ouvhelp(fichier,type)
{
 if(type == 1){
 var a = window.open(fichier,'helpe','top=30,left=300,width=400,height=550,resizable=yes,scrollbars=yes,');
 a.focus();
 }
 else{
 var l= window.open(fichier,'liene','top=30,left=100,width=400,height=550,resizable=yes,scrollbars=yes,');
 l.focus();
 };
}

var sortenf = ["Réserve Géologique du Luberon","dgeolenf.html","Patrimoine Humain","dpatrim.html","Milieux Naturels","dnaturel.html","Le Paysage","dpaysage.html","Infos pratiques","infopratenf.html"];
var menadu = ["Les incontournables","cincont.html","Sorties à thème","ctheme.html","Séjours","csejour.html","Infos pratiques","infopratic.html"];
var agda = [/*"Les Sorties: juillet à novembre 06","agenda.html",*/"Actualités-Infos-Sorties","bactu.html"];
/*var balades = ["La forêt de Cèdres","bagenda.html","le Regalon","bregalon.html","Cereste","bcereste.html"];*/
var acc = ['Accueil','index.html','0'];
var qui = ['Qui sommes-nous?','atrombine.html','0'];
var enfant = ['Les sorties Enfants','asscol.html',sortenf];
var adulte = ['Les sorties Adultes/Familles','asadu.html',menadu];
var nature = ['Nature en Luberon','anature.html','0'];
var etiez = ['Actualité et Agenda','aitin.html','0'/*agda*/];
var artmenu1 = [acc,qui,enfant,adulte,nature,etiez];

function construitpopup2(n2,n,i)
{
var p4 = "";
var p0 = "<table  class=\"txtaller\" style=\"text-align: right;\"><tbody>";
 for(var j = 0; j <= (artmenu1[i][2].length)-2; j = j+2)
 {
  if (j==n2 && i==n){
  var p1 = "<tr><td style=\"color:#dddddd; vertical-align:top; padding-right:10px;\"";
  var p2 = "";
  }
  else{
  var p1 = "<tr><td style=\"cursor:pointer; vertical-align:top; padding-right:10px;\"";
  var p2 = " onclick=\"ouvsorti('"+artmenu1[i][2][j+1]+"')\" onmouseover=\"Survol(this,'#8403d3')\" onmouseout=\"Quitte(this)\"";
  };
  var p3 = ">"+artmenu1[i][2][j]+"</td></tr>";
  p4=p4+p1+p2+p3;
 };
var p5 = "</tbody></table>";
return(p0+p4+p5);
}


function construitaller(n,n2)
/*popup du menu "aller à"*/
{
 for(var i in artmenu1)
 {
 var x = "pop"+i;
 var t = ['382','365','338','385','455','477'];
 var w = ['','','350','422','','326'];
 var y = (artmenu1[i][2]==0)? "" : construitpopup2(n2,n,i);
 document.write("<div id=\""+x+"\" class=\"popup2\" style=\" top:"+t[i]+"; left:"+w[i]+";\" onmouseover=\"MM_showHideLayers('"+x+"','','show','pop','','show');  changeclass('navig','aller2')\"   onmouseout=\"MM_showHideLayers('"+x+"','','hide','pop','','hide');   changeclass('navig','aller')\">"+y+"</div>");
 }
document.write("<div id=\"pop\" class=\"popup\" onmouseover=      \"MM_showHideLayers('pop','','show'); changeclass('navig','aller2')\" onmouseout=    \"MM_showHideLayers('pop','','hide'); changeclass('navig','aller')\"><table class=\"txtaller\"><tbody>");
for(var i in artmenu1)
 {
  var z = "pop"+i;
  if(i!=n){
   part1 = "<tr><td style=\"cursor:pointer; vertical-align:top; padding-left:10px;\"";
   part2 = " onclick=\"ouvpage('"+artmenu1[i][1]+"')\"";
   if(artmenu1[i][2]!=0){  
    part3 = " onmouseover=\"MM_showHideLayers('"+z+"','','show','pop','','show'); Survol(this,'#8403d3')\" onmouseout=\"MM_showHideLayers('"+z+"','','hide','pop','','hide'); Quitte(this)\"";
    }
   else{
    part3=" onmouseover=\"Survol(this,'#8403d3')\" onmouseout=\"Quitte(this)\"";
    }
  }
  else{
  part1 = "<tr><td style=\"color:white; padding-left:10px;";
   if(artmenu1[i][2]!=0){
    part2=" cursor:pointer;\" onclick=\"ouvpage('"+artmenu1[i][1]+"')\"";      
    part3 =" onmouseover=\"MM_showHideLayers('"+z+"','','show','pop','','show'); Survol(this,'#8403d3')\" onmouseout=\"MM_showHideLayers('"+z+"','','hide','pop','','hide'); Survol(this,'white')\"";
    }
   else{
    part2="";
    part3="\"";
    };
  };
 part4 = ">"+artmenu1[i][0]+"</td></tr>";
 document.write(part1+part2+part3+part4);
 };
document.write("</tbody></table></div>");
}

function basdepage(n,n2)
/*menu de bas de page*/
{
var lediv = "<div id=\"cnct\" class=\"popcont\"><span style=\"cursor:pointer;\" onclick=\"MM_showHideLayers('cnct','','hide')\" title=\"cliquez ici pour fermer ce cadre\"><span style=\"font-weight:bold; font-size:14pt; color:#074b1d; font-style:italic;\">Cèdres</span><br><span style=\"font-weight:bold; color:#8403d3;line-height:9pt;\">Accompagnateurs Naturalistes<br>en Luberon</span><br><br style=\"line-height:4pt;\">c/o Claude Lopez<br>3, Grand'rue 84120 La Bastidonne<br>Tél/Fax: 04 90 07 54 02<br></span>e-mail: <a href=\"mailto:oreille@cedres-luberon.com\" title=\"cliquez ici pour nous envoyer un e-mail\">oreille@cedres-luberon.com</a></div>";
var tx0 = "<div id=\"contct\" class=\"contact\" onmouseover=\"changeclass('contct','contact2')\" onmouseout=\"changeclass('contct','contact')\" onclick=\"MM_showHideLayers('cnct','','show')\">Nous contacter</div>";
var tx1 = "<div id=\"lien\" class=\"liens\" onmouseover=\"changeclass('lien','liens2')\" onmouseout=\"changeclass('lien','liens')\" onclick=\"ouvhelp('liens.html#haut',2)\">Liens</div>";
var tx2 = "<div id=\"aid\" class=\"aide\" onmouseover=\"changeclass('aid','aide2')\" onmouseout=\"changeclass('aid','aide')\" onclick=\"ouvhelp('aide.html#haut',1)\">Aide!</div>";
var tx3 = "<div id=\"navig\" class=\"aller\"  onmouseover=\"changeclass('navig','aller2'); MM_showHideLayers('pop','','show')\" onmouseout=\"changeclass('navig','aller'); MM_showHideLayers('pop','','hide')\">Aller à...</div>";
document.write(lediv+tx0+tx1+tx2+tx3);
construitaller(n,n2);
}

function montrecomm(lid,r,cont)
/*commentaire menu principal page accueil*/
{
document.getElementById(lid).style.left =20;
 switch (r)
 {
case 'q':
 document.getElementById(lid).style.top=47;
   break;
case 's':
 document.getElementById(lid).style.top=130;
   break;
case 'a':
 document.getElementById(lid).style.top=215;
   break;
case 'n':
 document.getElementById(lid).style.top=300;
   break;
default:
 document.getElementById(lid).style.top=385;
 };
document.getElementById(lid).firstChild.nodeValue=cont;
MM_showHideLayers(lid,'','show');
}

function contacter(h)
{
var dd = "<div id=\"noucont\" class=\"popcont\" style=\"position: absolute; top:"+h+"px; left:5px;\"><span style=\"cursor:pointer;\" onclick=\"MM_showHideLayers('noucont','','hide')\" title=\"cliquez ici pour fermer ce cadre\"><span style=\"font-weight:bold; font-size:14pt; color:#074b1d; font-style:italic;\">Cèdres</span><br><span style=\"font-weight:bold; color:#8403d3;line-height:9pt;\">Accompagnateurs Naturalistes<br>en Luberon</span><br><br style=\"line-height:4pt;\">c/o Claude Lopez<br>3, Grand'rue 84120 La Bastidonne<br>Tél/Fax: 04 90 07 54 02<br></span>e-mail: <a href=\"mailto:oreille@cedres-luberon.com\" title=\"cliquez ici pour nous envoyer un e-mail\">oreille@cedres-luberon.com</a></div>";
document.write(dd);
}

function centrer()
{
nav = navigator.appName.substring (0,3);
if (nav == "Net")
 {
 larg = window.innerWidth;
 }else
  if (nav =="Mic") 
  {
  larg = document.body.offsetWidth;
  }else
   {
   }
  pos = ((larg-820)>0 ) ? ((larg-800)/2)-10 : 0;
  document.getElementById('divgen').style.left = pos;   
}
