	var movingInterval=false;
	var moveObjects=new Array();

	function moving() {
		var movingId, Speed, did=done=false, Obj;

		for(movingId in moveObjects) if(movingId != "moveObjectsObj") {
			did=false;

						
			for(attribute in moveObjects[movingId]) if(moveObjects[movingId][attribute].target != moveObjects[movingId][attribute].position && attribute != "obj") {

//				Neue Position wird berechnet und zugewiesen
				moveObjects[movingId][attribute].position=(moveObjects[movingId][attribute].position+(moveObjects[movingId][attribute].target-moveObjects[movingId][attribute].position)*moveObjects[movingId][attribute].speed/100);

//				wenn ganz nahe beim ziel -> target
				if((moveObjects[movingId][attribute].position-moveObjects[movingId][attribute].target)<=1 && (moveObjects[movingId][attribute].position-moveObjects[movingId][attribute].target)>=-1) moveObjects[movingId][attribute].position=moveObjects[movingId][attribute].target;

//				attribut wird geändert
				moveObjects[movingId].obj.style[attribute] = moveObjects[movingId][attribute].position+"px";

//				alert(moveObjects[movingId].style.left);
//				Wenn das bewegte objekt noch nicht Sichtbar ist, wirds sichtbar gemacht
				did=done=true
			}
//			alert(movingId+";"+did);
//			if(did) moveObjects[movingId].style.visibility = "visible";
			
//			if(moveObjects[movingId] && moveObjects[movingId].style.visibility != "visible") alert(movingId);
			
		}

//		Wenn bei diesem durchlauf keine bewegung statt gefunden hat wird der intervall beendet.
		if(!done) {
			clearInterval(movingInterval);
			movingInterval=false;
		}
	}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////	
	function move (id,attribute,target,start,speed,position) {		
		if(!attribute || !id) return false;	
		
		if(!moveObjects[id])  moveObjects[id] = new Object;
		if(!moveObjects[id][attribute])  moveObjects[id][attribute] = new Object;
		
		moveObjects[id].obj=document.getElementById(id);
						
		if(speed >= 0) moveObjects[id][attribute].speed=speed;
		if(!moveObjects[id][attribute].speed) moveObjects[id][attribute].speed = 20;
		
		if(start) moveObjects[id][attribute].start=start;
		else if(moveObjects[id].obj.style && moveObjects[id].obj.style[attribute]) moveObjects[id][attribute].start = parseInt(moveObjects[id].obj.style[attribute].replace("px",""));
		else moveObjects[id][attribute].start=moveObjects[id].obj["offset"+attribute.substr(0,1).toUpperCase()+attribute.substr(1)];
				
		moveObjects[id][attribute].target=target;
		if(!moveObjects[id][attribute].offset) moveObjects[id][attribute].offset = moveObjects[id][attribute].start;

		if(moveObjects[id][attribute].target=="BACK1") moveObjects[id][attribute].target=moveObjects[id][attribute].back;
		
		moveObjects[id][attribute].back = moveObjects[id][attribute].start;
		if(moveObjects[id][attribute].target=="BACK2") moveObjects[id][attribute].target=moveObjects[id][attribute].offset;
				
		if(position >= 0) moveObjects[id][attribute].position=position;
		else moveObjects[id][attribute].position=moveObjects[id][attribute].start;
						
		if(!movingInterval) movingInterval=setInterval("moving()", 20);
	}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////	
	Object.prototype.moveThis = function (attribute,target,start,speed,position) {		
		move (this,attribute,target,start,speed,position);
	}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////	
