<?xml version="1.0" encoding="UTF-8" ?>
  
<Module>
  <ModulePrefs title="Staff Directory" scrolling="false" title_url="http://www.chem.byu.edu/Site/StaffDirectory" author="Chemistry Web Team" author_location="Provo, Utah" description="" height="70">
        <Require feature="dynamic-height"></Require>  </ModulePrefs>
  <Content type="html">
   <![CDATA[  <link rel="stylesheet" type="text/css" href="http://www.chem.byu.edu/lib/gadgets.css"/>
  <div>
        <script type="text/javascript">var liveSearchLoading = false;
               var searchFieldClicked = false;
               var lastSearchQuery = '';
               var currentSearchQuery = '';
               function startLoad() {
                    _gel('spinner').innerHTML = '<img src="http://www.chem.byu.edu/images/ajax-loader.gif" align="right"/>';
                }
                function endLoad() {
                    _gel('spinner').innerHTML = '';
                }
                function getResults(searchText) {
                   lastSearchQuery = searchText;
                    startLoad();
                   _IG_FetchContent('http://www.chem.byu.edu/Site/StaffDirectory(facultylist)?q='+searchText,
                                    function (responseText) { liveSearchLoading = false; 
                                        _gel('details').innerHTML = ''; 
                                        _gel('results').innerHTML = responseText; 
                                        endLoad();
                                        if (lastSearchQuery != currentSearchQuery) {getResults(currentSearchQuery);} 
                                        _IG_AdjustIFrameHeight(); 
                                    }
                                );
                }
                function ajaxLoadThis(Aobj) {
                    startLoad();
                    _IG_FetchContent(Aobj.href,
                                    function (responseText) { 
                                        _gel('results').innerHTML = ''; 
                                        _gel('details').innerHTML = responseText; 
                                        endLoad();
                                        _IG_AdjustIFrameHeight();
                                    }
                    );
                    return false;
                }
                function formType(inputObj) {
                    currentSearchQuery = inputObj.value;
                    if (inputObj.value.length > 1 && !liveSearchLoading && lastSearchQuery != inputObj.value) { liveSearchLoading = true; getResults(inputObj.value); };
                }
                </script>
        <style>.facultylistresults li {
                    display: inline; padding-right: 1em; float: left; font-size: 10pt;
                }
                #results h1 { display: none; }
                #results ul {margin-left: 0;padding-left:1em;}
                #results ul:before {content: 'Select a person:';}
                #details { border-top: 1px solid rgb(132, 149, 169); }
                #details img { float: right; }
                #details h2 { font-size: 14pt; }
                #details #scheduletable {
                    font-size: 7pt;
                }
                #details #scheduletable td {
                    margin:0; padding: 0px; border: 1px solid gray;
                }
                #details #scheduletable td h4 {
                    margin:0; padding: 2px; font-size: 8pt; font-weight: bold;
                }
                #details ul { padding: 0; }
                #details ul li { font-size: 9pt; }
                #details h3 { font-size: 10pt; padding: 0; }
                .personschedule {display: none; }
                form input[type=submit], form input[type=button]{    
                    background-color: rgb(222,124,24);
                    color: white;
                    font-family: Verdana, Arial, Helvetica;
                    font-size: 10px;
                    font-weight: bold;
                    text-decoration: none;
                    padding: 3px;
                    border-bottom: 1px solid #744610;
                    border-right: 1px solid #744610;
                    border-top: 1px solid #F3C58A;
                    border-left: 1px solid #F3C58A;
                    margin-left: 6px;
                }
                #spinner {position: absolute; top: 4px; right: 4px;}
                .personinfo table { margin: 0; }
                </style>
        <form onsubmit="getResults(this.q.value);return false;">
            <input type="text" name="q" onkeyup="formType(this);" value="Enter Name" style="color:rgb(180,180,180);" onclick="if (!searchFieldClicked) { this.value='';this.style.color='black';searchFieldClicked = true;}" size="12"/>
            <input type="submit" value="Search"/>
            <input type="button" value="View All" onclick="top.window.location.href='http://www.chem.byu.edu/Site/StaffDirectory';"/>
            <div id="spinner"></div>
        </form>
        <div id="results"></div><br style="clear:both;"/>
        <div id="details"></div>
    </div>   ]]> 
  </Content> 
</Module>