function flyingPopUp(oKaMap, name, x, y){
	this.kaMap = oKaMap;
	this.name = name;
	var t = this;
	if(typeof this.kaMap.flyingPopUps == "undefined"){
		this.kaMap.flyingPopUps = new Array();
	}
	
	this.domObj = document.createElement("div");
	document.body.appendChild(this.domObj);
	this.kaMap.flyingPopUps.push(this);
	this.domObj.style.position = "absolute";
	this.domObj.className = "flyingPopUp";
	this.domObj.style.left = x + "px";
	this.domObj.style.top = y + "px";

	var flyTitle = document.createElement("div");
	this.domObj.appendChild(flyTitle);
	flyTitle.className = "title";
	flyTitle.style.cursor = "move";
	
	var text = document.createTextNode(name);
	flyTitle.appendChild(text);
	
	var img = document.createElement("img");
	flyTitle.appendChild(img);
	img.src = "/OPO/images/popUpSchliessen.gif";
	img.style.position = "absolute";
	img.style.right = "2px";
	img.style.top = "3px";
	img.style.cursor = "pointer";
	img.onclick = function(){t.destroy()};
	
	Drag.init(flyTitle, this.domObj);
	
	this.container = document.createElement("div");
	this.domObj.appendChild(this.container);
	
	return this;
}

flyingPopUp.prototype.setContent = function(content){
	this.container.innerHTML = content;
}

flyingPopUp.prototype.destroy = function(){
	for(var i = 0; i < this.kaMap.flyingPopUps.length; i++){
		if(this.kaMap.flyingPopUps[i] == this){
			document.body.removeChild(this.domObj);
			this.kaMap.flyingPopUps.splice(i, 1);
			break;
		}
	}
}
