<!--
//-------------------------------
// JS documentation and notes for WF Libraries:
//-------------------------------

// imenus_code.js is the code that creates the left navigation
// and it must stay in the root directory. The two *imenus_data.js
// files are the data that goes into the left navigation.
// They must also stay in the root directory.
// For a site with many subdirectories, absolute urls are best.

// As much of the changing code and text as possible are
// in this file, misc.js, to make it easier to keep the site organized.

// In order for the nav imgs to change and the correct default navigation
// bar in the horiz. nav to show up, a section variable must be placed
// in the head of any page that is not a "databases" page.
// You can do this in Contribute via the Action "Edit Source in External
// Application." Find the line: var section = "database"; and change 
// database to one of the sections below.

// possible section variables: 
// catalog, database, electronic, webres, help, search 
// ('home' is used to remove the sidebar navigation image but retain "database"
// as the default dropdown in the horiz. nav

// NOTE: In all cases, special characters and line breaks MUST be escaped.
// This is accomplished by putting a \ in front of them.
// Example: var footer = "I want to use \"quotes\" in my footer";
// will show on screen as: I want to use "quotes" in my footer
// Any unescaped line break will cause the JS to return an empty result.


//-------------------------------
// the js variables for both sites
//-------------------------------
var ext_slogan="&quot;Good Health Begins with Informed Consumers&quot;";

var ext_footer="<p align=center><img src=\"/logobot.gif\" alt=\"Wheaton Franciscan Libraries\"><br><br>\
<b><a href=http://207.67.203.67/S10136Staff/OPAC/index.asp>Catalog</a> | <a href=http://www.wflibraries.org/apps/forms/AskLibrarian.aspx>Help/Contact Us</a> | <a href=http://www.wflibraries.org/WLCE-SiteMap.htm>Site Map</a></b></p>";


//-------------------------------
// menu for internal site's horizontal nav
//-------------------------------

