
// Modified by Tom Salmon, 08/28/02
// Updated 08/28/02 by Tom Salmon
// This script creates the pulldown menus on the main page banner



// **************************************************************************************
// TWO FUNCTIONS CONTROL CONTENT AND POSITION
// NOTE: DISPLAYED MENU IS LOCATED IN HTML. THIS SCRIPT ONLY DEALS WITH DROPDOWN MENUS.
// FUNCTION #1. function popOver() - This function shows the dropdown menus on
//   mouseover. The position of the menu is controlled here (along with the function drawMenu() 
//   function). 
// FUNCTION #2. function drawMenu() - This function writes the arrays for the dropdown
//   menus. Change the content, dropdown options, and position here. The position works
//   along with the position specifications in the function popOver() function. See this
//   function help description below for more details.
// **************************************************************************************


// **************************************************************************************
// *******************************  GLOBAL VARIABLES  ***********************************

// Set these global variables to change colors and position of menus.
// Text content, links, and dropdown options are changed in the function drawMenu() function.
// Text colors and borders are in the HTML style sheets, not on this script.

// *** BROWSER CHECK ***
var isDOM = (document.getElementById ? true : false); 
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);


// *** COLORS ***
var defBack = '#ACC8AC';  // level2 menu color (background, not text)
var defOver = '#ffffff';  // level2 menu over color (background, not text)
var level3_color = '#ACC8AC';  // level3 menu color (background, not text)
var level3_overcolor = '#ffffff';  // level3 menu over color (background, not text)


// Specifies top menu or side menu. See group js files for side menu array elements.
whichmenu = new Array();
whichmenu[0] = "";
whichmenu[1] = "topmenu";
whichmenu[2] = "topmenu";
whichmenu[3] = "topmenu";
whichmenu[4] = "topmenu";
whichmenu[5] = "topmenu";
whichmenu[6] = "topmenu";
whichmenu[7] = "topmenu";
whichmenu[8] = "topmenu";

// var "main_top_position" controls top position. See function popOver() to change settings.
// var "left" controls left position. See function popOver() to change settings.
var main_left_bump_position = 2;  // main menu padding from left edge for NS4 and NS6
var level2_left_offset = 420;  // 3rd level menu left offset for DOM2. See below for NS4. OK to change this globally.
var level2_top_offset = 18;  // 2nd level menu top offset.

if(!isNS4) {
  //    change the number of the below variables (xOffsetItem#) to reflect the number of items in the main menu
  var xOffsetItem1 = 219;  // main menu first item offset. Changes distances of level2+ menus in relation to item seven.
  var xOffsetItem2 = 76;  // main menu first item offset. Used in conjunction with 'main_left_bump_position' in NS's.
  var xOffsetItem3 = 27;  // main menu second item offset. Changes distances of level2+ menus in relation to item two.
  var xOffsetItem4 = 80;  // main menu first item offset. Changes distances of level2+ menus in relation to item three.
  var xOffsetItem5 = 104;  // main menu first item offset. Changes distances of level2+ menus in relation to item four.
  var xOffsetItem6 = 129;  // main menu first item offset. Changes distances of level2+ menus in relation to item five.
  var xOffsetItem7 = 160;  // main menu first item offset. Changes distances of level2+ menus in relation to item six.
  var xOffsetItem8 = 76;  // main menu first item offset. Changes distances of level2+ menus in relation to item six.
}
else {
  //    change the number of the below variables (xOffsetItem#) to reflect the number of items in the main menu
  var xOffsetItem1 = 197;  // main menu first item offset. Changes distances of level2+ menus in relation to item seven.
  var xOffsetItem2 = 96;  // main menu first item offset. Used in conjunction with 'main_left_bump_position' in NS's.
  var xOffsetItem3 = 27;  // main menu second item offset. Changes distances of level2+ menus in relation to item two.
  var xOffsetItem4 = 80;  // main menu first item offset. Changes distances of level2+ menus in relation to item three.
  var xOffsetItem5 = 104;  // main menu first item offset. Changes distances of level2+ menus in relation to item four.
  var xOffsetItem6 = 129;  // main menu first item offset. Changes distances of level2+ menus in relation to item five.
  var xOffsetItem7 = 160;  // main menu first item offset. Changes distances of level2+ menus in relation to item six.
  var xOffsetItem8 = 76;  // main menu first item offset. Changes distances of level2+ menus in relation to item six.
}

