/*
    © 2003 Verity, Inc. All rights reserved. Verity®, KeyView® are trademarks of
    Verity, Inc. in the USA and numerous other countries. All other marks or
    symbols are those of their respective owners. This software is licensed, not
    sold, and is subject to worldwide copyright laws and the terms of the Verity,
    Inc. software license agreement contained in this package.
 *
 * File: basicQuery.js
 *
 * Javascript for Verity K2 Enterprise Web Sample Templates - Basic Query
 *
 * Depends upon:
 *      none
 */

    //this function is to reset the query text to "" if user clicks Refine search button
    //and set back to last query text if New search button is clicked again
    var g_strQueryText = "";
    var g_blnLastChecked = false;
    function changeSType() 
    {
        var objCheckbox = document.getElementById("SearchWithinResults");

        if (document.getElementById("QueryText") && objCheckbox) {
            var strOldQueryText = document.getElementById("QueryText").value;
            document.getElementById("QueryText").value = g_strQueryText;
            g_blnLastChecked = objCheckbox.checked;
            g_strQueryText = strOldQueryText;

        }
    }
    
    function setSType(searchWithin) 
    {
            document.getElementById("searchWithinResults").value = searchWithin;
  
            if ( searchWithin == false ) {             
              document.getElementById("Knowledge-Paks Online").value = "";
            }
    }
    
    
