// user has to define the following variables: // // var m_align = "left" | "center" | "right" (alignment of the whole menu area) // var m_margin = // var m_top = // var m_popup = "left" | "auto" | "right" (at which side of the entry should a child menu appear?) // var m_showlink = single keyword or cobination (separator ",") // "highlite", "icons", "style" (for "style" you have to define all css-styles twice, // once with prefix "weak" and lighter color) // var m_icn = new Array(new Image(), new Image(), new Image(), new Image()); // m_icn[0].src = "/dolphin/menugen/left_arrow.gif" (picture on the left side of an entry if a child menu exists) // m_icn[1].src = "/dolphin/menugen/right_arrow.gif' (picture on the right side of an entry if a child menu exists) // m_icn[2].src = "/dolphin/menugen/link_left.gif" (picture on the left side of an entry if a link exists) // m_icn[3].src = "/dolphin/menugen/link_right.gif' (picture on the right side of an entry if a link exists) // // // ______________p_l_e_a_s_e___d_e_l_e_t_e___t_h_i_s___c_o_m_m_e_n_t___b_o_x___t_o___s_a_v_e___s_p_a_c_e________________ var m_align = 'left'; var m_margin = 11; var m_top = 120; var m_popup = 'right'; var m_showlink = 'highlite,style' var m_icn = new Array(new Image(), new Image(), new Image(), new Image()); m_icn[0].src = "/dispatch_demo/menugen/arrow_left.gif"; m_icn[1].src = "/dispatch_demo/menugen/arrow_right.gif"; m_icn[2].src = "/dispatch_demo/menugen/link_left.gif"; m_icn[3].src = "/dispatch_demo/menugen/link_right.gif"; // var m_df = new Array(); // m_df[0] = new Array(); // m_df[0][0] = new M_menu (, , ); // m_df[0][1] = new M_entry(, , , , , , , // , , , ); // m_df[0][2] = new M_entry(...); // : : // m_df[0][n] = new M_entry(...); // // m_df[1] = new Array(); // m_df[1][0] = new M_menu (...); // m_df[1][1] = new M_entry(...); // m_df[1][2] = new M_entry(...); // : : // m_df[1][n] = new M_entry(...); // // m_df[m] = new Array(); // m_df[m][0] = new M_menu (...); // m_df[m][1] = new M_entry(...); // m_df[m][2] = new M_entry(...); // : : // m_df[m][n] = new M_entry(...); // // // parameters: menu direction => true | false (true = vertical, false = horizontal) // entry alignment => "left" | "center" | "right" // space to parent menu => // name => // link => // target => // css-style => // width => // height => // space to next entry => // background => // or // // selected background => // child menu => or "-1" if there is no childmenu // tooltip => comment, which appears when holding mouse on a menu-entry var m_df = new Array(); m_df[0] = new Array(); m_df[0][0] = new M_menu (true, "left", 1); m_df[0][1] = new M_entry(" Customers", "/dispatch_demo/index.php", "", "crazy", 170, 30, 1, "#FFFFFF", "#EFEFEF", 1, ""); m_df[0][2] = new M_entry(" Dispatch", "/dispatch_demo/index.php", "", "crazy", 170, 30, 1, "#FFFFFF", "#EFEFEF", 2, ""); m_df[0][3] = new M_entry(" Invoices", "/dispatch_demo/index.php", "", "crazy", 170, 30, 1, "#FFFFFF", "#EFEFEF", 3, ""); m_df[0][4] = new M_entry(" Receivables", "/dispatch_demo/index.php", "", "crazy", 170, 30, 1, "#FFFFFF", "#EFEFEF", 4, ""); m_df[0][5] = new M_entry(" MISC", "/dispatch_demo/index.php", "", "crazy", 170, 30, 1, "#FFFFFF", "#EFEFEF", 6, ""); m_df[0][6] = new M_entry(" Reports", "/dispatch_demo/index.php", "", "crazy", 170, 30, 1, "#FFFFFF", "#EFEFEF", 12, ""); m_df[0][7] = new M_entry(" Tools", "/dispatch_demo/index.php", "", "crazy", 170, 30, 1, "#FFFFFF", "#EFEFEF", 5, ""); m_df[1] = new Array(); m_df[1][0] = new M_menu (true, "left", 1); m_df[1][1] = new M_entry("Add Customer", "/dispatch_demo/A_add_customer.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[1][2] = new M_entry("Modify Customer", "/dispatch_demo/A_modify_customer.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[2] = new Array(); m_df[2][0] = new M_menu (true, "left", 1); m_df[2][1] = new M_entry("Add Dispatch", "/dispatch_demo/C_add_dispatch.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[2][2] = new M_entry("Modify Dispatch", "/dispatch_demo/C_modify_dispatch.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[2][3] = new M_entry("Reports", "", "", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", 10, ""); m_df[3] = new Array(); m_df[3][0] = new M_menu (true, "left", 1); m_df[3][1] = new M_entry("Add Invoice", "/dispatch_demo/D_add_order.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[3][2] = new M_entry("Modify Invoice", "/dispatch_demo/D_modify_order.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[3][3] = new M_entry("Reports", "", "", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", 9, ""); m_df[4] = new Array(); m_df[4][0] = new M_menu (true, "left", 1); m_df[4][1] = new M_entry("Receivables", "/dispatch_demo/G_cash_receipts.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[4][2] = new M_entry("Reports", "", "", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", 11, ""); m_df[5] = new Array(); m_df[5][0] = new M_menu (true, "left", 1); m_df[5][1] = new M_entry("Users", "/dispatch_demo/B_modify_user.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[5][2] = new M_entry("Admin Dashboard", "/dispatch_demo/G_select_aging_report.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[5][3] = new M_entry("Logout", "/dispatch_demo/logout.php", "", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[6] = new Array(); m_df[6][0] = new M_menu (true, "left", 1); m_df[6][1] = new M_entry("Drivers", "", "", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", 7, ""); m_df[6][2] = new M_entry("Locations", "", "", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", 8, ""); m_df[6][3] = new M_entry("Driver Rates", "", "", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", 13, ""); m_df[6][4] = new M_entry("Delivery Rates", "", "", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", 15, ""); m_df[6][5] = new M_entry("Railroad Terminals", "", "", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", 14, ""); m_df[6][6] = new M_entry("Vehicles", "", "", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", 16, ""); m_df[6][7] = new M_entry("Fuel Surcharge", "", "", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", 17, ""); m_df[7] = new Array(); m_df[7][0] = new M_menu (true, "left", 1); m_df[7][1] = new M_entry("Add Driver", "/dispatch_demo/E_add_driver.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[7][2] = new M_entry("Modify Driver", "/dispatch_demo/E_modify_driver.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[7][3] = new M_entry("Reports", "", "", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", 18, ""); m_df[8] = new Array(); m_df[8][0] = new M_menu (true, "left", 1); m_df[8][1] = new M_entry("Add Location", "/dispatch_demo/F_add_pickup.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[8][2] = new M_entry("Modify Location", "/dispatch_demo/F_modify_pickup.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[9] = new Array(); m_df[9][0] = new M_menu (true, "left", 1); m_df[9][1] = new M_entry("Print Invoice", "/dispatch_demo/D_select_pdf_invoice.php", "_blank", "entry", 200, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[9][2] = new M_entry("Invoices for Date Range", "/dispatch_demo/D_select_pdf_invoices_for_date_range.php", "_blank", "entry", 200, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[9][3] = new M_entry("Charges for Date Range", "/dispatch_demo/D_select_pdf_charges_for_date_range.php", "_blank", "entry", 200, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[9][4] = new M_entry("Driver Pay CSV", "/dispatch_demo/D_driver_pay_csv.php", "_blank", "entry", 200, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[9][5] = new M_entry("Driver Pay PDF", "/dispatch_demo/D_select_pdf_driver_pay.php", "_blank", "entry", 200, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[10] = new Array(); m_df[10][0] = new M_menu (true, "left", 1); m_df[10][1] = new M_entry("Dispatch Cards", "/dispatch_demo/C_select_dispatch_dp.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[11] = new Array(); m_df[11][0] = new M_menu (true, "left", 1); m_df[11][1] = new M_entry("Daily Cash Receipts", "/dispatch_demo/G_select_daily_crs.php", "_blank", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[11][2] = new M_entry("Aging Report", "/dispatch_demo/G_aging_report.php", "_blank", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[11][3] = new M_entry("In House Aged Notes", "/dispatch_demo/G_html_aging_report.php", "_blank", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[12] = new Array(); m_df[12][0] = new M_menu (true, "left", 1); m_df[12][1] = new M_entry("Dispatch/Invoice Analysis", "/dispatch_demo/D_select_history.php", "_blank", "entry", 200, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[13] = new Array(); m_df[13][0] = new M_menu (true, "left", 1); m_df[13][1] = new M_entry("Add Driver Rate", "/dispatch_demo/H_add_driver_rate.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[13][2] = new M_entry("Modify Driver Rate", "/dispatch_demo/H_modify_driver_rate.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[14] = new Array(); m_df[14][0] = new M_menu (true, "left", 1); m_df[14][1] = new M_entry("Add Railroad Terminal", "/dispatch_demo/I_add_railroad_terminal.php", "_blank", "entry", 200, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[14][2] = new M_entry("Modify Railroad Terminal", "/dispatch_demo/I_modify_railroad_terminal.php", "_blank", "entry", 200, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[15] = new Array(); m_df[15][0] = new M_menu (true, "left", 1); m_df[15][1] = new M_entry("Add Delivery Rate", "/dispatch_demo/J_add_delivery_rate.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[15][2] = new M_entry("Modify Delivery Rate", "/dispatch_demo/J_modify_delivery_rate.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[16] = new Array(); m_df[16][0] = new M_menu (true, "left", 1); m_df[16][1] = new M_entry("Add Vehicle", "/dispatch_demo/K_add_vehicle.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[16][2] = new M_entry("Modify Vehicle", "/dispatch_demo/K_modify_vehicle.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[16][3] = new M_entry("Print Expirations", "/dispatch_demo/K_pdf_expirations.php", "_blank", "entry", 160, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[17] = new Array(); m_df[17][0] = new M_menu (true, "left", 1); m_df[17][1] = new M_entry("FSC Setings", "/dispatch_demo/L_modify_fsc_settings.php", "_blank", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); m_df[18] = new Array(); m_df[18][0] = new M_menu (true, "left", 1); m_df[18][1] = new M_entry("Driver Vehicles", "/dispatch_demo/E_driver_vehicles.php", "_blank", "entry", 180, 25, 1, "#FFFFFF", "#EFEFEF", -1, ""); // browser identification var DOM=false,IE=false,NS=false;NS6=false; if(document.getElementById)DOM=true; if(document.all&&!DOM)IE=true; if(((navigator.appName=='Netscape')&&(navigator.appVersion.substring(0,1)==4))&&!DOM&&!IE)NS=true; if(DOM && navigator.appName=='Netscape')NS6=true; if(!DOM &&!IE &&!NS){ alert("This site was created for:\n\n"+ " - MS Internet Explorer 4.x\tor higher\n"+ " - Netscape 4.x\t\tor higher\n"+ " - Browsers that support DOM\n\n"+ "Your Browser unfortunately doesnt belong to this group - sorry!\n"+ "Please download an appropriate Browser from the internet..."); window.history.back(); } // get window width var w_wd=0; function W_width(){ if(window.innerWidth)w_wd=window.innerWidth; else if(document.body&&document.body.offsetWidth)w_wd=document.body.offsetWidth; if(w_wd==0){ window.moveTo(15,15); window.resizeTo((screen.availWidth-30),(screen.availHeight-30)); w_wd=screen.availWidth-30; alert('Your Browser is not able to retrieve the window width. ' + 'I therefore resize your window - otherways, I cant ' + 'create the menus correctly!'); }} // menu object function M_menu(par0,par1,par2){ this.mvt=par0; this.mal=par1; this.msp=par2; this.mwd=null; this.mpm=null; this.mpe=null; this.mte=null; this.mrf=null; this.mx=null; this.my=null; } // entry object function M_entry(par0,par1,par2,par3,par4,par5,par6,par7,par8,par9,par10) { if ((m_showlink.indexOf('style')!=-1)&&(par1.length<=0)&&(par9==-1))par3='weak'+par3; this.mnm=par0; this.mlk=par1; this.mtg=par2; this.mcs=par3; this.mwt=par4; this.mhg=par5; this.mpc=par6; this.mnr=par7; this.msl=par8; this.mim=null; this.msi=null; this.mch=par9; this.mex=null; this.mey=null; this.ttp=par10; } // preprocessing var m_wi=0,m_il='',m_hp; for(var i=0;i m_df['+i+']['+j+'])'); window.history.back(); } if(m_df[i][j].mch!=-1){ if(m_df[m_df[i][j].mch][0].mpm!=null){ alert('Error!\n\nThere is an error in the menu-structure!\nA child Menu cannot '+ 'be asigned to more than one parent Menus!\nPlease correct the menu-structure! '+ '(-> m_df['+i+']['+j+'])'); window.history.back(); } m_df[m_df[i][j].mch][0].mpm=i;m_df[m_df[i][j].mch][0].mpe=j; if(i==0)m_df[m_df[i][j].mch][0].mte=j;else m_df[m_df[i][j].mch][0].mte=m_df[i][0].mte; } if(m_df[i][0].mvt!=true){ m_wi+=m_df[0][j].mwt; if(j":" background-color: "+m_df[i][j].mnr+";'>"; m_st+="
":" background-color: "+m_df[i][j].msl+";'>"; m_st+="
":"' bgColor='"+m_df[i][j].mnr+"'>"; m_st+="":"' bgColor='"+m_df[i][j].msl+"'>"; m_st+=""; m_st+=""; m_st+=""} else {if((m_showlink.indexOf('icons')!=-1)&&(m_df[i][j].mlk.length > 0)&&((m_popup=='right')||((m_popup=='auto')&&(m_df[i][0].mte<=(m_df[0].length/2))))) m_st+="";} m_st+=""; m_tp=m_df[i][j].mwt-(2*m_iw); m_st+=""; m_st+="";} m_st+="
"; if((i!=0)&&((m_df[i][j].mch!=-1)&&((m_popup=='left')||((m_popup=='auto')&&(m_df[i][0].mte>(m_df[0].length/2)))))){m_st+="

