var minFlashVer = 5;
//  flashversion=6; // for testing
function noAnyFlash() {document.body.style.margin = "0 0 0 0";}
function setImagesBackground() {
  document.body.style.margin = imgs_params["top"][1]+" 0 0 0";
  objs = [
    '<a href="http://www.schautag-chemie.de"><img id="slither_BB_728x90" border="0" src="'+imgs_params["top"][0]+'" height="'+imgs_params["top"][1]+'" width="'+imgs_params["top"][2]+'"/></a>',
    '<a href="http://www.schautag-chemie.de"><img id="slither_FL_400x600" border="0" src="'+imgs_params["right"][0]+'" height="'+imgs_params["right"][1]+'" width="'+imgs_params["right"][2]+'"/></a>'
  ];
}
function setBackgroundFlash() {
  //old** if(navigator.appName.indexOf("Netscape")==-1)
	document.body.style.margin = "110 0 0 0";//+(navigator.appName=="Netscape"?17:25);  
//old**  else
//old**	document.body.style.margin = "0 0 0 0";
//old** document.body.style.margin = "0";//+(navigator.appName=="Netscape"?17:25);


  if (flashversion<minFlashVer)
    setImagesBackground();

  document.write(objs[0]);
  document.write(objs[1]);


  var obj = document.getElementById("slither_BB_728x90");
  obj.style.position = "absolute";
  obj.style.top = "0";
  obj.style.left = "0";
  obj.style.zIndex = 100;

  var obj = document.getElementById("slither_FL_400x600");
  obj.style.position = "absolute";
  obj.style.top = 0;
  obj.style.left = 1000;

  if (flashversion>=minFlashVer) {
    JSFX_FloatTopDiv();
    window.onscroll = stayTopright;
  } else 
    obj.style.top = "0";

}
function JSFX_FloatTopDiv() {
	var placeX = 0,
	placeY = screen.height;
	var ns = (navigator.appName.indexOf("Netscape")!=-1);
	var d = document;
	function DeLayer() {
	  var id = "slither_FL_400x600";
		var GetElements = d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		if (d.layers) GetElements.style = GetElements;
		GetElements.sP = function(x,y) {this.style.right=x;this.style.top=y;};
		GetElements.x = placeX;
		GetElements.y = ns ? pageYOffset: document.body.scrollTop;
		GetElements.y -= placeY;
		return GetElements;
	}
	window.stayTopright = function() {
		var pY = ns ? pageYOffset: document.body.scrollTop;
		ftlObj.y += pY - ftlObj.y;
		ftlObj.sP(ftlObj.x, ftlObj.y);
  		if (pY!=ftlObj.y) setTimeout("stayTopright()", 1);
	}
	ftlObj = DeLayer();
	stayTopright();
}
