function slideshow(datei)
{
	window.open(datei,"slide","width=450px,height=300px,srollbars=no,statusbar=no,noresize");
}









var Delay=0;
var MouseOver=true;
var MouseDown=false;
var Browser=GetBrowser();
function GetBrowser()
{
	var BrowserName=navigator.appName;
	var BrowserVersion=navigator.appVersion;
	var BrowserVersion=parseInt(BrowserVersion.substr(0,1));
	// wichtig: der ie 5.0, 5.5 und 6.0 meldet sich vorne immer mit 4.0 ... compatible
	// daher ist die versionsabfrage beim ie genauer noetig
	if(BrowserName=='Microsoft Internet Explorer')
	{
		if(BrowserVersion==4)
		{
			BrowserVersion=navigator.appVersion;
			BrowserVersion=parseInt(BrowserVersion.substr(22,1));
		}		
	}

	if(BrowserName=='Netscape')
	{
		if(BrowserVersion==3)
			return 'NS3';
		else if(BrowserVersion==4)
			return 'NS4';
		else if(BrowserVersion==5) // netscape 6 ist netscape 5 bzw. mozilla 0.9x hat version 5.0
			return 'NS6'; 
		else
			return 'NS6';
	}
	else if(BrowserName=='Microsoft Internet Explorer')
	{
		if(BrowserVersion==3)
			return 'IE3';
		else if(BrowserVersion==4)
			return 'IE4';
		else if(BrowserVersion==5)
			return 'IE5';
		else if(BrowserVersion==6)
			return 'IE6';
		else
			return 'KeineAhnung';
	}
	else
		return 'IE5';
}

