// the following function defines the pull down menus for the row of buttons on all pages

var butforeground = "#333399";
var butbackground = "#B8D4D9";
var buttextforeground = "#B8D4D9";
var buttextbackground = "#333399";

function fwLoadMenus() {
  if (window.fw_menu_0) return;

  window.fw_menu_0 = new Menu("root",114,17,"Verdana, Arial, Helvetica, sans-serif",10,buttextforeground,buttextbackground,butforeground,butbackground);
  fw_menu_0.addMenuItem("Montessori","location='5montessori_f.htm'");
  fw_menu_0.addMenuItem("Parents","location='5parent_f.htm'");
  fw_menu_0.addMenuItem("Regie interne","location='5online-resources_f.htm'");
  fw_menu_0.addMenuItem("Menus","location='5menu_f.htm'");
  fw_menu_0.addMenuItem("Activités","location='5online-resources_f.htm'");
  fw_menu_0.addMenuItem("M. Express","location='5express_f.htm'");
  fw_menu_0.addMenuItem("A vendre","location='5online-resources_f.htm'");
  fw_menu_0.addMenuItem("Groupes de disc.","location='5online-resources_f.htm'");
   fw_menu_0.hideOnMouseOut=true;

  window.fw_menu_1 = new Menu("root",474,17,"Verdana, Arial, Helvetica, sans-serif",10,buttextforeground,buttextbackground,butforeground,butbackground);
  fw_menu_1.addMenuItem("Un aperçu du CPE","location='2cpe_f.htm'");
  fw_menu_1.addMenuItem("Pédagogie Montessori","location='2benefits_f.htm'");
  fw_menu_1.addMenuItem("Admission","location='2admission_f.htm'");
  fw_menu_1.addMenuItem("Frais de garde","location='2tuition_f.htm'");
  fw_menu_1.addMenuItem("Conseil d'Administration","location='2board_f.htm'");
  fw_menu_1.addMenuItem("Équipe du personnel","location='2staff_f.htm'");
  fw_menu_1.addMenuItem("Implication des parents","location='2parent_f.htm'");
  fw_menu_1.addMenuItem("Où sommes nous situé","location='2location_f.htm'");
  fw_menu_1.addMenuItem("Emplois au CPE-Chelsea","location='2jobs_f.htm'");
   fw_menu_1.hideOnMouseOut=true;

  window.fw_menu_2 = new Menu("root",355,17,"Verdana, Arial, Helvetica, sans-serif",10,buttextforeground,buttextbackground,butforeground,butbackground);
  fw_menu_2.addMenuItem("Aperçu","location='3overview_f.htm'");
  fw_menu_2.addMenuItem("Pre-maternelle","location='3pre-k_f.htm'");
  fw_menu_2.addMenuItem("Ski de fond","location='3xcskipolicy_f.htm'");
  fw_menu_2.addMenuItem("Ski Alpin","location='3skipolicy_f.htm'");
  fw_menu_2.addMenuItem("Musique","location='3music_f.htm'");
  fw_menu_2.addMenuItem("Danse","location='3dance_f.htm'");
  fw_menu_2.addMenuItem("Marionnettes","location='3puppets_f.htm'");
  fw_menu_2.addMenuItem("Programme d'été","location='3summer_f.htm'");
   fw_menu_2.hideOnMouseOut=true;

  window.fw_menu_3 = new Menu("root",234,17,"Verdana, Arial, Helvetica, sans-serif",10,buttextforeground,buttextbackground,butforeground,butbackground);
  fw_menu_3.addMenuItem("Horaire","location='4schedule_f.htm'");
  fw_menu_3.addMenuItem("Calendrier","location='4calendar_f.htm'");
  fw_menu_3.addMenuItem("Politique en cas de mauvais temps","location='4closing_f.htm'");
   fw_menu_3.hideOnMouseOut=true;
   fw_menu_3.writeMenus();

} // fwLoadMenus()


// ***********************************************************************************************
// Coding to toggle between French and English
// ***********************************************************************************************


function translateE(){
var str1 = document.URL.slice(0,-5)+"e.htm";    //finds the equivalent English URL
var linkE = str1;
window.location=(linkE);
}


function translateF(){
var str2 = document.URL.slice(0,-5)+"f.htm";    //finds the equivalent French URL
var linkF = str2;
window.location=(linkE);
}


// ***********************************************************************************************
// the following define the contents of the buttons and the links they go to
// ***********************************************************************************************