"; m_st+=m_df[i][j].mnm; m_st+="

"; if((i!=0)&&((m_df[i][j].mch!=-1)&&((m_popup=='right')||((m_popup=='auto')&&(m_df[i][0].mte<=(m_df[0].length/2)))))){m_st+=""} else {if((m_showlink.indexOf('icons')!=-1)&&(m_df[i][j].mlk.length > 0)&&((m_popup=='left')||((m_popup=='auto')&&(m_df[i][0].mte>(m_df[0].length/2))))) m_st+="
"; if(DOM||IE)m_st+=""; if(NS)m_st+=""; if(NS6){ m_st+="
"; } if(m_df[i][0].mvt==false)m_tx+=m_df[i][j].mwt+m_df[i][j].mpc; else m_ty+=m_df[i][j].mhg+m_df[i][j].mpc; } if(i!=0){ m_pi=m_df[i][0].mpm; m_pj=m_df[i][0].mpe; m_px=m_df[m_pi][0].mx; m_py=m_df[m_pi][0].my; if(m_df[m_pi][0].mvt==true){ m_py+=m_df[m_pi][m_pj].mey; m_px+=m_df[m_pi][m_pj].mex; if((m_popup=='left')||((m_popup=='auto')&&(m_df[i][0].mte>(m_df[0].length/2)))){ m_px-=m_df[i][0].mwd; m_px-=m_df[i][0].msp; }else{ m_px+=m_df[m_pi][m_pj].mwt; m_px+=m_df[i][0].msp; } }else{ m_px+=m_df[m_pi][m_pj].mex; if(m_df[i][0].mal=='center')m_px+=(m_df[m_pi][m_pj].mwt-m_df[i][0].mwd)/2; if(m_df[i][0].mal=='right')m_px+=(m_df[m_pi][m_pj].mwt-m_df[i][0].mwd); m_py+=m_df[m_pi][m_pj].mhg; m_py+=m_df[i][0].msp; }} m_df[i][0].mx=m_px; m_df[i][0].my=m_py; if(DOM){ var newDiv=document.createElement('div'); document.getElementsByTagName('body').item(0).appendChild(newDiv); newDiv.innerHTML=m_st; with(m_df[i][0]){ mrf=(eval(newDiv)).style; mrf.position='absolute'; mrf.top=m_py; mrf.left=m_px; if(i==0)mrf.visibility='visible'; else mrf.visibility='hidden'; } if(NS6){ for(var j=1;j