function SetLeftPosition(LayerName,Position)
{
	switch(Browser)
	{
		case 'NS3':
		break;
		case 'IE3':
		break;
		case 'NS4':
			document.layers[LayerName].left=Position;
		break;
		case 'IE4':
			document.all[LayerName].style.pixelLeft=Position;
		break;
		case 'IE5':
			document.all[LayerName].style.pixelLeft=Position;
		break;
		case 'IE6':
			document.all[LayerName].style.pixelLeft=Position;
		break;
		case 'NS6':
			document.getElementById(LayerName).style.left=Position+"px";  
		break;
		default:
			document.all[LayerName].style.pixelLeft=Position;
		break;				
	}
}
function SetTopPosition(LayerName,Position)
{
	switch(Browser)
	{
		case 'NS3':
		break;
		case 'IE3':
		break;
		case 'NS4':
			document.layers[LayerName].top=Position;
		break;
		case 'IE4':
			document.all[LayerName].style.pixelTop=Position;
		break;
		case 'IE5':
			document.all[LayerName].style.pixelTop=Position;
		break;
		case 'IE6':
			document.all[LayerName].style.pixelTop=Position;
		break;
		case 'NS6':
			document.getElementById(LayerName).style.top=Position+"px";  
		break;
		default:
			document.all[LayerName].style.pixelTop=Position;
		break;				
	}
}
function GetLeftPosition(LayerName)
{
	switch(Browser)
	{
		case 'NS3':
		break;
		case 'IE3':
		break;
		case 'NS4':
			return document.layers[LayerName].left;
		break;
		case 'IE4':
			return document.all[LayerName].style.pixelLeft;
		break;
		case 'IE5':
			return document.all[LayerName].style.pixelLeft;
		break;
		case 'IE6':
			return document.all[LayerName].style.pixelLeft;
		break;
		case 'NS6':
			return document.getElementById(LayerName).style.left; // sendet '???px' zurueck
		break;
		default:
			return document.all[LayerName].style.pixelLeft;
		break;				
	}
}
function GetTopPosition(LayerName)
{
	switch(Browser)
	{
		case 'NS3':
		break;
		case 'IE3':
		break;
		case 'NS4':
			return document.layers[LayerName].top;
		break;
		case 'IE4':
			return document.all[LayerName].style.pixelTop;
		break;
		case 'IE5':
			return document.all[LayerName].style.pixelTop;
		break;
		case 'IE6':
			return document.all[LayerName].style.pixelTop;
		break;
		case 'NS6':
			return document.getElementById(LayerName).style.top; // sendet '???px' zurueck
		break;
		default:
			return document.all[LayerName].style.pixelTop;
		break;				
	}
}
function GetWidth(LayerName)
{
	switch(Browser)
	{
		case 'NS3':
		break;
		case 'IE3':
		break;
		case 'NS4':
			return document.layers[LayerName].document.width;
		break;
		case 'IE4':
			return document.all[LayerName].offsetWidth;
		break;
		case 'IE5':
			return document.all[LayerName].offsetWidth;
		break;
		case 'IE6':
			return document.getElementById(LayerName).offsetWidth;
		break;
		case 'NS6':
			return document.getElementById(LayerName).offsetWidth; // sendet '???px' zurueck
		break;
		default:
			return document.all[LayerName].offsetWidth;
		break;				
	}
}
function GetHeight(LayerName)
{
	switch(Browser)
	{
		case 'NS3':
		break;
		case 'IE3':
		break;
		case 'NS4':
			return document.layers[LayerName].document.height;
		break;
		case 'IE4':
			return document.all[LayerName].offsetHeight;
		break;
		case 'IE5':
			return document.all[LayerName].offsetHeight;
		break;
		case 'IE6':
			return document.getElementById(LayerName).offsetHeight;
		break;
		case 'NS6':
			return document.getElementById(LayerName).offsetHeight; // sendet '???px' zurueck
		break;
		default:
			return document.all[LayerName].offsetHeight;
		break;				
	}
}
function ScrollLayer(LayerName,Direction,StartTop,EndTop) //StartTop=Beginn der Layer, EndTop=Wie weit muss hochgescrollt werden? EndTop meist negativ
{	
	ScrollMax=EndTop-GetHeight(LayerName)-50;
	if(Direction=="Down" && MouseOver && parseInt(GetTopPosition(LayerName))<=StartTop)	 // parseInt, weil NS6 immer '???px' sendet
	{
		if(MouseDown)
		{
			NeuePosition=parseInt(GetTopPosition(LayerName))+20;  // parseInt, weil NS6 immer '???px' sendet
			SetTopPosition(LayerName,NeuePosition);
			setTimeout('ScrollLayer("'+LayerName+'","'+Direction+'","'+StartTop+'","'+EndTop+'")',Delay)
		}
		else
		{	
			NeuePosition=parseInt(GetTopPosition(LayerName))+3;	 // parseInt, weil NS6 immer '???px' sendet
			SetTopPosition(LayerName,NeuePosition);
			setTimeout('ScrollLayer("'+LayerName+'","'+Direction+'","'+StartTop+'","'+EndTop+'")',Delay)
		}
	}
	else if(Direction=="Up" && MouseOver && parseInt(GetTopPosition(LayerName))>=ScrollMax)	 // parseInt, weil NS6 immer '???px' sendet
	{
		if(MouseDown)
		{
			NeuePosition=parseInt(GetTopPosition(LayerName))-20;	 // parseInt, weil NS6 immer '???px' sendet
			SetTopPosition(LayerName,NeuePosition);
			setTimeout('ScrollLayer("'+LayerName+'","'+Direction+'","'+StartTop+'","'+EndTop+'")',Delay);
		}
		else
		{	
			NeuePosition=parseInt(GetTopPosition(LayerName))-3;	 // parseInt, weil NS6 immer '???px' sendet
			SetTopPosition(LayerName,NeuePosition);
			setTimeout('ScrollLayer("'+LayerName+'","'+Direction+'","'+StartTop+'","'+EndTop+'")',Delay);
		}
	}
}
function MoveLayerVertical(LayerName,TopPosition,Count)
{
	XStart=parseInt(GetTopPosition(LayerName));	// parseInt, weil NS6 immer '???px' sendet
	if(XStart==TopPosition)
	{
	}
	else
	{
		if(XStart<TopPosition)
		{
			setTimeout('MoveLayerVertical("'+LayerName+'",'+TopPosition+','+Count+')',Delay);
			SetTopPosition(LayerName,parseInt(GetTopPosition(LayerName))+Count);
		}
		else
		{
			setTimeout('MoveLayerVertical("'+LayerName+'",'+TopPosition+','+Count+')',Delay);
			SetTopPosition(LayerName,parseInt(GetTopPosition(LayerName))-Count);
		}
	}
}
function MoveLayerHorizontalLeftNow(LayerName,LeftPosition)
{
	clearTimeout(TimeOut);
	XStart=parseInt(GetLeftPosition(LayerName)); // parseInt, weil NS6 immer '???px' sendet
	if(XStart<=LeftPosition)
	{
	}
	else
	{
		TimeOut=setTimeout('MoveLayerHorizontalLeftNow("'+LayerName+'","'+LeftPosition+'")',0);
		SetLeftPosition(LayerName,parseInt(GetLeftPosition(LayerName))-10);
	}
}
function MoveLayerHorizontalLeft(LayerName,LeftPosition)
{
	clearTimeout(TimeOut);
	TimeOut=setTimeout('MoveLayerHorizontalLeftNow("'+LayerName+'","'+LeftPosition+'")',250);
}
function MoveLayerHorizontalRightNow(LayerName,LeftPosition)
{
	clearTimeout(TimeOut);
	XStart=parseInt(GetLeftPosition(LayerName)); // parseInt, weil NS6 immer '???px' sendet
	if(XStart>=LeftPosition)
	{
	}
	else
	{
		TimeOut=setTimeout('MoveLayerHorizontalRightNow("'+LayerName+'","'+LeftPosition+'")',0);
		SetLeftPosition(LayerName,parseInt(GetLeftPosition(LayerName))+10);
	}
}
function MoveLayerHorizontalRight(LayerName,LeftPosition)
{
	clearTimeout(TimeOut);
	TimeOut=setTimeout('MoveLayerHorizontalRightNow("'+LayerName+'","'+LeftPosition+'")',250);
}
function MoveLayerHorizontalUpNow(LayerName,TopPosition)
{
	clearTimeout(TimeOut);
	XStart=parseInt(GetTopPosition(LayerName)); // parseInt, weil NS6 immer '???px' sendet
	if(XStart<=TopPosition)
	{
	}
	else
	{
		TimeOut=setTimeout('MoveLayerHorizontalUpNow("'+LayerName+'","'+TopPosition+'")',0);
		SetTopPosition(LayerName,parseInt(GetTopPosition(LayerName))-10); // parseInt, weil NS6 immer '???px' sendet
	}
}
function MoveLayerHorizontalUp(LayerName,TopPosition)
{
	clearTimeout(TimeOut);
	TimeOut=setTimeout('MoveLayerHorizontalUpNow("'+LayerName+'","'+TopPosition+'")',250);
}
function MoveLayerHorizontalDownNow(LayerName,TopPosition)
{
	clearTimeout(TimeOut);
	XStart=parseInt(GetTopPosition(LayerName)); // parseInt, weil NS6 immer '???px' sendet
	if(XStart>=TopPosition)
	{
	}
	else
	{
		TimeOut=setTimeout('MoveLayerHorizontalDownNow("'+LayerName+'","'+TopPosition+'")',0);
		SetTopPosition(LayerName,parseInt(GetTopPosition(LayerName))+10); // parseInt, weil NS6 immer '???px' sendet
	}
}
function MoveLayerHorizontalDown(LayerName,TopPosition)
{
	clearTimeout(TimeOut);
	TimeOut=setTimeout('MoveLayerHorizontalDownNow("'+LayerName+'","'+TopPosition+'")',250);
}

