<?xml version="1.0" encoding="UTF-8" ?> 
<Module> 
<ModulePrefs title="ChemAlliance Search" height="65" scaling="false" render_inline="optional" 
title_url="http://www.chemalliance.org/"
description="This is beta version of Module 1 for the ChemAlliance module set . It allows searching of the chemalliance site a variety of ways." author="Nick Myers" 
author_email="wsu423@gmail.com"/> 


<UserPref name="drop_disp" display_name="Use DropBox Version?" datatype="bool" default_value="false"/>


    <Content type="html"> 

        <![CDATA[ 
        
        
            <style type="text/css">
                .mainText
                {
                    font:Arial, Helvetica, sans-serif; font-size:13px;
                }
                .aboutBox 
                {
                    BORDER-RIGHT: 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: 1px solid; PADDING-LEFT: 4px; BACKGROUND: white; PADDING-BOTTOM: 4px; BORDER-LEFT: 1px solid; PADDING-TOP: 4px; BORDER-BOTTOM: 1px solid
                } 
            </style>

            <script language="JavaScript">  
                    
                function com_search()
                {
                    document.ChemAllianceSearchModule__MODULE_ID__.radioval.value=document.ChemAllianceSearchModule__MODULE_ID__.searchType.value;
                    return search();
                }

                function search()
                {                  
                    switch(document.ChemAllianceSearchModule__MODULE_ID__.radioval.value)
                    {
                        case "CA_Google":               

                            parent.location.href = "http://www.google.com/search?q=site:chemalliance.org+" + document.ChemAllianceSearchModule__MODULE_ID__.searchInput.value;
                            break;
                        case "CA_General":
                            //http://www.chemalliance.org/Help/IISFiles/Search.idq?CiRestriction=
                            //Search Term
                            //&CiScope=%2Fhandbook%2C%2Fhandbook%2Fbackground%2C%2Fhandbook%2Fplant%2C%2Fhandbook%2Fregtour%2C%2Fhelp%2C%2Fcolumns%2C%2Fcolumns%2Fenforcement%2C%2Fcolumns%2Fimproving%2C%2Fcolumns%2Findustry%2C%2Fcolumns%2Fnetworking%2C%2Fcolumns%2Fregulatory&CiMaxRecordsPerPage=10&TemplateName=&CiSort=rank%5Bd%5D%2Cdoctitle%5Ba%5D&HTMLQueryForm=..%2FSearch.htm

                            parent.location.href = "http://www.chemalliance.org/Help/IISFiles/Search.idq?CiRestriction=" + document.ChemAllianceSearchModule__MODULE_ID__.searchInput.value + "&CiScope=%2Fhandbook%2C%2Fhandbook%2Fbackground%2C%2Fhandbook%2Fplant%2C%2Fhandbook%2Fregtour%2C%2Fhelp%2C%2Fcolumns%2C%2Fcolumns%2Fenforcement%2C%2Fcolumns%2Fimproving%2C%2Fcolumns%2Findustry%2C%2Fcolumns%2Fnetworking%2C%2Fcolumns%2Fregulatory&CiMaxRecordsPerPage=10&TemplateName=&CiSort=rank%5Bd%5D%2Cdoctitle%5Ba%5D&HTMLQueryForm=..%2FSearch.htm";
                            break;
                        case "CA_News":
                            alert("News Search not currently available - sorry!");                    
                            break;
                        case "CA_Case":
                            parent.location.href ="http://www.chemalliance.org/Handbook/plant/search_results.asp?SearchPhrase=" +document.ChemAllianceSearchModule__MODULE_ID__.searchInput.value +"&SearchType=Phrase";
                            break;   
                        default:
                            alert("!Error in Switch - Contact Module Admin!");
                            parent.location.href ="http://www.chemalliance.org";
                            break;                                    
                    }            
                    return false;           
                }            
            </script>

            
        <div id="aboutbox" class="aboutBox" style="position:absolute; left:15px; top:10px; display:none">
          
          <span class="mainText">                    
          This module was developed as part of a senior design project by seniors at <a href="http://eecs.wsu.edu/" target="_blank">Washington State University</a> in conjunction with <a href="http://www.pnl.gov" target="_blank">PNNL</a>.
          <a style="text-align:right" href="." onclick="javascript:{_gel('aboutbox').style.display = 'none'; return false;}">Close</a>
          </span>
        </div>
            
            <script language="JavaScript">
                var prefs = new _IG_Prefs(__MODULE_ID__);

                
                if (prefs.getBool("drop_disp"))
                {
                
                document.write('<form name="ChemAllianceSearchModule__MODULE_ID__" onsubmit="com_search()">');
                
                document.write('<INPUT TYPE="hidden" name="radioval" value="CA_Google">');
                
                    document.write('<input type="text" id="searchInput" size="25" value="Search String Here">');
                    document.write('<input type="submit" id="btnSearch" size="7" value="Search" onclick="return com_search()"> <a class="mainText" href="." onclick="javascript:{_gel(\'aboutbox\').style.display = \'block\'; return false;}">About</a>');
                    document.write('<br>');

                    document.write('<SELECT id="searchType"> ');
                    document.write('    <OPTION VALUE="CA_Google">Google on ChemAlliance');
                    document.write('    <OPTION VALUE="CA_General">ChemAlliance General ');         
                    //Comment out the news value as we dnt currently have a query procedure for it.
                    //document.write('    <OPTION VALUE="CA_News">ChemAlliance News and Events');
                    document.write('    <OPTION VALUE="CA_Case">ChemAlliance Case Studies');
                    document.write('</SELECT> ');
                    
                    document.write('</form>');  
                    

                }
               
                else
                {
                
                    document.write('<form name="ChemAllianceSearchModule__MODULE_ID__" onsubmit="search()">');
                    
                    document.write('<INPUT TYPE="hidden" name="radioval" value="CA_Google">');
                    
                    document.write('<input type="text" id="searchInput" size="25" value="Search String Here">');
                    document.write('<input type="submit" id="btnSearch" size="7" value="Search" onclick="return search()"> <a class="mainText" href="." onclick="javascript:{_gel(\'aboutbox\').style.display = \'block\'; return false;}">About</a>');                    
                    document.write('<br>');                    
                    
                    document.write('<span class="mainText">');
                    document.write('<input type="radio" name="searchRadio" value="CA_Google" CHECKED onclick="if(this.checked){document.ChemAllianceSearchModule__MODULE_ID__.radioval.value=\'CA_Google\';}">Google ChemAlliance');
                    document.write('<input type="radio" name="searchRadio" value="CA_Case" onclick="if(this.checked){document.ChemAllianceSearchModule__MODULE_ID__.radioval.value=\'CA_Case\';}">Search Case Studies');
                    document.write('</span>');
                    document.write('</form>');  

                           
                }
            </script>
            
            
        ]]> 
    </Content> 
</Module> 