function extMenu(){
    //Top level links
    var catalog_link = "http://www.wflibraries.org";
    var database_link = "http://www.wflibraries.org";
    var electronic_link = "http://www.wflibraries.org";
    var webres_link = "http://www.wflibraries.org";
    var help_link = "http://www.wflibraries.org";
    var search_link = "http://www.wflibraries.org/search/search.asp";
    
    //submenu contents:   
    var catalog_sub = "<a href=http://207.67.203.67/S10136Staff/OPAC/index.asp class=white target=_blank>WF Libraries Catalog</a>|<a href=http://www.wflibraries.org/Catalog/WLCE-OtherCatalogs.htm class=white>Other Catalogs</a>";
    var database_sub = "<a href=http://www.badgerlink.net class=white target=_blank>BadgerLink</a>|<a href=http://www.cancer.gov/templates/doc.aspx?viewid=9D617786-179B-4DB7-8664-885DD33E7D51 class=white target=_blank>Cancer.gov</a>|<a href=http://www.householdproducts.nlm.nih.gov target=_blank class=white>Household Products Database</a>|<a href=http://www.nlm.nih.gov/medlineplus/ target=_blank class=white>MedlinePlus</a>|<a href=http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?holding=wirllib,covhlib_fft,mdc target=_blank class=white>PubMed</a>";
    var electronic_sub = "<a href=/ElectronicRes/WLCE-ebooks.htm class=white>E-Books</a>|<a href=/ElectronicRes/WLCE-ejournals.htm class=white>E-Journals</a>|<a href=/ElectronicRes/WLCE-Other.htm class=white>Other</a>";
    var webres_sub = "<a href=http://www.wflibraries.org/WebResource/WLCE-Consumer.htm class=white>Consumer</a>|<a href=http://www.wflibraries.org/WebResource/WLCE-Government.htm class=white>Government</a>|<a href=http://www.wflibraries.org/WebResource/WLCE-PracticeGuidelines.htm class=white>Practice Guidelines</a>|<a href=http://www.wflibraries.org/WebResource/WLCE-Quality.htm class=white>Quality</a>|<a href=http://www.wflibraries.org/WebResource/WLCE-ReadyReference.htm class=white>Ready Reference</a>|<a href=http://www.wflibraries.org/WebResource/WLCE-PatientSafety.htm class=white>Safety</a>|<a href=http://www.wflibraries.org/WebResource/WLCE-SearchEngines.htm class=white>Search Engines</a>|<a href=http://www.wflibraries.org/WebResource/WLCE-Statistics.htm class=white>Statistics</a>";
    var help_sub = "<a href=http://www.wflibraries.org/apps/forms/AskLibrarian.aspx class=white>Ask a Librarian</a>|<a href=/Help/WLCE-Tutorials.htm class=white>Tutorials</a>|<a href=http://www.wflibraries.org/LibraryInfo/WLCE-HoursAndStaff.htm class=white>Library Contact Info</a>";
    var search_sub = "<a href=http://www.wflibraries.org/search/search.asp class=white>Search Page</a>";
    
    //pick default dropdown
        var defHoriz = section
    if (section == 'home')
        var defHoriz = "database";
    if (section == '')
        var defHoriz = "database";
    if (section == 'acog')
        var defHoriz = "database";
    if (section == 'authors')
        var defHoriz = "database";
    if (section == 'copyright')
        var defHoriz = "database";
    if (section == 'drugs')
        var defHoriz = "database";
    if (section == 'forms')
        var defHoriz = "database";
    if (section == 'guidelines')
        var defHoriz = "database";
    if (section == 'libraryinfo')
        var defHoriz = "database";
    if (section == 'readinglists')
        var defHoriz = "database";
    if (section == 'patient_ed')
        var defHoriz = "database";
    if (section == 'topicnews')
        var defHoriz = "database";
    if (section == 'training')
        var defHoriz = "database";
    if (section == 'sitemap')
        var defHoriz = "database";
        
    //top bar
    document.write("<table width=756 cellpadding=0 cellspacing=0><tr style=\"position:relative;top:-1px;\" id=navtop>");
    document.write("<td class=catalog valign=middle align=center height=24 width=126 id=catalog name=catalog onMouseOver=\"document.getElementById('horiz_nav').className='catalog'; document.getElementById('sub').innerHTML='"+catalog_sub+"'; addLines(); this.style.borderBottom='0px';\"><a href="+catalog_link+" class=white>Catalog</a></td>");
    document.write("<td class=database valign=middle align=center height=24 width=126 id=database name=database onMouseOver=\"document.getElementById('horiz_nav').className='database';document.getElementById('sub').innerHTML='"+database_sub+"'; addLines(); this.style.borderBottom='0px';\"><a href="+database_link+" class=white>Databases</a></td>");
    document.write("<td class=electronic valign=middle align=center height=24 width=126 id=electronic name=electronic onMouseOver=\"document.getElementById('horiz_nav').className='electronic';document.getElementById('sub').innerHTML='"+electronic_sub+"'; addLines(); this.style.borderBottom='0px';\"><a href="+electronic_link+" class=white>Electronic Resources</a></td>");
    document.write("<td class=webres valign=middle align=center height=24 width=126 id=webres name=webres onMouseOver=\"document.getElementById('horiz_nav').className='webres';document.getElementById('sub').innerHTML='"+webres_sub+"';addLines(); this.style.borderBottom='0px';\"><a href="+webres_link+" class=white>Web Resources</a></td>");
    document.write("<td class=help valign=middle align=center height=24 width=126 id=help name=help onMouseOver=\"document.getElementById('horiz_nav').className='help';document.getElementById('sub').innerHTML='"+help_sub+"';addLines(); this.style.borderBottom='0px';\"><a href="+help_link+" class=white>Help/Contact Us</a></td>");
    document.write("<td class=search valign=middle align=center height=24 width=126 id=search name=search onMouseOver=\"document.getElementById('horiz_nav').className='search';document.getElementById('sub').innerHTML='"+search_sub+"';addLines(); this.style.borderBottom='0px';\"><a href="+search_link+" class=white>Search</a></td></tr>");
    
    //pick which submenu is the default and display at open
document.write("<tr style=\"position:relative;top:-1px;\"><td colspan=6 class="+defHoriz+" id=horiz_nav name=horiz_nav height=19 style=\"border:1px solid #000; border-top:0px; padding:0px;\" valign=middle align=center><div class=sub id=sub>&nbsp;");
    subMenu = eval(defHoriz + "_sub");
    document.write(subMenu);
    document.write("&nbsp;</div></td></tr></table>");
    
    //change the the bottom line of the top level at open
    document.getElementById(defHoriz).style.borderBottom="0px";

    return;
}

function addLines(){
    //this is used in the menu above.
    for (var i=0; i<6;i++){
        document.getElementById('navtop').childNodes[i].style.borderBottom='1px solid #000000';
    }
}

//-------------------------------
// img above the nav
//-------------------------------

function navImg(){
	
	
    var nav_img= "<img src=\"/images/nav_db.jpg\" alt=\"Databases\" class=nav_img><br>";
    if(section == "home")
        var nav_img = "";
    if(section == "catalog")
        var nav_img = "<img src=\"/images/nav_cat.jpg\" alt=\"Catalog\" class=nav_img><br>";
    if(section == "database")
        var nav_img = "<img src=\"/images/nav_db.jpg\" alt=\"Databases\" class=nav_img><br>";
    if(section == "forms")
        var nav_img = "<img src=\"/images/nav_forms.jpg\" alt=\"Forms\" class=nav_img><br>";    
    if(section == "electronic")
        var nav_img = "<img src=\"/images/nav_elect.jpg\" alt=\"Electronic Resources\" class=nav_img><br>";
    if(section == "webres")
        var nav_img = "<img src=\"/images/nav_web.jpg\" alt=\"Web Resources\" class=nav_img><br>";
    if(section == "help")
        var nav_img = "<img src=\"/images/nav_help.jpg\" alt=\"Help/Contact Us\" class=nav_img><br>";
    if(section == "search")
        var nav_img = "<img src=\"/images/nav_search.jpg\" alt=\"Search\" class=nav_img><br>";
		
		
    document.write(nav_img);
    return;
}


//-------------------------------
// Pulls date/time from server and returns to page that called it
// Used in Copyright
//-------------------------------

var xyear = new Date();

function writeYear(){
	document.write(xyear.getFullYear());
	return;
}



//-->