var ViewComponent = Class.create();

Object.extend(Object.extend(ViewComponent.prototype, EventDispatcher.prototype),
				{
					initialize : function(container){
						
						this.buildInterface(container);
						this.createListener();
						
					
					},
					buildInterface : function(container){
						
						this.container = $(container);
					
					},
					createListener : function(){
						
						this.serviceHandle = this.handleService.bind(this);
					
					},
					handleService : function(eAja){
						
						this.dispatchEvent("beforeChange", this.container);
						this.container.innerHTML = eAja.responseText;		
						this.dispatchEvent("afterChange", this.container);			
					
					}
				}
			);