new String()
if( !String.lastSymbol )
  String.prototype.lastSymbol = function( symbol ) {
    if( this.charAt( this.length-1 ) == symbol )
      return true
    else
      return false
  }
if( !String.fromEndTo )
  String.prototype.fromEndTo = function( char ) {
    for( var i = this.length; i > 0; i-- )
      if( this.charAt( i ) == char )
        return this.substr( i+1 )

  }
if( !String.removeString )
  String.prototype.removeString = function( string ) {
    if( this.indexOf(string) < 0 )
      return null
    return this.substr( 0, this.indexOf(string) ) + this.substr( string.length+this.indexOf(string) )
  }
if( !String.trim )
  String.prototype.trim = function( char ) {
    var newstring = ""
    while( this.charAt( 0 ) == char ) newstring = this.substr( 1 )
    if( newstring == "" ) newstring = this
    while( newstring.charAt( newstring.length-1 ) == char ) newstring = newstring.substr( 0, newstring.length-1 )
    return newstring
  }
if( !String.explode )
  String.prototype.explode = function( char, limit ) {
    if( typeof limit == 'undefined' )
      limit = 0
    if( limit == 1 ) return new Array(this) // pokud ma rozdelit pouze na jeden retezec, nema vyznam rozdelovat
    var startat = 0, // pozice, na ktere retezec zacina
      expl = new Array() // pole rozdelenych retezcu
    for( var i = 0; i < this.length; i++ ) {
      if( this.charAt(i) == char ) {
        // nasel jsem pozadovanej oddelovac
        expl.push(this.substr( startat, i-startat ))
        startat = i+1
        if( (expl.length+1) == limit ) break // pokud zapsal pozadovany pocet, skonci
      }
    }
    expl.push(this.substr(startat)) // pribalim i posledni retezec
    return expl
  }

new Date()
if( !Date.format )
  Date.prototype.format = function( format ) {

    if( typeof format == 'undefined' )
      format = "H:i:s"

    var fdate = ""
    for( var i = 0; i < format.length; i++ ) {

      switch( format.charAt(i) ) {
        // cas:
        case "H": fdate += ( this.getHours() < 10 ? "0" : "" ) + this.getHours(); break
        case "i": fdate += ( this.getMinutes() < 10 ? "0" : "" ) + this.getMinutes(); break
        case "s": fdate += ( this.getSeconds() < 10 ? "0" : "" ) + this.getSeconds(); break
        // datum:
        case "Y": fdate += this.getFullYear(); break
        case "m": fdate += ( this.getMonth()+1 < 10 ? "0" : "" ) + (this.getMonth()+1); break
        case "d": fdate += ( this.getDate() < 10 ? "0" : "" ) + this.getDate(); break
        // nejake ty konstatnty:
        case "U": fdate += this.getTime(); break
        // separatory
        default: fdate += format.charAt(i)

      }

    }

    return fdate// + " |" + date
  }