// ---------------------------------------------------------------------------
// Example of howto: use OutlookBar 
// egx_menu_parametre.js -------------------------------------------


  //create OutlookBar
  //var o = new createOutlookBar('Bar',0,0,screenSize.width/7,screenSize.height*99/100,'white','#CC3300')//'#F7DDA2') // OutlookBar
  var o = new createOutlookBar('Bar',0,0,200,screenSize.height*99/100,'white','#CC3300')
  var p
  var activ_panel = 6
  var last_panel = activ_panel - 1
  

  //create first panel
   p = new createPanel('fa1','Equiloisirs FAE');
  p.addButton('images/g1_bouton_acces.gif alt="Plan d accès"',"Nous (re) joindre",'window.location="fg1_equiloisirs_acces.html"'); 
  p.addButton('images/g1_bouton_installation.gif alt="Installations"',"Installations",'window.location="fg1_equiloisirs_instal.html"'); 
  p.addButton('images/g1_bouton_tarif.gif alt="Tarifs"',"Tarifs",'window.location="fg1_equiloisirs_tarif.html"'); 
  p.addButton('images/g1_bouton_inscription.gif alt="Inscriptions"',"Inscriptions",'window.location="fg1_equiloisirs_inscription.html"'); 
  p.addButton('images/g1_bouton_voyage.gif alt="Web"',"Web",'window.location="fg1_equiloisirs_voyage.html"');
  o.addPanel(p);

  p = new createPanel('fa2','Randonnées');
  p.addButton('images/g2_bouton_fiche.gif alt="Vos randos"','	Vos randos','window.location="fg2_rando_cheval_rando.html"');
  p.addButton('images/g2_bouton_calendrier.gif alt="Calendrier"',"Calendrier",'window.location="fg2_rando_cheval_calendrier.html"');
  p.addButton('images/g2_bouton_direct.gif alt="Photos"','Photos','window.location="http://www.equiloisirs-fae.com/diaporama/index.html"');
  p.addButton('images/g2_bouton_resa.gif alt="Réservation"','Réservation','window.location="fg2_rando_cheval_resa.html"');
  p.addButton('images/g2_bouton_info.gif alt="Préparer la rando"','Info utile','window.location="fg2_rando_cheval_utile.html"');
  p.addButton('images/g2_bouton_flore.gif alt="Faune et flore"','Faune et Flore','window.location="fg2_rando_cheval_faune.html"');         p.addButton('images/g2_bouton_loc.gif alt="Prolonger"','Prolonger','window.location="fg2_rando_cheval_location.html"');
  p.addButton('images/g2_bouton_photo.gif alt="Photos"','Photos','window.location="http://www.equiloisirs-fae.com/diaporama/index.html"');
  //p.addButton('images/g2_bouton_direct.gif alt="Votre Espace"','Votre Espace','window.open="diaporama/index.html"');
  o.addPanel(p);
  
  p = new createPanel('fa3','Ecole');
  o.addPanel(p);
  
  p = new createPanel('fa4','Formation pro');
  o.addPanel(p);

  p = new createPanel('fa5','Eté');
  o.addPanel(p);

  p = new createPanel('fa6','Groupes');
  o.addPanel(p);
  
  p = new createPanel('fa7','Liens');
  o.addPanel(p);

  o.draw();         //draw the OutlookBar
  	
  	//window.location="a"+activ_panel+"_corse_equiloisirs.html";
	o.showPanel(last_panel);
//-----------------------------------------------------------------------------
//functions to manage window resize
//-----------------------------------------------------------------------------
//resize OP5 (test screenSize every 100ms)
function resize_op5() {
  if (bt.op5) {
    o.showPanel(o.aktPanel);
    var s = new createPageSize();
    if ((screenSize.width!=s.width) || (screenSize.height!=s.height)) {
      screenSize=new createPageSize();
      //need setTimeout or resize on window-maximize will not work correct!
      //benötige das setTimeout oder das Maximieren funktioniert nicht richtig
      //setTimeout("o.resize(0,0,screenSize.width/7,screenSize.height*99/100)",100);
	  setTimeout("o.resize(0,0,200,screenSize.height*99/100)",100);
    }
    setTimeout("resize_op5()",100);
  }
}

//resize IE & NS (onResize event!)
function myOnResize() {
  if (bt.ie4 || bt.ie5 || bt.ns5) {
    var s=new createPageSize();
    //o.resize(0,0,s.width/7,s.height*99/100);
	o.resize(0,0,200,s.height*99/100);
  }
  else
    if (bt.ns4) location.reload();
}

//appel de la page de presentation sur click du panel
function page_accueil() {
activ_panel=o.aktPanel;
//alert(o.name+'_panel'+activ_panel+'_c');
if ( activ_panel != last_panel ) {
   	no_panel=activ_panel+1;
	//alert(no_panel);
	switch(no_panel){
	case 1 :
		libelle_panel="_corse_equiloisirs.html" ;
		break;
	case 2 :
		libelle_panel="_corse_rando_cheval.html" ;
		break;
	case 3 :
		libelle_panel="_corse_centre_equestre.html" ;
		break;
	case 4 :
		libelle_panel="_corse_formation_equitation_bpjeps_ate.html" ;
		break;
	case 5 :
		libelle_panel="_corse_ete_equitation.html" ;
		break;
	case 6 :
		libelle_panel="_corse_groupe_equitation.html";
		break;
	case 7 :
		libelle_panel="_corse_partenaires_equiloisirs.html";
		break;
	}
	//alert(last_panel);
	//alert(activ_panel);
	//alert(libelle_panel);
   	window.location="fa"+no_panel+libelle_panel;
   	last_panel=activ_panel;
    }
}

