
function isSet( mixed ) {
  return ( typeof( mixed ) != 'undefined' && !isNull( mixed ) );
}
function isNull( mixed ) {
  return ( mixed == null );
}

function toString( obj ) {
  var rv = '[ ';
  for( var i in obj ) {
      rv += i + ': ' + obj[ i ] + ', ';
  }
  if ( rv.length > 2 )
    rv = rv.substr( 0, rv.length - 2 );
  rv += ' ]';
  return rv;
}


if ( typeof( String.prototype.trim ) == 'undefined' )
  String.prototype.trim = function() {
      return this.replace( /^\s+/, '' ).replace( /\s+$/, '' );
  }
  
/*
Incompatible avec les appels Ajax Prototype.
Object.prototype.extend2 = function( superClass ) {
  for( var i in superClass )
    if ( typeof( this[ i ] ) == 'undefined' )
      this[ i ] = superClass[ i ];
}*/

CustomSelect.prototype.extend = function( superClass ) {
  for( var i in superClass )
    if ( typeof( this[ i ] ) == 'undefined' )
      this[ i ] = superClass[ i ];
}

