// 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_e.htm'");
  fw_menu_0.addMenuItem("Parent","location='5parent_e.htm'");
  fw_menu_0.addMenuItem("Regie interne","location='5online-resources_e.htm'");
  fw_menu_0.addMenuItem("Menus","location='5menu_e.htm'");
  fw_menu_0.addMenuItem("Activities","location='5online-resources_e.htm'");
  fw_menu_0.addMenuItem("M. Express","location='5express_e.htm'");
  fw_menu_0.addMenuItem("For Sale","location='5online-resources_e.htm'");
  fw_menu_0.addMenuItem("Disc. Groups","location='5online-resources_e.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("CPE-Chelsea at a Glance","location='2cpe_e.htm'");
  fw_menu_1.addMenuItem("Montessori Benefits","location='2benefits_e.htm'");
  fw_menu_1.addMenuItem("Admission","location='2admission_e.htm'");
  fw_menu_1.addMenuItem("Tuition","location='2tuition_e.htm'");
  fw_menu_1.addMenuItem("Board","location='2board_e.htm'");
  fw_menu_1.addMenuItem("Staff","location='2staff_e.htm'");
  fw_menu_1.addMenuItem("Parent Involvement","location='2parent_e.htm'");
  fw_menu_1.addMenuItem("Location","location='2location_e.htm'");
  fw_menu_1.addMenuItem("Jobs at CPE chelsea","location='2jobs_e.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("Overview","location='3overview_e.htm'");
  fw_menu_2.addMenuItem("Pre-Kindergarten","location='3pre-k_e.htm'");
  fw_menu_2.addMenuItem("Cross Country Ski","location='3xcskipolicy_e.htm'");
  fw_menu_2.addMenuItem("Alpine Ski","location='3skipolicy_e.htm'");
  fw_menu_2.addMenuItem("Music","location='3music_e.htm'");
  fw_menu_2.addMenuItem("Dance","location='3dance_e.htm'");
  fw_menu_2.addMenuItem("Puppets","location='3puppets_e.htm'");
  fw_menu_2.addMenuItem("Summer Program","location='3summer_e.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("Schedule","location='4schedule_e.htm'");
  fw_menu_3.addMenuItem("Calendar","location='4calendar_e.htm'");
  fw_menu_3.addMenuItem("Inclement Weather Policy","location='4closing_e.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=(linkF);
}


// ***********************************************************************************************
// the following define the contents of the buttons and the links they go to
// ***********************************************************************************************

var buttonc1e = "Home";
var buttonc2e = "About Us";
var buttonc3e = "Classes & Curriculum";
var buttonc4e = "Schedule & Calendar";
var buttonc5e = "Online Resources";

var linkc1e = "1home_e.htm";
var linkc2e = "2about_e.htm";
var linkc3e = "3classes_e.htm";
var linkc4e = "4schedule-calendar_e.htm";
var linkc5e = "5online-resources_e.htm";

var buttonc1f = "Page Principale";
var buttonc2f = "A propos de nous";
var buttonc3f = "Classes & 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/x120christmas.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'>");
}
}