
//
//	 menus déroulant pour le site ROULEZROSE
//  Guy RUMP        19/12/2005
//

// Styles utilisés
if ( typeof tableMenuClass == 'undefined' ) {
	var tableMenuClass = "header_menu";
}

if ( typeof cellMenuClass == 'undefined' ) {
	var cellMenuClass =null;
}

if ( typeof linkMenuClass == 'undefined' ) {
	var linkMenuClass = null;
}

// Ecriture d'un menu
function writeMenu( id, lWidth, lHeight )
{
document.writeln("<DIV id='", id , "' onmouseover=\"showLayer('",id,"')\" onmouseout=\"hideLayer('",id, "')\"",
	"style='Z-INDEX: 10; VISIBILITY: hidden; OVERFLOW: visible;  WIDTH:", lWidth, "px;  HEIGHT:", lHeight, "px;  POSITION: absolute;'>");
document.writeln("<table cellspacing=0 width=100% class='", tableMenuClass ,"'>");

var args = writeMenu.arguments ;
var action;
var texte;
for ( i=3; i+1 < args.length; i +=2 ) {

	action = args[i];
	texte = args[i+1];
       if ( cellMenuClass != null ) {
	      document.write("<tr><td class='",cellMenuClass, "'>");
       } else {
	      document.write("<tr><td>");
       }
       if ( linkMenuClass != null ) {
              document.writeln("<A class='", linkMenuClass, "' href=\"javascript:", action, "\">", texte, "</a></td></tr>");
       } else {
              document.writeln("<A href=\"", action, "\">", texte, "</a></td></tr>");
       }
}
document.writeln("</table></DIV>");
}

//
// Ecrire les menus déroulant
//
function makeMenus( ) {
	if (ns4) return;
// Nos randos
writeMenu( "rando", "120", "150",
	"presentation.php",            "Présentation",
	"agenda.php",                  "Agenda",
	"securite.php",                "Règles",
    "staff.php",                   "Staff",
	"frequentation.php",           "Chiffres",
	"mailto:rando@roulezrose.com", "Contact" );

// Adhérents
writeMenu( "adhlayer", "120", "150",
	"adhesion.php",     "Adhérez !",
	"cours.php",        "Cours",
	"http://hockey.roulezrose.com", "Hockey",
	"vitesse.php", "Vitesse",
 	"sortie_adh.php",   "Sorties",
	"mailto:adherent@roulezrose.com", "Contact" );

// La com
writeMenu( "com", "120", "100",
    "presse.php",       "Revue de presse",
	"partenaires.php",  "Partenaires",
	"goodies.php",      "Goodies",
	"mailto:communication@roulezrose.com", "Contact" );

// Utils 
writeMenu( "utiles", "120", "75",
	"coursnet.php",         "Cours en ligne",
    "liens.php",            "Liens");


        
setTimeout("setPositionDiv()",100);

window.onresize= setPositionDiv;

}

function setPositionDiv() {
var topMargin=23;
var leftMargin=5;

setToAnchor('idRando','rando',topMargin,leftMargin);
setToAnchor('idmenuadh','adhlayer',topMargin,leftMargin);
setToAnchor('idCom','com',topMargin,leftMargin);
setToAnchor('idUtiles','utiles',topMargin,leftMargin);

}

