	var wObjList=Array();
	
	Window = function() {
		this.title=null;
		this.type=null;
		this.id=null;
		this.content=null;
		this.width=null;
		this.height=null;
		this.buttons = null;
		this.containerId=null;
		this.w_obj=null;
		this.label_yes=null;
		this.label_no=null;
		this.handler_yes=null;
		this.handler_no=null;
		this.close=true;
	};
	
	
	Window.prototype.show = function() {
		if (wObjList[this.id]==null) {
			this.create();
		}
		wObjList[this.id].show();		
	}
	
	Window.prototype.hide = function() {
		wObjList[this.id].hide();
		wObjList[this.id].destroy();		
		wObjList[this.id]=null;
	}
	
	Window.prototype.create = function() {
			switch (this.type) {
				case "panel":
					wObjList[this.id] = new YAHOO.widget.Panel(this.id, { width:this.width+"px", height:this.height+"px", visible:false, constraintoviewport:true,fixedcenter: true,close:this.close } );
					wObjList[this.id].setHeader(this.title);
					var h_content=this.height-84;
					wObjList[this.id].setBody("<div style=\"height:"+h_content+"px;overflow:auto;\">"+this.content+"</div>");
					wObjList[this.id].setFooter(this.buttons);
					wObjList[this.id].render(this.containerId);
					break;
				
				case "dialog":
					wObjList[this.id] = new YAHOO.widget.SimpleDialog(this.id, 
			 { width: this.width+"px",
			   fixedcenter: true,
			   visible: false,
			   draggable: true,
			   close: true,
			   text: this.content,
			   icon: YAHOO.widget.SimpleDialog.ICON_HELP,
			   constraintoviewport: true,
			   buttons: [ { text:this.label_yes, handler:this.handler_yes, isDefault:true },
						  { text:this.label_no,  handler:this.handler_no } ]
			 } );
			 	wObjList[this.id].setHeader(this.id);
			 	wObjList[this.id].render(this.containerId);
				
				break;
			}
			
			wObjList[this.id].w_obj=this;
			
	};
	
	Window.prototype.setContent = function(content) {	
		this.content=content;
		var h_content=this.height-84;
		wObjList[this.id].setBody("<div style=\"height:"+h_content+"px;overflow:auto;\">"+this.content+"</div>");
	
	}
	
	Window.prototype.setButtons = function(butns) {	
		wObjList[this.id].setFooter(butns);
	
	}