	var cLastWindowId;
	//zeigt Fenster an
	function SS_Windows_ShowWindow (cWindowId, Ereignis) {
		var iWindowWidth;
		var iWindowHeight;
		var iYScroll;
		if (document.getElementById) {
			var oWindow = document.getElementById(cWindowId);
		} else {
			var oWindow = document.all.cWindowId;
		}
		if (cLastWindowId) {
			if (document.getElementById)
			{
				var oLastWindow = document.getElementById(cLastWindowId);
				oLastWindow.style.display = "none";
			}
			else
			{
				var oLastWindow = document.all.cLastWindowId;
				oLastWindow.style.display = "none";
			}
		}
		oWindow.style.display = "block";
		if (!Ereignis)
			Ereignis = window.event;
		if (window.innerWidth) {
			iWindowWidth =  window.innerWidth;
			iWindowHeight = window.innerHeight;
		} else if (document.body && document.body.offsetWidth) {
			iWindowWidth =  document.body.offsetWidth;
			iWindowHeight = document.body.offsetHeight;
		} else {
			iWindowWidth =  0;
			iWindowHeight = 0;
		}
		if (window.pageYOffset) {
			iYScroll = window.pageYOffset;
		} else {
			iYScroll = document.body.scrollTop;
		}
		if (document.getElementById) {
			//Prüfe, ob das Fenster noch komplett sichtbar ist
			if (Ereignis.clientX + 483 < iWindowWidth) {
				oWindow.style.left  = Ereignis.clientX + "px";
			} else {
				oWindow.style.left = (Ereignis.clientX - 483) + "px";
			}
			oWindow.style.top = (Ereignis.clientY + iYScroll) + "px";
		} else {
			oWindow.style.left = Ereignis.clientX ? Ereignis.clientX : Ereignis.pageX -  window.pageXOffset;
			oWindow.style.top = Ereignis.clientY ? Ereignis.clientY : Ereignis.pageY -  window.pageYOffset;
		}
		cLastWindowId = cWindowId;

	}
	
	function SS_Window_SetLastWindowId (cWindowId) {
		cLastWindowId = cWindowId;
	}

	function SS_Window_Hide (cWindowId) {
		var oWindow = document.getElementById (cWindowId);
		oWindow.style.display = "none";
	}

	function SS_Window_HideLastWindow () {
		if (cLastWindowId) {
			var oWindow = document.getElementById (cLastWindowId);
			oWindow.style.display = "none";	
		}
	}
	//Das Objekt, das gerade bewegt wird.
	var dragobjekt = null;
	
	// Position, an der das Objekt angeklickt wurde.
	var dragx = 0;
	var dragy = 0;
	
	// Mausposition
	var posx = 0;
	var posy = 0;
	
	
	function draginit() {
		 // Initialisierung der Überwachung der Events

		document.onmousemove = drag;
		document.onmouseup = dragstop;
	}
	
	function NoSelect () {
		return false;
	}

	function dragstart(element) {
		//Wird aufgerufen, wenn ein Objekt bewegt werden soll.
		document.body.onselectstart = function () {
			return false;
		}
		dragobjekt = document.getElementById(element);
		dragx = posx - dragobjekt.offsetLeft;
		dragy = posy - dragobjekt.offsetTop;
	}
	
	
	function dragstop() {
		//Wird aufgerufen, wenn ein Objekt nicht mehr bewegt werden soll.
		document.body.onselectstart = function () {
			return true;
		}
		dragobjekt=null;
	}
	
	
	function drag(ereignis) {
		//Wird aufgerufen, wenn die Maus bewegt wird und bewegt bei Bedarf das Objekt.
		
		posx = document.all ? window.event.clientX : ereignis.pageX;
		posy = document.all ? window.event.clientY : ereignis.pageY;
		if(dragobjekt != null) {
			dragobjekt.style.left = (posx - dragx) + "px";
			dragobjekt.style.top = (posy - dragy) + "px";
			document.onselectstart = null;
		}
	}
	
	function SS_Window_Select () {
		return true;
		if (dragobjekt != null) {
			return false;
		} else {
			return true;
		}
	}

