function WM_readCookie(name) {
    if(document.cookie == '') { // there's no cookie, so go no further
        return '';
    } else { // there is a cookie
        var firstChar, lastChar;
        var theBigCookie = document.cookie;
        firstChar = theBigCookie.indexOf(name); // find the start of 'name'
        var NN2Hack = firstChar + name.length;
        if((firstChar != -1) && (theBigCookie.charAt(NN2Hack) == '=')) { // if you found the cookie
            firstChar += name.length + 1; // skip 'name' and '='
            lastChar = theBigCookie.indexOf(';', firstChar); // Find the end of the value string (i.e. the next ';').
            if(lastChar == -1) lastChar = theBigCookie.length;
            return unescape(theBigCookie.substring(firstChar, lastChar));
        } else { // If there was no cookie of that name, return ''.
            return '';
        }
    }
} // WM_readCookie

/* COOLjsMenu style + structure file */

//styles
var color = {border:"#666666", shadow:"#DBD8D1", bgON:"#6091c2",bgOVER:"green"};
var css = {ON:"clsCMOn", OVER:"clsCMOver"};
var STYLE = {border:1, shadow:2, color:color, css:css};

//items and formats
if (WM_readCookie("securitycode") == "C" || WM_readCookie("securitycode") == "M")
{
  var MENU_ITEMS_E =
  [
    {pos:[5,275], itemoff:[21,0], leveloff:[21,0], style:STYLE, size:[22,140]},
    {code:"Français", url:"index_f.html"},
    {code:"Home", url:"index_e.html"},
    {code:"Objectives", url:"objectives_e.html", tip:"Objectives of the Rotary."},
    {code:"Accomplishments", url:"accomplishments_e.html", tip:"Accomplishments of the Rotary."},
    {code:"Paul Harris", url:"paul_harris_e.html", tip:"Paul Harris recipients."},
    {code:"Event Photos", url:"event_photos_e.html", tip:"Pictures and videos from Rotary events."},
//    {code:"Activities", url:"activities_e.html", tip:"Calendar of the Rotary activities."},
    {code:"Committees", url:"committees_e.html", tip:"Committees"},
//    {code:"Becomming a member", url:"membership_e.html", tip:"How to become a member"},
    {code:"Links", url:"links_e.html", tip:"Links to other sites"},
    {code:"Map", url:"map_e.html", tip:"Map of the region concerning the Rotary Huntingdon"},
    {code:"Members Info", url:"member_info_e.asp", tip:"Information for members"},
    {code:"Members List", url:"member_list_e.asp", tip:"List of members"},
    {code:"Members Current List", url:"member_list_current_e.asp", tip:"List of active and honary members"},
    {code:"Members Printable List", url:"member_print_list_e.asp", target:"_blank", tip:"List of members printable"},
    {code:"Members Phone List", url:"member_print_tel_list_e.asp", target:"_blank", tip:"List of members phone numbers printable"},
//    {code:"Calendar List", url:"calendar_list_e.asp", tip:"Calendar with events and reminders"},
//    {code:"Attendance List", url:"attendance_list_e.asp", tip:"List attendance with statictics"},
    {code:"Attendance List", url:"membership/attendance.pdf", target:"_blank", tip:"List attendance with statictics"},
    {code:"Previous Attendance", url:"attendance_year_entry_e.asp", tip:"List attendance with statictics for previous years"},
    {code:"Document List",
      sub:[
        {itemoff:[21,0], leveloff:[0,140], size:[22,240]},
        {code:"Agendas", "url":"doc_list_e.asp?Agendas"},
        {code:"By-Laws and Constitution", "url":"doc_list_e.asp?By_Laws_and_Constitution"},
        {code:"Calendar", "url":"doc_list_e.asp?Calendar"},
        {code:"Correspondence", "url":"doc_list_e.asp?Correspondence"},
        {code:"Event Procedures", "url":"doc_list_e.asp?Event_Procedures"},
        {code:"Executive Committee Agendas", "url":"doc_list_e.asp?Executive_Committee_Agendas"},
        {code:"Executive Committee Minutes", "url":"doc_list_e.asp?Executive_Committee_Minutes"},
        {code:"Financial", "url":"doc_list_e.asp?Financial"},
        {code:"Job Descriptions", "url":"doc_list_e.asp?Job_Descriptions"},
        {code:"Minutes", "url":"doc_list_e.asp?Minutes"},
        {code:"Membership", "url":"doc_list_e.asp?Membership"},
        {code:"Membership Documents", "url":"doc_list_e.asp?Membership_Documents"},
      ]
    },
    {code:"Add Member", url:"member_add_entry_e.asp", tip:"Add a member"},
    {code:"Memo Update", url:"memo_update_entry_e.asp", tip:"Update memos"},
//    {code:"Add Calendar", url:"calendar_add_entry_e.asp", tip:"Add a calendar date"},
    {code:"Maintain Attendance", url:"attendance_date_entry_e.asp", tip:"Add or update an attendance date"},
    {code:"Web Site Statistics", url:"db_access_list_e.asp", target:"_blank"},
    {code:"Web Site Logins", url:"db_login_stats_e.asp", target:"_blank"},
    {code:"Load Documents", url:"doc_load_entry_c_e.html", tip:"Load documents"}
  ];
}
else if (WM_readCookie("membertype") == "Member")
{
  var MENU_ITEMS_E =
  [
    {pos:[5,275], itemoff:[21,0], leveloff:[21,0], style:STYLE, size:[22,140]},
    {code:"Français", url:"index_f.html"},
    {code:"Home", url:"index_e.html"},
    {code:"Objectives", url:"objectives_e.html", tip:"Objectives of the Rotary."},
    {code:"Accomplishments", url:"accomplishments_e.html", tip:"Accomplishments of the Rotary."},
    {code:"Paul Harris", url:"paul_harris_e.html", tip:"Paul Harris recipients."},
    {code:"Event Photos", url:"event_photos_e.html", tip:"Pictures and videos from Rotary events."},
//    {code:"Activities", url:"activities_e.html", tip:"Calendar of the Rotary activities."},
    {code:"Committees", url:"committees_e.html", tip:"Committees"},
//    {code:"Becomming a member", url:"membership_e.html", tip:"How to become a member"},
    {code:"Links", url:"links_e.html", tip:"Links to other sites"},
    {code:"Map", url:"map_e.html", tip:"Map of the region concerning the Rotary Huntingdon"},
    {code:"Members Info", url:"member_info_e.asp", tip:"Information for members"},
    {code:"Members List", url:"member_list_e.asp", tip:"List of members"},
    {code:"Members Current List", url:"member_list_current_e.asp", tip:"List of active and honary members"},
    {code:"Members Printable List", url:"member_print_list_e.asp", target:"_blank", tip:"List of members printable"},
    {code:"Members Phone List", url:"member_print_tel_list_e.asp", target:"_blank", tip:"List of members phone numbers printable"},
//    {code:"Calendar List", url:"calendar_list_e.asp", tip:"Calendar with events and reminders"},
//    {code:"Attendance List", url:"attendance_list_e.asp", tip:"List attendance with statictics"},
    {code:"Attendance List", url:"membership/attendance.pdf", target:"_blank", tip:"List attendance with statictics"},
    {code:"Previous Attendance", url:"attendance_year_entry_e.asp", tip:"List attendance with statictics for prevous years"},
    {code:"Web Site Statistics", url:"db_access_list_e.asp", target:"_blank"},
    {code:"Web Site Logins", url:"db_login_stats_e.asp", target:"_blank"},
    {code:"Document List",
      sub:[
        {itemoff:[21,0], leveloff:[0,140], size:[22,240]},
        {code:"Agendas", "url":"doc_list_e.asp?Agendas"},
        {code:"By-Laws and Constitution", "url":"doc_list_e.asp?By_Laws_and_Constitution"},
        {code:"Calendar", "url":"doc_list_e.asp?Calendar"},
        {code:"Correspondence", "url":"doc_list_e.asp?Correspondence"},
        {code:"Event Procedures", "url":"doc_list_e.asp?Event_Procedures"},
        {code:"Financial", "url":"doc_list_e.asp?Financial"},
        {code:"Job Descriptions", "url":"doc_list_e.asp?Job_Descriptions"},
        {code:"Minutes", "url":"doc_list_e.asp?Minutes"},
        {code:"Membership", "url":"doc_list_e.asp?Membership"},
      ]
    },
  ];
}
else if (WM_readCookie("membertype") == "Admin")
{
  var MENU_ITEMS_E =
  [
    {pos:[5,275], itemoff:[21,0], leveloff:[21,0], style:STYLE, size:[22,140]},
    {code:"Français", url:"index_f.html"},
    {code:"Home", url:"index_e.html"},
    {code:"Objectives", url:"objectives_e.html", tip:"Objectives of the Rotary."},
    {code:"Accomplishments", url:"accomplishments_e.html", tip:"Accomplishments of the Rotary."},
    {code:"Paul Harris", url:"paul_harris_e.html", tip:"Paul Harris recipients."},
    {code:"Event Photos", url:"event_photos_e.html", tip:"Pictures and videos from Rotary events."},
//    {code:"Activities", url:"activities_e.html", tip:"Calendar of the Rotary activities."},
    {code:"Committees", url:"committees_e.html", tip:"Committees"},
//    {code:"Becomming a member", url:"membership_e.html", tip:"How to become a member"},
    {code:"Links", url:"links_e.html", tip:"Links to other sites"},
    {code:"Map", url:"map_e.html", tip:"Map of the region concerning the Rotary Huntingdon"},
    {code:"Members Info", url:"member_info_e.asp", tip:"Information for members"},
    {code:"Members List", url:"member_list_e.asp", tip:"List of members"},
    {code:"Members Current List", url:"member_list_current_e.asp", tip:"List of active and honary members"},
    {code:"Members Printable List", url:"member_print_list_e.asp", target:"_blank", tip:"List of members printable"},
    {code:"Members Phone List", url:"member_print_tel_list_e.asp", target:"_blank", tip:"List of members phone numbers printable"},
//    {code:"Calendar List", url:"calendar_list_e.asp", tip:"Calendar with events and reminders"},
//    {code:"Attendance List", url:"attendance_list_e.asp", tip:"List attendance with statictics"},
    {code:"Attendance List", url:"membership/attendance.pdf", target:"_blank", tip:"List attendance with statictics"},
    {code:"Previous Attendance", url:"attendance_year_entry_e.asp", tip:"List attendance with statictics for previous years"},
    {code:"Document List",
      sub:[
        {itemoff:[21,0], leveloff:[0,140], size:[22,240]},
        {code:"Agendas", "url":"doc_list_e.asp?Agendas"},
        {code:"By-Laws and Constitution", "url":"doc_list_e.asp?By_Laws_and_Constitution"},
        {code:"Calendar", "url":"doc_list_e.asp?Calendar"},
        {code:"Correspondence", "url":"doc_list_e.asp?Correspondence"},
        {code:"Event Procedures", "url":"doc_list_e.asp?Event_Procedures"},
        {code:"Executive Committee Agendas", "url":"doc_list_e.asp?Executive_Committee_Agendas"},
        {code:"Executive Committee Minutes", "url":"doc_list_e.asp?Executive_Committee_Minutes"},
        {code:"Financial", "url":"doc_list_e.asp?Financial"},
        {code:"Job Descriptions", "url":"doc_list_e.asp?Job_Descriptions"},
        {code:"Minutes", "url":"doc_list_e.asp?Minutes"},
        {code:"Membership", "url":"doc_list_e.asp?Membership"},
      ]
    },
    {code:"Add Member", url:"member_add_entry_e.asp", tip:"Add a member"},
    {code:"Memo Update", url:"memo_update_entry_e.asp", tip:"Update memos"},
//    {code:"Add Calendar", url:"calendar_add_entry_e.asp", tip:"Add a calendar date"},
    {code:"Maintain Attendance", url:"attendance_date_entry_e.asp", tip:"Add or update an attendance date"},
    {code:"Web Site Statistics", url:"db_access_list_e.asp", target:"_blank"},
    {code:"Web Site Logins", url:"db_login_stats_e.asp", target:"_blank"},
    {code:"Load Documents", url:"doc_load_entry_e.html", tip:"Load documents"}
  ];
}
else
{
  var MENU_ITEMS_E =
  [
    {pos:[5,275], itemoff:[21,0], leveloff:[21,0], style:STYLE, size:[22,140]},
    {code:"Français", url:"index_f.html"},
    {code:"Home", url:"index_e.html"},
    {code:"Objectives", url:"objectives_e.html", tip:"Objectives of the Rotary."},
    {code:"Accomplishments", url:"accomplishments_e.html", tip:"Accomplishments of the Rotary."},
    {code:"Paul Harris", url:"paul_harris_e.html", tip:"Paul Harris recipients."},
    {code:"Event Photos", url:"event_photos_e.html", tip:"Pictures and videos from Rotary events."},
//    {code:"Activities", url:"activities_e.html", tip:"Calendar of the Rotary activities."},
//    {code:"Becomming a member", url:"membership_e.html", tip:"How to become a member"},
    {code:"Links", url:"links_e.html", tip:"Links to other sites"},
    {code:"Map", url:"map_e.html", tip:"Map of the region concerning the Rotary Huntingdon"},
    {code:"For members", url:"member_login_entry_e.asp", tip:"Login for members"}
  ];
}

var menu = new COOLjsMenuPRO("menu", MENU_ITEMS_E);
menu.initTop();

