/// <reference name="MicrosoftAjax.js"/>
Type.registerNamespace("Books.Publishers");
Books.Publishers.IPublisher = function() { }
Books.Publishers.IPublisher.prototype = {
  get_name: function() { throw Error.notImplemented; },
  set_name: function(value) { throw Error.notImplemented; },
  get_city: function() { throw Error.notImplemented; },
  set_city: function(value) { throw Error.notImplemented; },
  getLocation: function() { throw Error.notImplement; }
}
Books.Publishers.IPublisher.registerInterface("Books.Publishers.IPublisher");

Books.Publishers.Publisher = function(name, city) {
  this._name = name;
  this._city = city;
}
Books.Publishers.Publisher.prototype = {
  get_name: function() {
    return this._name;
  },
  set_name: function(value) {
    this._name = value;
  },
  get_city: function() {
    return this._city;
  },
  set_city: function(value) {
    this._city = value;
  },

  toString: function() {
    return this._getLocation();
  },

  getLocation: function() {
    return this._name + " w mieście " + this._city; 
  }
}
Books.Publishers.Publisher.registerClass("Books.Publishers.Publisher", null, Books.Publishers.IPublisher);


Sys.Application.notifyScriptLoaded();