// JavaScript Document

    function trimAll( strValue )  {
      var objRegExp = /^(\s*)$/; 
    
        //check for all spaces
        if(objRegExp.test(strValue)) {
           strValue = strValue.replace(objRegExp, '');
           if( strValue.length == 0)
              return strValue; 
        }
       //check for leading & trailing spaces
       objRegExp = /^(\s*)([\W\w]*)(\b\s*$)/;
       if(objRegExp.test(strValue)) {
           //remove leading and trailing whitespace characters 
           strValue = strValue.replace(objRegExp, '$2');
        }
      return strValue;
  }
  function xblur(obj)  {
    if(trimAll(obj.value) == '') {
      obj.style.color = "#7b7b7b"; 
      obj.style.fontStyle = "italic";
      obj.value = "Search here";
    }
  }  
  function xfocus(obj)  {
    if(trimAll(obj.value) == 'Search here')
      obj.value = ""; 
      
    obj.style.color = "#000000";
    obj.style.fontStyle = "normal";
  }
  function validate_n_submit(obj)
  {
    if(obj.q.value != 'Search here' && trimAll(obj.q.value) != '' ) 
      obj.submit();
      
    return false;
  }
  


