function isProduction() {
    if (document.domain.indexOf('localhost')>=0 || document.domain.indexOf('dev.mmpc')>=0)
        return false;
    else
        return true;
}

function showHomeMenu() {
stm_ai("p0i0",[0,"Home","","",-1,-1,0,urlRoot + "index.aspx","_self","","","iconL_home.gif","iconL_home.gif",57,37,0,"","",0,0,0,0,1,"#FFFFF7",1,"#B5BED6",1,"","",3,3,0,0,"#FFFFF7","#000000","#FFFFFF","#42A4E5","bold 10pt Trebuchet MS","bold 10pt Trebuchet MS",0,0]);
}

function showContactMenu() {
stm_aix("p0i1","p0i0",[0,"Contact","","",-1,-1,0,urlRoot + "shared/contact.aspx","_self","","","icon_contact.gif","icon_contact.gif",51]);
}

function showAboutMenu(showPresentations) {
stm_aix("p0i1","p0i0",[0,"About MMPC","","",-1,-1,0,urlRoot + "shared/missionStatement.aspx","_self","","","icon_about_mmpc.gif","icon_about_mmpc.gif",51]);
stm_bp("p1", [1, 4, 12, -7, 0, 3, 12, 0, 100, "", -2, "", -2, 100, 1, 4, "#B9B49F", "#115886", "bg.gif", 2, 1, 3, "#135C8B"]);
stm_aix("p1i14", "p0i0", [0, " Alumni MMPCs ", "", "", -1, -1, 0, urlRoot + "shared/alumni.aspx", "_self", "", "", "submenu_arrow.gif", "submenu_arrow_r.gif", 12, 9, 0, "", "", 0, 0, 0, 0, 1, "#FFFFFF", 0, "#FFFFFF", 0, "", "", 3, 3, 1, 1, "#BAD1E0", "#BAD1E0", "#1988E5", "#7BC3FF", "9pt Trebuchet MS", "9pt Trebuchet MS"]);
stm_aix("p1i0" ,"p0i0",[0," Animal Shipping "      ,"","",-1,-1,0,urlRoot + "shared/animalShipping.aspx","_self","","","submenu_arrow.gif","submenu_arrow_r.gif",12,9,0,"","",0,0,0,0,1,"#FFFFFF",0,"#FFFFFF",0,"","",3,3,1,1,"#BAD1E0","#BAD1E0","#1988E5","#7BC3FF","9pt Trebuchet MS","9pt Trebuchet MS"]);
stm_aix("p1i11", "p1i0", [0, " Antibodies ", "", "", -1, -1, 0, urlRoot + "shared/dkCOINResources.aspx?resourceType=antibody"]);
stm_aix("p1i13", "p1i0", [0, " Bioinformatics ", "", "", -1, -1, 0, urlRoot + "shared/bioinformatics.aspx"]);
stm_aix("p1i10" ,"p1i0",[0," Center Cores "           ,"","",-1,-1,0,urlRoot + "shared/cores.aspx"              ]);
stm_aix("p1i9" ,"p1i0",[0," Committees "           ,"","",-1,-1,0,urlRoot + "shared/committees.aspx"              ]);
stm_aix("p1i7" ,"p1i0",[0," Courses "              ,"","",-1,-1,0,urlRoot + "shared/courses.aspx"  ]);
stm_aix("p1i3" ,"p1i0",[0," Funding Programs "  ,"","",-1,-1,0,urlRoot + "shared/fundingPrograms.aspx"  ]);
stm_aix("p1i4" ,"p1i0",[0," Guidelines & Policies ","","",-1,-1,0,urlRoot + "shared/guidelinesPolicies.aspx"]);
stm_aix("p1i6", "p1i0", [0, " Institutions ", "", "", -1, -1, 0, urlRoot + "shared/institutions.aspx"]);
stm_aix("p1i12", "p1i0", [0, " Journals ", "", "", -1, -1, 0, urlRoot + "shared/journals.aspx"]);
stm_aix("p1i8" ,"p1i0",[0," Meetings "             ,"","",-1,-1,0,urlRoot + "shared/meetings.aspx"                ]);
stm_aix("p1i2", "p1i0", [0, " Mission Statement ", "", "", -1, -1, 0, urlRoot + "shared/missionStatement.aspx"]);
stm_aix("p1i5", "p1i0", [0, " MMPC Technology Publications ", "", "", -1, -1, 0, urlRoot + "shared/publications.aspx?groupBy=catalogGroup"]);
stm_aix("p1i14", "p1i0", [0, " Mouse Diets ", "", "", -1, -1, 0, urlRoot + "shared/mouseDiet.aspx"]);
if(showPresentations)
    stm_aix("p1i9" ,"p1i0",[0," Presentations "        ,"","",-1,-1,0,urlRoot + "shared/presentations.aspx"         ]);
stm_aix("p1i5","p1i0",[0," Publications "         ,"","",-1,-1,0,urlRoot + "shared/publications.aspx"            ]);
stm_aix("p1i1", "p1i0", [0, " Steering Committee ", "", "", -1, -1, 0, urlRoot + "shared/steeringCommittee.aspx"]);
stm_ep();
}

