// Javascript Source Code
/* JC : 12 Sept 2005 : Presumably this is old source? replacement methods below were found in PHORMS page

	// returns true if the simple search input has text or the user confirms
	// they want to search all resources
	function SimpleSearch_CheckAndConfirmFullSearch( searchInputID, message ){        
		    var inputElement = document.getElementById( searchInputID );
		    if( (inputElement != null) && (inputElement.value == "") ){
			    alert(message);
			    return false;
		    }
	}
	
	function SimpleSearch_SubmitSearchForm(uniqueID){              
        var theEvent = window.event || arguments.callee.caller.arguments[0];
        if(theEvent.keyCode == 13)  						
		{
		    {__doPostBack(uniqueID,'Submit Search')}		    
        }
    }
    
    */
    
    function SimpleSearch_SubmitSearchForm(uniqueID){             
        var theEvent = window.event || arguments.callee.caller.arguments[0];
        if(theEvent.keyCode == 13)  						
		{
		    try { theEvent.keyCode = 0; }
		    catch (error) {}
		    
		    {__doPostBack(uniqueID,'Submit Search')}		    
        }
    }
    
  	// returns true if the simple search input has text or the user confirms
	// they want to search all resources
	function SimpleSearch_CheckAndConfirmFullSearch( searchInputID, message ){        
		    var inputStr = document.getElementById( searchInputID ).value;
		    var regex = new RegExp("[\\w\\d]+", "g");
		    var result = regex.test(inputStr);
		    if(!result)
		    {
			    alert(message);
			    return false;
		    }
		    else
		    {
		      return true;
		    }
		    
	} 