// ---------------------------------------------------------------------------
// 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 = 2
  var last_panel = activ_panel - 1
  

  //create first panel
  p = new createPanel('ea1','Equiloisirs FAE');
  p.addButton('images/g1_bouton_acces.gif alt="Access"',"To join us",'window.location="eg1_equiloisirs_acces.html"'); 
  p.addButton('images/g1_bouton_installation.gif alt="Installation"',"Installation",'window.location="eg1_equiloisirs_instal.html"'); 
  p.addButton('images/g1_bouton_tarif.gif alt="Price"',"Price",'window.location="eg1_equiloisirs_price.html"'); 
  //p.addButton('images/g1_bouton_insc.gif alt="Inscriptions"',"Inscriptions",'window.location="fg1_equiloisirs_inscription.html"');  
  o.addPanel(p);

  p = new createPanel('ea2','Horse Trekking');
  p.addButton('images/g2_bouton_fiche.gif alt="Itinary"','	Itinary','window.location="eg2_horse_trekking_raid.html"');
  p.addButton('images/g2_bouton_calendrier.gif alt="Calendar"',"Calendar",'window.location="eg2_horse_trekking_calendar.html"');
  p.addButton('images/g2_bouton_resa.gif alt="Reservation"','Reservation','window.location="eg2_horse_trekking_resa.html"');
  p.addButton('images/g2_bouton_info.gif alt="Useful information"','Useful information','window.location="eg2_horse_trekking_utile.html"');
  p.addButton('images/g2_bouton_flore.gif alt="Fauna & flora"','Fauna & flora','window.location="eg2_horse_trekking_fauna.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('ea3','School');
  o.addPanel(p);
  
  p = new createPanel('ea4','Training');
  o.addPanel(p);

  p = new createPanel('ea5','Summer');
  o.addPanel(p);

  p = new createPanel('ea6','Groups');
  o.addPanel(p);
  
  p = new createPanel('ea7','Partners');
  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="_corsica_equiloisirs.html" ;
		break;
	case 2 :
		libelle_panel="_corsica_horse_trekking.html" ;
		break;
	case 3 :
		libelle_panel="_corsica_horse_school.html" ;
		break;
	case 4 :
		libelle_panel="_corsica_horse_training.html" ;
		break;
	case 5 :
		libelle_panel="_corsica_summer_riding.html" ;
		break;
	case 6 :
		libelle_panel="_corsica_horse_group.html";
		break;
	case 7 :
		libelle_panel="_corsica_partners.html";
		break;
	}
	//alert(last_panel);
	//alert(activ_panel);
	//alert(libelle_panel);
   	window.location="ea"+no_panel+libelle_panel;
   	last_panel=activ_panel;
    }
}