function showTestsMenu() {
stm_aix("p0i2","p0i1",[0,"Tests","","",-1,-1,0,urlRoot + "shared/catalog.aspx","_self","","","icon_tests.gif","icon_tests.gif"]);
stm_bpx("p2","p1",[1,4,12,-7,0,3,12,0,100,"",-2,"",-2,50]);
stm_aix("p2i2","p1i2",[0," Order Test "             ,"","",-1,-1,0,urlRoot + "shared/orderTest.aspx"          ]);
stm_aix("p2i0","p1i2",[0," Catalog "                ,"","",-1,-1,0,urlRoot + "shared/catalog.aspx"          ]);
stm_aix("p2i1","p1i2",[0," Search Orders "                 ,"","",-1,-1,0,sslRoot + "secure/orders.aspx"     ]);
stm_ep();
}

function showDataSearchMenu(authenticated) {
stm_aix("p0i3","p0i0",[0,"Data Search","","",-1,-1,0,urlRoot + "shared/search.aspx","_self","","","icon_search.gif","icon_search.gif",47]);
stm_bpx("p3","p2",[]);
stm_aix("p3i9", "p1i5", [0, " Entire Site ", "", "", -1, -1, 0, urlRoot + "shared/datasets.aspx"]);
stm_aix("p3i7", "p1i5", [0, " Search By...   ", "", "", -1, -1, 0, ""]);
stm_bpx("p4","p1",[1,2,0,-2]);
stm_aix("p4i1", "p1i5", [0, " Measurement Category    ","","",-1,-1,0, urlRoot + "shared/assayTypes.aspx?searchBy=1"]);
stm_aix("p4i1", "p1i5", [0, " Research Area   ","","",-1,-1,0, urlRoot + "shared/assayTypes.aspx?searchBy=2"]);
stm_aix("p4i1", "p1i5", [0, " Tests With Data   ","","",-1,-1,0, urlRoot + "shared/assayTypes.aspx"]);
stm_ep();
if (authenticated) 
{
    stm_aix("p3i0", "p1i5", [0, " Animals ", "", "", -1, -1, 0, urlRoot + "shared/animals.aspx"]);
}
stm_aix("p3i10", "p1i0", [0, " Antibodies ", "", "", -1, -1, 0, urlRoot + "shared/dkCOINResources.aspx?resourceType=antibody"]);
stm_aix("p3i1", "p1i5", [0, " Assays ", "", "", -1, -1, 0, urlRoot + "shared/phenotype/assays.aspx"]);
stm_aix("p3i11", "p1i5", [0, " dkCOIN Resources ", "", "", -1, -1, 0, urlRoot + "shared/dkCoinResources.aspx"]);
stm_aix("p3i2", "p1i5", [0, " Experiments ", "", "", -1, -1, 0, urlRoot + "shared/experiments.aspx"]);
stm_aix("p3i3", "p1i5", [0, " Histology ", "", "", -1, -1, 0, urlRoot + "shared/histology.aspx"]);
stm_aix("p1i5", "p1i0", [0, " MMPC Technology Publications ", "", "", -1, -1, 0, urlRoot + "shared/publications.aspx?groupBy=catalogGroup"]);
stm_aix("p3i4","p1i5",[0," Protocols "      ,"","",-1,-1,0,urlRoot + "shared/protocols.aspx"                    ]);
stm_aix("p3i5","p1i5",[0," Publications "   ,"","",-1,-1,0,urlRoot + "shared/publications.aspx"                 ]);
stm_aix("p3i6","p1i5",[0," Orders "         ,"","",-1,-1,0,sslRoot + "secure/orders.aspx"                 ]);
stm_aix("p3i8", "p1i5", [0, " Strains ", "", "", -1, -1, 0, urlRoot + "shared/strains.aspx"]);
stm_ep();
}

