Speed=30;
CanPlay=true;
LastOpened=1;
OpenObjects=new Array();OpenContentHeight=0;
CloseObjects=new Array();CloseContentHeight=0;

	function FloatTabs(Id){

		if(CanPlay==true){

			ThisImage='CategoryArrow_'+Id;
			ThisLayer='CategoryLayer_'+Id;
			ThisContent='CategoryContent_'+Id;

			LastImage='CategoryArrow_'+LastOpened;
			LastLayer='CategoryLayer_'+LastOpened;
			LastContent='CategoryContent_'+LastOpened;
			
			if(findObject(ThisImage)){

				if(LastOpened!=Id){

					OpenObjects=Array(ThisImage,ThisLayer,ThisContent);

					findObject(OpenObjects[1]).style.display='block';

					OpenContentHeight=findObject(OpenObjects[2]).scrollHeight?parseInt(findObject(OpenObjects[2]).scrollHeight):parseInt(findObject(OpenObjects[2]).style.height);
					OpenContentHeight+=5;
					OpenLayerHeight=0;

				}

				if(LastOpened!=0){

					CloseObjects=Array(LastImage,LastLayer,LastContent);

					findObject(CloseObjects[1]).style.display='block';

					CloseContentHeight=findObject(CloseObjects[2]).scrollHeight?parseInt(findObject(CloseObjects[2]).scrollHeight):parseInt(findObject(CloseObjects[2]).style.height);
					CloseContentHeight+=5;
					CloseLayerHeight=CloseContentHeight;
				}

				LastOpened=LastOpened==Id?0:Id;
				CanPlay=false;
				PlayTabs();
			}
		}
	}


	function PlayTabs(){

		if(OpenObjects.length>0 || CloseObjects.length>0){

			if(OpenObjects.length>0){

				OpenLayerHeight=parseInt(findObject(OpenObjects[1]).style.height);
				OpenLayerHeight+=Speed;
				OpenLayerHeight=OpenLayerHeight<=OpenContentHeight?OpenLayerHeight:OpenContentHeight;
				
				if(OpenLayerHeight<=OpenContentHeight){

					findObject(OpenObjects[1]).style.height=OpenLayerHeight+'px';
				}
				
				if(OpenLayerHeight==OpenContentHeight){
					findObject(OpenObjects[0]).src='/figuren/arrow-up-white.gif';
					OpenObjects=new Array();
				}
			}

			if(CloseObjects.length>0){

				CloseLayerHeight=parseInt(findObject(CloseObjects[1]).style.height);
				CloseLayerHeight-=Speed;
				CloseLayerHeight=CloseLayerHeight>=0?CloseLayerHeight:0;
				
				if(CloseLayerHeight>=0){

					findObject(CloseObjects[1]).style.height=CloseLayerHeight+'px';
				}
				
				if(CloseLayerHeight==0){
					findObject(CloseObjects[1]).style.display='none';
					findObject(CloseObjects[0]).src='/figuren/arrow-down-white.gif';
					CloseObjects=new Array();
				}
			}

			setTimeout('PlayTabs()',50);
		}

		else{

			CanPlay=true;
		}
	}