function MM_timelinePlay(tmLnName, myID) { //v1.2
  //Copyright 1997, 2000 Macromedia, Inc. All rights reserved.
  var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,propNum,theObj,firstTime=true;
  if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
  tmLn = document.MM_Time[tmLnName];
  if (myID == null) { myID = ++tmLn.ID; firstTime=true;}//if new call, incr ID
  if (myID == tmLn.ID) { //if Im newest
    setTimeout('MM_timelinePlay("'+tmLnName+'",'+myID+')',tmLn.delay);
    fNew = ++tmLn.curFrame;
    for (i=0; i<tmLn.length; i++) {
      sprite = tmLn[i];
      if (sprite.charAt(0) == 's') {
        if (sprite.obj) {
          numKeyFr = sprite.keyFrames.length; firstKeyFr = sprite.keyFrames[0];
          if (fNew >= firstKeyFr && fNew <= sprite.keyFrames[numKeyFr-1]) {//in range
            keyFrm=1;
            for (j=0; j<sprite.values.length; j++) {
              props = sprite.values[j]; 
              if (numKeyFr != props.length) {
                if (props.prop2 == null) sprite.obj[props.prop] = props[fNew-firstKeyFr];
                else        sprite.obj[props.prop2][props.prop] = props[fNew-firstKeyFr];
              } else {
                while (keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]) keyFrm++;
                if (firstTime || fNew==sprite.keyFrames[keyFrm-1]) {
                  if (props.prop2 == null) sprite.obj[props.prop] = props[keyFrm-1];
                  else        sprite.obj[props.prop2][props.prop] = props[keyFrm-1];
        } } } } }
      } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
      if (fNew > tmLn.lastFrame) tmLn.ID = 0;
  } }
}

function MM_timelineStop(tmLnName) { //v1.2
  //Copyright 1997, 2000 Macromedia, Inc. All rights reserved.
  if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
  if (tmLnName == null)  //stop all
    for (var i=0; i<document.MM_Time.length; i++) document.MM_Time[i].ID = null;
  else document.MM_Time[tmLnName].ID = null; //stop one
}