//    change the number of the below variables (menu#_width) to reflect the number of the level3 pulldown menu in the array
var menu1_width = 166;  // 2nd level menu (menu6) width
var menu2_width = 207;  // 2nd level menu (menu2) width
var menu3_width = 240;  // 2nd level menu (menu3) width
var menu4_width = 190;  // 2nd level menu (menu4) width
var menu5_width = 475;  // 2nd level menu (menu5) width
var menu6_width = 230;  // 3rd level menu (menu6) width
var menu7_width = 165;  // 2nd level menu (menu7) width
var menu8_width = 240;  // 2nd level menu (menu8) width



// ** POSITION CONVERSIONS ** DO NOT EDIT **
if(isNS4) level2_left_offset -= 340


// **************************************************************************************
// ******************************  END GLOBAL VARIABLES  ********************************



function drawMenu() {
// **************************************************************************************
// corporate "top menu" items ONLY go here. Add group "side menu" items in group js files.
// **************************************************************************************

menu[0] = new Array();
menu[0][0] = new Menu(false, '', xpos, 59, 17, '#eeeeee', '#eeeeee', '', 'menuText1');
menu[0][1] = new Item('', '', '', xOffsetItem1, 10, 0);
menu[0][2] = new Item('', '', '', xOffsetItem2, 10, 1);
menu[0][3] = new Item('', '', '', xOffsetItem3, 10, 2);
menu[0][4] = new Item('', '', '', xOffsetItem4, 10, 0);
menu[0][5] = new Item('', '', '', xOffsetItem5, 10, 3);
menu[0][6] = new Item('', '', '', xOffsetItem6, 10, 4);
menu[0][7] = new Item('', '', '', xOffsetItem7, 10, 7);
menu[0][8] = new Item('', '', '', xOffsetItem8, 10, 8);

// Item #1 menu (menu[0][1]). - ALPHABETICALLY
menu[1] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[1][0] = new Menu(true, '>', xpos, 22, menu1_width, defOver, defBack, 'menuBorder1', 'menuText1');
// menu[1][0] = new Menu(true, '>', xpos, 0, menu1_width, level3_overcolor, level3_color, 'menuBorder2', 'menuText1');
menu[1][1] = new Item('Charles O. Finne III', '/physicians/finne.htm', '', defLength, 0, 0);
menu[1][2] = new Item('Brett T. Gemlo', '/physicians/gemlo.htm', '', defLength, 0, 0);
menu[1][3] = new Item('Stanley M. Goldberg', '/physicians/goldberg.htm', '', defLength, 0, 0);
menu[1][4] = new Item('Richard E. Karulf', '/physicians/karulf.htm', '', defLength, 0, 0);
menu[1][5] = new Item('Ann C. Lowry', '/physicians/lowry.htm', '', defLength, 0, 0);
menu[1][6] = new Item('Anders F. Mellgren', '/physicians/mellgren.htm', '', defLength, 0, 0);
menu[1][7] = new Item('Jeffrey J. Morken', '/physicians/morken.htm', '', defLength, 0, 0);
menu[1][8] = new Item('Frederic D. Nemer', '/physicians/nemer.htm', '', defLength, 0, 0);
menu[1][9] = new Item('Elizabeth R. Raskin', '/physicians/raskin.htm', '', defLength, 0, 0);
menu[1][10] = new Item('Heather L. Rossi', '/physicians/rossi.htm', '', defLength, 0, 0);
menu[1][11] = new Item('Nagesh B. Ravipati', '/physicians/ravipati.htm', '', defLength, 0, 0);
menu[1][12] = new Item('Ann K. Seltman', '/physicians/seltman.htm', '', defLength, 0, 0);
menu[1][13] = new Item('Michael P. Spencer', '/physicians/spencer.htm', '', defLength, 0, 0);
menu[1][14] = new Item('Amy J. Thorsen', '/physicians/thorsen.htm', '', defLength, 0, 0);
menu[1][15] = new Item('Judith L. Trudel', '/physicians/trudel.htm', '', defLength, 0, 0);
menu[1][16] = new Item('James B. Williams, II', '/physicians/williams.htm', '', defLength, 0, 0);

// Item #2 menu (menu[0][2]). - PRODUCTS
menu[2] = new Array();
menu[2][0] = new Menu(true, '<', 0, 22, menu2_width, defOver, defBack, 'menuBorder1', 'menuText1');
menu[2][1] = new Item('Conditions', '/patientinfo/conditions/conditions.htm', '', defLength, 0, 6);
menu[2][2] = new Item('Patient Care', '/patientinfo/patientcare/patientcare.htm', '', defLength, 0, 5);
menu[2][3] = new Item('Definitions', '/patientinfo/definitions/definitions.htm', '', defLength, 0, 0);
menu[2][4] = new Item('Specialized Clinical Programs', '/patientinfo/specialized/specialized.htm', '', defLength, 0, 0);
menu[2][5] = new Item('Medical Record Requests', '/patientinfo/medrecords/medrecords.htm', '', defLength, 0, 0);
menu[2][6] = new Item('Online Patient Services', 'http://www.mycrsal.org', '', defLength, 0, 0);

// Item #3 menu (menu[0][3]). - DISTRIBUTORS
menu[3] = new Array();
menu[3][0] = new Menu(true, '<', 0, 22, menu3_width, defOver, defBack, 'menuBorder1', 'menuText1');
menu[3][1] = new Item('General Information', '/billing/geninfo.htm', '', defLength, 0, 0);
menu[3][2] = new Item('Insurance Processing', '/billing/insurance.htm', '', defLength, 0, 0);
menu[3][3] = new Item('Referrals/Authorizations/Co-Payments', '/billing/referrals.htm', '', defLength, 0, 0);
menu[3][4] = new Item('Self Pay Patients', '/billing/selfpay.htm', '', defLength, 0, 0);
menu[3][5] = new Item('Fees & Estimates', '/billing/fees.htm', '', defLength, 0, 0);
menu[3][6] = new Item('Online Patient Services', 'http://www.mycrsal.org', '', defLength, 0, 0);

// Item #4 menu (menu[0][4]). - EDUCATION
menu[4] = new Array();
menu[4][0] = new Menu(true, '<', 0, 22, menu4_width, defOver, defBack, 'menuBorder1', 'menuText1');
menu[4][1] = new Item('Courses', '/education/courses.htm', '', defLength, 0, 0);
menu[4][2] = new Item('U of M Residency & Visitors', '/education/uofm.htm', '', defLength, 0, 0);

// Item #5 menu (menu[0][5]). - PRODUCT GROUPS
menu[5] = new Array();
menu[5][0] = new Menu(true, '>', xpos, 0, menu5_width, level3_overcolor, level3_color, 'menuBorder2', 'menuText1');
menu[5][1] = new Item('Patient Forms', '/patientinfo/patientcare/patientforms.htm', '', defLength, 0, 0);
menu[5][2] = new Item('Instructions for Colonoscopy', '/patientinfo/patientcare/instructcolon.htm', '', defLength, 0, 0);
menu[5][3] = new Item('Post-Operative Instructions for Colon, Small Bowel, and Excisions of the Rectum', '/patientinfo/patientcare/postopinstruct.htm', '', defLength, 0, 0);
menu[5][4] = new Item('Post-Operative Instructions For Anorectal Surgery', '/patientinfo/patientcare/postopanalrectal.htm', '', defLength, 0, 0);
menu[5][5] = new Item('Preoperative Information for an Anorectal Surgical Procedure', '/patientinfo/patientcare/preopanalrectal.htm', '', defLength, 0, 0);
menu[5][6] = new Item('Preoperative Instructions for Colon Surgery', '/patientinfo/patientcare/preopcolon.htm', '', defLength, 0, 0);

// Item #6 menu (menu[0][6]). - ALPHABETICALLY
menu[6] = new Array();
// This is across but not down... a horizontal popout (with crazy stylesheets :)...
menu[6][0] = new Menu(true, '>', xpos, 0, menu6_width, level3_overcolor, level3_color, 'menuBorder2', 'menuText1');
menu[6][1] = new Item('Anal Fissures', '/patientinfo/conditions/fissures.htm', '', defLength, 0, 0);
menu[6][2] = new Item('Anal Warts', '/patientinfo/conditions/analwarts.htm', '', defLength, 0, 0);
menu[6][3] = new Item('Colorectal Cancer', '/patientinfo/conditions/colorectal.htm', '', defLength, 0, 0);
menu[6][4] = new Item('Colonoscopy', '/patientinfo/conditions/colonoscopy.htm', '', defLength, 0, 0);
menu[6][5] = new Item('Constipation', '/patientinfo/conditions/constipation.htm', '', defLength, 0, 0);
menu[6][6] = new Item('Diarrhea', '/patientinfo/conditions/diarrhea.htm', '', defLength, 0, 0);
menu[6][7] = new Item('Diverticulosis and Diverticulitis', '/patientinfo/conditions/diverticulosis.htm', '', defLength, 0, 0);
menu[6][8] = new Item('Drainage of Abscesses', '/patientinfo/conditions/drainage.htm', '', defLength, 0, 0);
menu[6][9] = new Item('Flexible Sigmoidoscopy', '/patientinfo/conditions/flexsig.htm', '', defLength, 0, 0);
menu[6][10] = new Item('Hemorrhoids (Internal)', '/patientinfo/conditions/hemmorhoids.htm', '', defLength, 0, 0);
menu[6][11] = new Item('Hemorrhoids (Thrombosed External)', '/patientinfo/conditions/thrombosed.htm', '', defLength, 0, 0);
menu[6][12] = new Item('Incontinence', '/patientinfo/conditions/incontinence.htm', '', defLength, 0, 0);
menu[6][13] = new Item('Perianal Abscess and Fistula', '/patientinfo/conditions/perianabscess.htm', '', defLength, 0, 0);
menu[6][14] = new Item('Pilonidal Cyst', '/patientinfo/conditions/pilonidal.htm', '', defLength, 0, 0);
menu[6][15] = new Item('Polyps', '/patientinfo/conditions/polyps.htm', '', defLength, 0, 0);
menu[6][16] = new Item('Pruritus Ani', '/patientinfo/conditions/pruritus.htm', '', defLength, 0, 0);
menu[6][17] = new Item('Rectal Prolapse', '/patientinfo/conditions/prolapse.htm', '', defLength, 0, 0);
menu[6][18] = new Item('Rectal Ultrasound', '/patientinfo/conditions/rectalultrasound.htm', '', defLength, 0, 0);
menu[6][19] = new Item('Ulcerative Proctitis', '/patientinfo/conditions/ulcerativeproctitis.htm', '', defLength, 0, 0);

// Item #7 menu (menu[0][7]). - DOWNLOADS
menu[7] = new Array();
menu[7][0] = new Menu(true, '<', 0, 22, menu7_width, defOver, defBack, 'menuBorder1', 'menuText1');
menu[7][1] = new Item('Office Locations', '/contact/locations.htm', '', defLength, 0, 0);
menu[7][2] = new Item('Appointment Registration', '/contact/register.htm', '', defLength, 0, 0);
// menu[7][3] = new Item('Ask Us Online', '/contact/ask_us.htm', '', defLength, 0, 0);

// Item #8 menu (menu[0][8]). - Referring Physicians
menu[8] = new Array();
menu[8][0] = new Menu(true, '>', xpos, 0, menu8_width, level3_overcolor, level3_color, 'menuBorder2', 'menuText1');
menu[8][1] = new Item('Patient Referral Portal', '/patientinfo/specialized/testing.htm', '', defLength, 0, 0);




}


