// JavaScript Document
function enter_key(e,url) {

  if( !e ) {
    if( window.event ) {
     //Internet Explorer
      e = window.event;
    } 
	else {
	
      return;
    }
  }
  

  if( typeof( e.keyCode ) == 'number'  ) {//alert('here1');
    //DOM
      e = e.keyCode;
  } else if( typeof( e.which ) == 'number' ) {//alert('here2');
    //NS 4 compatible
      e = e.which;
  } else if( typeof( e.charCode ) == 'number'  ) { //alert('here3');
    //also NS 6+, Mozilla 0.9+
      e = e.charCode;
	
  } else {//alert('here4');
    //total failure, we have no way of obtaining the key code
    return;
  }
  if(e==13) {//alert(e)
    goto_search(url)
     return false;
  }
}
function trim_All( 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;
}