function MM_timelineGoto(tmLnName, fNew, numGotos) { //v2.0
  //Copyright 1997, 2000 Macromedia, Inc. All rights reserved.
  var i,j,tmLn,props,keyFrm,sprite,numKeyFr,firstKeyFr,lastKeyFr,propNum,theObj;
  if (document.MM_Time == null) MM_initTimelines(); //if *very* 1st time
  tmLn = document.MM_Time[tmLnName];
  if (numGotos != null)
    if (tmLn.gotoCount == null) tmLn.gotoCount = 1;
    else if (tmLn.gotoCount++ >= numGotos) {tmLn.gotoCount=0; return}
  jmpFwd = (fNew > tmLn.curFrame);
  for (i = 0; i < tmLn.length; i++) {
    sprite = (jmpFwd)? tmLn[i] : tmLn[(tmLn.length-1)-i]; //count bkwds if jumping back
    if (sprite.charAt(0) == "s") {
      numKeyFr = sprite.keyFrames.length;
      firstKeyFr = sprite.keyFrames[0];
      lastKeyFr = sprite.keyFrames[numKeyFr - 1];
      if ((jmpFwd && fNew<firstKeyFr) || (!jmpFwd && lastKeyFr<fNew)) continue; //skip if untouchd
      for (keyFrm=1; keyFrm<numKeyFr && fNew>=sprite.keyFrames[keyFrm]; keyFrm++);
      for (j=0; j<sprite.values.length; j++) {
        props = sprite.values[j];
        if (numKeyFr == props.length) propNum = keyFrm-1 //keyframes only
        else propNum = Math.min(Math.max(0,fNew-firstKeyFr),props.length-1); //or keep in legal range
        if (sprite.obj != null) {
          if (props.prop2 == null) sprite.obj[props.prop] = props[propNum];
          else        sprite.obj[props.prop2][props.prop] = props[propNum];
      } }
    } else if (sprite.charAt(0)=='b' && fNew == sprite.frame) eval(sprite.value);
  }
  tmLn.curFrame = fNew;
  if (tmLn.ID == 0) eval('MM_timelinePlay(tmLnName)');
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function newsFensterAuf() {//wird aufgerufen, wenn Maus auf Newszeile
   if (hm == ''){
	 document.getElementById("NewsR").className = "NewsRahmen2";
   } else {
	 document.getElementById("NewsR").className = "NewsRahmen";
   }
  MM_timelinePlay('oeffnen');
  MM_showHideLayers('Pfeillayer','','hide');
  MM_showHideLayers('SloganLayer','','hide');
  MM_showHideLayers('Wohnzimmer','','hide');
  MM_showHideLayers('newsMausOver','','hide');
  document.getElementById("vorDoppelpunkt").className = "NewsHighlight";
  document.getElementById("Textfeld").style.zIndex = "4";
}

function plfl() {
   if (hm != ''){// falls nicht index-Seite
     var so = new SWFObject(he+"images/trailer.swf", "trailer", "380", "200", "8,0,0,0", "#eeeeee");
   } else {
	   var so = new SWFObject("/referenz/images/filmseq.swf", "filmsequenz", "100", "40", "8,0,0,0", "#eeeeee");
   }
   var InhAlt = document.getElementById("flashcontent").innerHTML;
   so.write("flashcontent");
   MM_showHideLayers('x','','show');
}

function stpfl() {
   //if (navigator.userAgent.indexOf("Opera")==-1){
     //MM_showHideLayers('Blackout','','show');
	 MM_showHideLayers('x','','hide')
     document.getElementById("flashcontent").innerHTML= ""; //Flash ausblenden
	 document.getElementById("NewsR").className = "Schwarz";
	 document.getElementById("vorDoppelpunkt").className = "NewsGrau";
	 MM_showHideLayers('newsMausOver','','show');
     MM_timelinePlay('schliessen');
	 document.getElementById("Textfeld").style.zIndex = "2";
   //}
}
// Beginn des Scriptteils für die  Pfeildrehung

// Detect if the browser is IE or not.
// If it is not IE, we assume that the browser is NS.
var IE = document.all?true:false

// If NS -- that is, !IE -- then set up for mouse capture
if (!IE) document.captureEvents(Event.MOUSEMOVE)

// Set-up to use getMouseXY function onMouseMove
document.onmousemove = getMouseXY;


// Temporary variables to hold mouse x-y pos.s
var tempX = 0
var tempY = 0

// Main function to retrieve mouse x-y pos.s

function getMouseXY(e) {
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  // in Folgenden wird etsprechend der Mausposition die richtige Pfeilgrafik angezeigt - by adf
  if(document.getElementById) {// der Nullpunkt der Mauskoordinaten wird auf den Mittelpunkt der Pfeilgrafik verschoben
    var MausRelY = -(tempY - document.getElementById("Textfeld").style.top.slice(0, document.getElementById("Textfeld").style.top.indexOf("px") )-296);
	var MausRelX = tempX - document.getElementById("Textfeld").style.left.slice(0, document.getElementById("Textfeld").style.left.indexOf("px"))-294;
 
	if (MausRelY > 0){// Über der X-Achse
	  for (var i = -5; i <= 175; i=i+10){
	    if (i==-5){ //Sonderfall bei 0°
		  if ((MausRelY / MausRelX) < Math.tan(Math.PI/180 * i+10)){
		    document.pfeil.src = he+"images/Pfeil-0.gif";
		  }
		} else if (i==85){ //Sonderfall bei 90°
		  if ((MausRelY / MausRelX) < Math.tan(Math.PI/180 * i+10) || (MausRelY / MausRelX) > Math.tan(Math.PI/180 * i)){
		    document.pfeil.src = he+"images/Pfeil-90.gif";
		  }
		} else if (i==175){ //Sonderfall bei 180°
		  if ((MausRelY / MausRelX) > Math.tan(Math.PI/180 * i) && MausRelX < 0){
		    document.pfeil.src = he+"images/Pfeil-180.gif";
		  }
		} 
        else {
		  if ((MausRelY / MausRelX) < Math.tan(Math.PI/180 * (i+10)) && (MausRelY / MausRelX) > Math.tan(Math.PI/180 * i)){
            document.pfeil.src = he+"images/Pfeil-"+(i+5)+".gif";
		  }
		}
	  }
    } else if (MausRelY < 0){// Unter der X-Achse
	  for (var i = 175; i <= 355; i=i+10){//
	    if (i==175){ //Sonderfall bei 180°
		  if ((MausRelY / MausRelX) < Math.tan(Math.PI/180 * i+10)){
		    document.pfeil.src = he+"images/Pfeil-180.gif";
		  }
		} else if (i==265){ //Sonderfall bei 270°
		  if ((MausRelY / MausRelX) < Math.tan(Math.PI/180 * i+10) || (MausRelY / MausRelX) > Math.tan(Math.PI/180 * i)){
		    document.pfeil.src = he+"images/Pfeil-270.gif";
		  }
		} else if (i==355){ //Sonderfall bei 360°
		  if ((MausRelY / MausRelX) > Math.tan(Math.PI/180 * i) && MausRelX > 0){
		    document.pfeil.src = he+"images/Pfeil-0.gif";
		  }
		} 
        else {
		  if ((MausRelY / MausRelX) < Math.tan(Math.PI/180 * (i+10)) && (MausRelY / MausRelX) > Math.tan(Math.PI/180 * i)){
            document.pfeil.src = he+"images/Pfeil-"+(i+5)+".gif";
		  }
		}
	  }
    }

  }
  if (document.getElementById("Wohnzimmer")){
    document.getElementById("Wohnzimmer").style.left = Math.round(tempX/page.winW()*110)+35;//Weihnachtsspecial
    document.getElementById("Wohnzimmer").style.top = Math.round(tempY/page.winH()*60)+10;//Weihnachtsspecial
  }
  return true
}

function PreloadPfeile(PfPath) {
  for (var i = 10; i <= 350; i=i+10){//preloader für Pfeile
    MM_preloadImages(PfPath+'images/Pfeil-'+i+'.gif');
  }
}