var buttonc1f = "Page Principale";
var buttonc2f = "A propos de nous";
var buttonc3f = "Cours & Curriculum";
var buttonc4f = "Horaire & Calendrier";
var buttonc5f = "Resources en-ligne";

var linkc1f = "1home_f.htm";
var linkc2f = "2about_f.htm";
var linkc3f = "3classes_f.htm";
var linkc4f = "4schedule-calendar_f.htm";
var linkc5f = "5online-resources_f.htm";



// ***********************************************************************************************
//These are variable/changeable parameters/values for content 
// ***********************************************************************************************
	
	copyright = "2002-2004";
	tel = "(819) 827-0787";
        fax = "(819) 827-1521";
        street = "66 Old Chelsea Road";
        rue = "66, chemin Old Chelsea";
        cityprov = "Chelsea, Québec";
        zip = "J9B 1K9";
        country = "Canada";
        domainsuffix= "com"; 


// ***********************************************************************************************
// e-mail address scripts to prevent e-mail address mining from spiders
// ***********************************************************************************************

        name1en="admin";
        name2en="accounting";
        name3en="support";
        name4en="careers";
        name5en="webmaster";
        name1fr="admin";
        name2fr="comptabilite";
        name3fr="support";
        name4fr="carriere";
        name5fr="webmestre";
        at="@";
        domain="cpe-chelsea.com";


// ***********************************************************************************************
// the following function is used to change the background color of the sidebar when the mouse passes over
// ***********************************************************************************************

function highlight(obj, color) {
	obj.style.backgroundColor = color;
}

// ***********************************************************************************************
// used to create a custom image based on the event or time of year
// ***********************************************************************************************

function calendarevent() {
today=new Date(); //determines the current date
var numofmonths = today.getMonth();
// calculates the number of days that have gone by based on the month
switch (numofmonths) {
 case 0 : 
 julianmonth=0
 break
 case 1 : 
 julianmonth=31
 break
 case 2 : 
 julianmonth=59
 break
 case 3 : 
 julianmonth=90
 break
 case 4 : 
 julianmonth=120
 break
 case 5 : 
 julianmonth=151
 break
 case 6 : 
 julianmonth=181
 break
 case 7 : 
 julianmonth=212
 break
 case 8 : 
 julianmonth=243
 break
 case 9 : 
 julianmonth=273
 break
 case 10 : 
 julianmonth=304
 break
 case 11 : 
 julianmonth=334
 break
 default: julianmonth=0
}

numofdays = today.getDate()
//adds the number of days of the current month to the total of days in months gone by
juliandate=julianmonth+numofdays

//based on the julian date, display different images each year.
if (juliandate > 0 && juliandate<6) {
 document.write("<IMG SRC='library/images/x120newyear.gif' WIDTH='120' HEIGHT='117'>");
}
if (juliandate > 41 && juliandate<46) {
 document.write("<IMG SRC='library/images/x120valentine.gif' WIDTH='120' HEIGHT='117'>");
}
if (juliandate > 179 && juliandate< 184) {
 document.write("<IMG SRC='library/images/x120canadaday.gif' WIDTH='120' HEIGHT='117'>");
}
if (juliandate > 290 && juliandate<305) {
 document.write("<IMG SRC='library/images/x120halloween.gif' WIDTH='120' HEIGHT='117'>");
}
if (juliandate > 308 && juliandate<316) {
 document.write("<IMG SRC='library/images/x120rememberance.gif' WIDTH='120' HEIGHT='117'>");
}
if (juliandate > 349 && juliandate<364) {
 document.write("<IMG SRC='library/images/x120wreath.gif' WIDTH='120' HEIGHT='117'>");
} 
if (juliandate > 363 && juliandate<366) {
 document.write("<IMG SRC='library/images/x120newyear.gif' WIDTH='120' HEIGHT='117'>");
} 
if (juliandate > 78 && juliandate<82) {
document.write("<IMG SRC='library/images/x120spring.gif' WIDTH='120' HEIGHT='117'>");
}
if (juliandate > 171 && juliandate<174) {
document.write("<IMG SRC='library/images/x120summer.gif' WIDTH='120' HEIGHT='117'>");
} 
if (juliandate > 265 && juliandate<268) {
document.write("<IMG SRC='library/images/x120autumn.gif' WIDTH='120' HEIGHT='117'>");
}
if (juliandate > 340 && juliandate<350) {
document.write("<IMG SRC='library/images/x120winter.gif' WIDTH='120' HEIGHT='117'>");
}
}