function popWindow(contentUrl, style) {
	this.id = "popWindow";
	
	/*this.close = function() {
		obj = document.getElementById(this.id);
		obj.transition = new Fx.Styles(this.id, {
	 		duration: 200,
	 		transition: Fx.Transitions.linear,
	 		onComplete: function(obj) {
	 			obj.remove();
	 			document.getElementById("windowContainer").style.zIndex = "-5";
	 		}
	 	});
	 	obj.transition.start({
	 		'left': [this.x, this.x+10],
	   		'top': [this.y, this.y+10],
	   		'width': [this.width, 0],
	   		'height': [this.height, 0],
	   		'opacity': [1, 0]
		});	
	}*/
	
	this.draw = function(parent) {
		out = "<div class='window' id='"+this.id+"' style='"+style+"'>";
		out += this.drawButtons();
		out += "<div class='windowInner' id='"+this.id+"_inner' style='overflow-y: auto; max-height: " + (window.innerHeight - 80 - 100 - 20) + "px;'></div></div>";
		parent.innerHTML += out;
		document.getElementById("windowContainer").style.zIndex = "5";
		obj = document.getElementById(this.id);
		//var myFx = obj.fade(0.8);
		var myFx = new Fx.Tween(obj);
		myFx.start("opacity", "0.0", "0.9");

		/*obj.transition = new Fx(this.id, {
	 		duration: 3000,
	 		transition: Fx.Transitions.linear
	 	});
	 	obj.transition.start({
	   		'opacity': [0, 0.95],
	   		//'width': [0, this.width],
	   		//'height': [0, this.height]
		});*/
		updObj = document.getElementById(this.id+"_inner");
		contentUrl += "&time="+Date();
		req = new Request.HTML({
			url: contentUrl,
			method: 'get',
			update: updObj
		});
		req.send();
	}
	
	this.drawButtons = function() {
		return "<div class='closeButton'><span onclick=\"closeWindow('"+this.id+"')\">X</span></div>";
	}
	
}
