

if (navigator.appName == "Microsoft Internet Explorer") {
//Skript funktioniert nicht unter Firefox und verhindert die Druckfunktion unter Opera. 


ns4 = (document.layers)? true:false //Netscape
ie = (document.styleSheets&& document.all)? true:false //Internetexplorer
ns6 = document.getElementById&&! document.all; //Mozilla Firefox und Mac Safari
opera= (document.all&& !document.styleSheets)? true:false; //Opera


top_position = 50;
left_position = 100;

function move_sticky() {
if (ie) {
	document.all.stickyad.style.top=document.body.scrollTop+top_position;
	if (document.body.scrollTop+top_position <= 979) document.all.stickyad.style.top=980;
}
if (ns6||opera) {
	document.getElementById("stickyad").style.top=pageYOffset+top_position;
	if (document.getElementById("stickyad").style.top <= 979) document.getElementById("stickyad").style.top=980;
	document.getElementById("stickyad").style.visibility = "hidden"; //Die obere Funktion funktioniert beim Macintosh nicht richtig.
}
if (ns4) {
	document.stickyad.top=pageYOffset+top_position;
	if (document.stickyad.top <= 979) document.stickyad.top=980;
}
//if (ie) document.all.stickyad.style.left=document.body.scrollLeft+left_position;
//if (ns6||opera) document.getElementById("stickyad").style.left=pageXOffset+left_position;
//if (ns4) document.stickyad.left=pageXOffset+left_position;

if (ie) document.all.stickyad.style.left=100;
if (ns6||opera) document.getElementById("stickyad").style.left=100;
if (ns4) document.stickyad.left=100;

setTimeout("move_sticky()",200);
}

function hide_sticky() {
if (ns6||opera) document.getElementById("stickyad").style.visibility = "hidden";
if (ns4) document.stickyad.visibility = "hidden";
if (ie) document.all.stickyad.style.visibility = "hidden";
}

if (! ns4) {
document.write('<div id="stickyad" style="Position:absolute; left=left_position; top=top_position"><a href="#anker-oben"><div style="cursor:n-resize;"><img src="oben.gif" width="30" height="50" border="0" alt="Nach Oben"></div>');
document.write('</div>');
//document.write('<br><a href="javascript:hide_sticky()">close stickyad</a></div>');
}

if (ns4) {
document.write('<layer name="stickyad" top="0" left="0"><a href="#anker-oben"><img src="oben.gif" height="50" width="30" border="0" alt="Nach Oben"></a>');
document.write('</layer>');
//document.write('<br><a href="javascript:hide_sticky()">close stickyad</a></layer>');
}

move_sticky();

}
//Beispielscript aus dem Workshop der Zeitschrift "Internet Professional" 6/2001 Seite 110.
//Angepasst von Tobias Dreissig http://www.tobias-dreissig.de.vu