function showDataAnalysisMenu() {
stm_aix("p0i4","p0i3",[0,"Data Analysis","","",-1,-1,0,urlRoot + "shared/analysisPhenotype.aspx","_self","","","icon_database.gif","icon_database.gif"]);
stm_bpx("p4","p2",[]);
stm_aix("p4i0","p1i5",[0," Chart Exploration "     ,"","",-1,-1,0,urlRoot + "shared/chartExplore.aspx"       ]);
stm_aix("p4i2","p1i5",[0," Create Datasets "       ,"","",-1,-1,0,urlRoot + "shared/datasets.aspx"               ]);
stm_aix("p4i1","p1i5",[0," Statistical Analysis "  ,"","",-1,-1,0,urlRoot + "shared/statistics.aspx"       ]);
stm_ep();
}

function showMembersMenu(authenticated, admin, vmdir, addmem, client) {
    if (authenticated) 
    {
        stm_aix("p0i5","p0i4",[0,client?"Clients":"Members","","",-1,-1,0,urlRoot + "secure/index.aspx","_self","","","icon_members.gif","icon_members.gif"]);        
        stm_bpx("p5","p4",[]);
        if(addmem)
            stm_aix("p5i0","p1i5",[0," Add New Profile "         ,"","",-1,-1,0,urlRoot + "secure/member.aspx"                   ]);
        stm_aix("p5i1","p1i5",[0," Edit Profile "               ,"","",-1,-1,0,urlRoot + "secure/member.aspx?id=current"        ]);
        stm_aix("p5i2","p1i5",[0," View Profile "               ,"","",-1,-1,0,urlRoot + "secure/showMember.aspx"               ]);
        
        if (vmdir)
            stm_aix("p5i3","p1i5",[0," Member Directory "       ,"","",-1,-1,0,urlRoot + "secure/members.aspx"                  ]);

        if (admin) 
            stm_aix("p5i4","p1i5",[0," Site Administration "    ,"","",-1,-1,0,urlRoot + "secure/admin.aspx"                    ]);  
        stm_aix('p5i5','p1i5',[0," Upload Documents "    ,"","",-1,-1,0,urlRoot + "secure/fileUpload.aspx"                    ]);  
        stm_ep();
    } else {
        stm_aix("p0i5","p0i4",[0,"Clients","","",-1,-1,0,sslRoot + "login/login.aspx","_self","","","icon_members.gif","icon_members.gif"]);
        stm_bpx("p5","p4",[]);
        stm_aix("p5i1","p1i5",[0," Create Account "         ,"","",-1,-1,0,urlRoot + "shared/requestAccount.aspx"       ]);
        stm_aix("p5i0","p1i5",[0," Login "                  ,"","",-1,-1,0,sslRoot + "login/login.aspx"       ]);
        stm_ep();
    }
}

function showMenu(authenticated, admin, vmdir, addmem, client, showPresentations) {
stm_bm(["menu70f8",700,menuRoot,"blank.gif",0,"","",0,0,0,0,0,1,0,0,"","",0,0,1,2,"default","pointer",menuRoot],this);
stm_bp("p0",[0,4,0,0,0,0,57,0,100,"",-2,"",-2,50,0,0,"#999999","#115886","bg.gif",1,0,0,"#000000"]);

showHomeMenu();
showContactMenu();
showAboutMenu(showPresentations);
showTestsMenu();
showDataSearchMenu(authenticated);
showDataAnalysisMenu();
showMembersMenu(authenticated, admin, vmdir, addmem, client);

stm_aix("p0i6","p0i0",[2,"","","",-1,-1,0,"","_self","","","right_side.gif","right_side.gif",22]);
stm_ep();
stm_em();
}

