 var tickerData_LatestNews = new Array();

  tickerData_LatestNews.push('<a href="news/allgemein/ansicht/datum/2010/06/05/fahrbericht-yamaha-yzf-r6-1.html" title=""><strong>Fahrbericht Yamaha YZF-R6</strong></a>');


  tickerData_LatestNews.push('<a href="news/fahrberichte/ansicht/datum/2010/06/05/fahrbericht-honda-vfr-1200-f-1.html" title=""><strong>Fahrbericht Honda VFR 1200</strong></a>');


  tickerData_LatestNews.push('<a href="news/racing/ansicht/datum/2010/03/17/ken-roczen-siegt-beim-winter-cross.html" title=""><strong>Ken Roczen siegt beim Winter-Cross</strong></a>');


  tickerData_LatestNews.push('<a href="news/test-technik/ansicht/datum/2010/03/31/praxistest-motorrad-alarmschloss-abus-detecto.html" title=""><strong>Praxistest: Motorrad-Alarmschloss Abus Detecto</strong></a>');


  tickerData_LatestNews.push('<a href="news/reise/ansicht/datum/2010/04/11/fahrverbote-fast-verfuenffacht.html" title=""><strong>Fahrverbote fast verfünffacht</strong></a>');


  tickerData_LatestNews.push('<a href="news/hersteller/ansicht/datum/2010/04/06/nachruest-protektoren-fuer-jedermann.html" title=""><strong>Nachrüst-Protektoren für jedermann</strong></a>');
  tickerData_LatestNews.push('<a href="news/hersteller/ansicht/datum/2010/03/25/schoener-dieseln-neander-20.html" title=""><strong>Schöner Dieseln: Neander 2.0</strong></a>');


  tickerData_LatestNews.push('<a href="news/unterhaltung/ansicht/datum/2010/05/02/buchtipp-wartung-und-reparatur-suzuki-bandit-vierzylinder-bis-2006.html" title=""><strong>Buchtipp: Wartung und Reparatur Suzuki Bandit-Vierzylinder bis 2006</strong></a>');


  tickerData_LatestNews.push('<a href="news/events/ansicht/datum/2010/04/12/tag-der-super-tenere.html" title=""><strong>Tag der Super Ténéré</strong></a>');
  
 /*****************************************************************************
 ** MP_Ticker  v1.0                                                          **
 ** ~~~~~~~~~~~~~~~                                                          **
 **                                                                          **
 ** Beschreibung:                                                            **
 **                                                                          **
 ** Erzeugt eine Ebene in der ein Laufband angezeigt wird.                   **
 ** MP_Ticker kann mehrmals in einem Dokument eingesetzt, und mit            **
 ** unterschiedlichen Parametern konfiguriert werden.                        **
 ** Die Ticker erscheinen erst wenn das aufrufende Dokument vollstÃƒÂ¤ndig      **
 ** geladen ist.                                                             **
 **                                                                          **
 ** Benutzung:                                                               **
 **                                                                          **
 ** 1. Ticker Daten erstellen. Aufbau wie beschrieben in @tickerDataAry      **
 ** 2. Eine MP_Ticker Instanz an gewÃƒÂ¼nschter stelle im HTML Dokument         **
 **    erzeugen.                                                             **
 ** 3. Einstellungen fÃƒÂ¼r Farben und Schrift an der MP_Ticker Instanz         **
 **    vornehmen.                                                            **
 **                                                                          **
 ** Beispiel:                                                                **
 **                                                                          **
 **  <html>                                                                  **
 **  <head></head>                                                           **
 **  <body>                                                                  **
 **  <table>                                                                 **
 **    <tr>                                                                  **
 **      <td>Beispiel: </td>                                                 **
 **      <td>                                                                **
 **        <script language="JavaScript1.2" type="text/javascript">          **
 **         var mpTicker = new MP_Ticker(300,20,0,10,tickerData_LatestNews); **
 **         mpTicker.SetBackgroundColor("#DD0000");                          **
 **         mpTicker.SetLinkColor("#00EE00");                                **
 **         mpTicker.SetLinkFontSize("11px");                                **
 **         mpTicker.SetLinkFontFamily("Sans-Serif");                        **
 **       <\/script>                                                         **
 **     </td>                                                                **
 **   </tr>                                                                  **
 ** </table>                                                                 **
 ** </body>                                                                  **
 ** </html>                                                                  **
 **                                                                          **
 ** Parameter:                                                               **
 **                                                                          **
 **  @tickerWidth:    Breite der Ticker Ebene (nur absolute Werte)           **
 **  @tickerHeight:   HÃƒÂ¶he der Ticker Ebene (nur absolute Werte)             **
 **  @tickerType:     0=Horizontal,                                          **
 **                   1=Vertical (nicht implementiert)                       **
 **  @tickerSpeed:    absoluter Wert (milisekunden warten bis Ticker sich neu**
 **                   neu bewegt.                                            **
 **  @tickerDataAry:  ein Mehrdiminsionales Array mit folgender Struktur:    **
 **                   tickerDataAry[x]['text'] = Link Text                   **
 **                   tickerDataAry[x]['link'] = Link Url                    **
 **                                                                          **
 ** Geteste Browser:                                                         **
 **                                                                          **
 **  - IE 6.x                                                                **
 **  - Moziall Firefox 2.x                                                   **
 **                                                                          **
 ** ChangeLog:                                                               **
 **                                                                          **
 **  09.03.2007:  Erstellt, Daniel Schwarz                                   **
 **  13.03.2007:  ParseTypo3Links, Daniel Schwarz                            **
 **  29.05.2007:  KonvertiereZuEntitys, Daniel Schwarz                       **
 **                                                                          **
 **                          MP_Ticker (c) 2007, medienPARK, Daniel Schwarz  **
 *****************************************************************************/
 function MP_Ticker(tickerWidth,
                    tickerHeight,
                    tickerType,
                    tickerSpeed,
                    tickerDataAry) {
 
    this.tickerObj = this;
    this.tickerId = null;
    this.tickerSpeed = tickerSpeed;
    this.tickerType = tickerType;
    this.tickerDataAry = tickerDataAry;

    // Ticker im document verankern
    if (!document.mpTickerAry) {
      document.mpTickerAry = new Array();
    }    
    this.tickerId = document.mpTickerAry.length;
    document.mpTickerAry[this.tickerId] = this;
 
    // Ticker Ebene im Document anlegen
    document.open();
    document.write('<div id="MP_TICKER_' + this.tickerId + '">Laden...</div>');
    document.close();
 
    // Ticker Ebene Stylen
    this.tickerObj = document.getElementById("MP_TICKER_" + this.tickerId);
    this.tickerObj.style.visible = "hidden";
    this.tickerObj.style.width = tickerWidth;
    this.tickerObj.style.height = tickerHeight;
    this.tickerObj.style.overflow = "hidden";
    
    // Ticker Ebene Einrichten u. Events ...
    this.tickerObj.tickerObj = this;
    
    // Variablen initialisieren    
    this.tickerHtml = "";
    this.tickerWidth = tickerWidth;
    this.tickerHeight = tickerHeight;
    
    this.tickerContent = null;
    this.tickerContentWidth = 0;
    this.tickerContentHeight = 0;
    
    this.tickerTimer = null;
    this.tickerGenerated = false;

    
    this.tickerBackgroundColor = "";
    this.tickerLinkColor = "black";
    this.tickerLinkFontSize = "12px";
    this.tickerLinkFontFamily = "Verdana";
    this.tickerTarget = "_blank";

    document.onreadystatechange = this.OnReadyStateChange;
    // fÃƒÂ¼r Nav/Moz
    if (document.addEventListener) {
      document.addEventListener("DOMContentLoaded", this.OnReadyStateChange, null);
    }
 }


 MP_Ticker.prototype.SetTarget = function(strTarget) {
   this.tickerTarget = strTarget;
 }

 
 MP_Ticker.prototype.SetBackgroundColor = function(strBgColor) {
   this.tickerObj.style.backgroundColor = strBgColor;
 }
 
 MP_Ticker.prototype.SetLinkColor = function(strLinkColor) {
   this.tickerLinkColor = strLinkColor;
 }
 
 MP_Ticker.prototype.SetLinkFontSize = function(strLinkFontSize) {
   this.tickerLinkFontSize = strLinkFontSize;
 }
 
 MP_Ticker.prototype.SetLinkFontFamily = function(strLinkFontFamily) {
   this.tickerLinkFontFamily = strLinkFontFamily;
 }

 MP_Ticker.prototype.SetLinkFontWeight = function(strLinkFontWeight) {
   this.tickerLinkFontWeight = strLinkFontWeight;
 }
 

 MP_Ticker.prototype.OnReadyStateChange = function() {
   if (!document.mpTickerGenerated) {
     if(document.readyState && document.readyState == "complete") {
       for (var i=0;i < document.mpTickerAry.length;i++) {
        document.mpTickerAry[i].GenerateTicker();
        document.mpTickerAry[i].Start();
      }  
      document.mpTickerGenerated = true;
     } else {
       for (var i=0;i < document.mpTickerAry.length;i++) {
         document.mpTickerAry[i].GenerateTicker();
         document.mpTickerAry[i].Start();
       }  
      document.mpTickerGenerated = true;
     }
   }
 }
 
 
 MP_Ticker.prototype.OnMouseOver = MP_Ticker.prototype.OnMouseMove = function() {
   if (this.tickerObj.tickerTimer != null) {
     clearTimeout(this.tickerObj.tickerTimer);
     this.tickerObj.tickerTimer = null;
   }
 }
 
 MP_Ticker.prototype.OnMouseOut = function() {
   if (this.tickerObj.tickerTimer == null) {
     this.tickerObj.Scroll();
   }
 }
 
 MP_Ticker.prototype.GenerateTicker = function() {
   var tickerTable = "";

   var linkStyle = "";
   linkStyle += 'color:' +this.tickerLinkColor + ';';
   linkStyle += 'font-size:' +this.tickerLinkFontSize + ';';
   linkStyle += 'font-family:' +this.tickerLinkFontFamily + ';';
   linkStyle += 'font-weight:' + this.tickerLinkFontWeight + ';';
   
      
   // Nicht sichtbare Ebene im Dokument anlegen, sofern nicht vorhanden
   objTickerBuilder = document.getElementById("MP_TICKER_CONTENT_BUILDER");
   if (objTickerBuilder == null) {
     document.body.innerHTML += '<div id="MP_TICKER_CONTENT_BUILDER" style="visibility: hidden; border:0px; padding:0px; margin:0px; background:green;"></div>';
     objTickerBuilder = document.getElementById("MP_TICKER_CONTENT_BUILDER");
   }      
   // Ticker Tabelle erstellen, zum spÃƒÂ¤teren abmessen.
   tickerTable = '<table id="MP_TICKER_TABLE_BUILDER" style="border:0px; padding:0px; margin:0px;" cellspacing="0"  class="TickerTable_'+this.tickerId+'" cellpadding="0" border="0"><tr>';
   for (i=0;i<this.tickerDataAry.length;i++) {
    // tickerTable += '<td nowrap="nowrap">' + this.tickerDataAry[i] + '</td>';
    tickerTable += '<td style="padding-left:10px; padding-right:10px; font-size:12px; color:black;"><b>|</b></td><td nowrap="nowrap">' + 
                   '<a href="' + this.tickerDataAry[i]['link'] + '" style="' + linkStyle + '">' + this.tickerDataAry[i]['text'] + '</a></td>';
    
   }  
   tickerTable += '</tr></table>';      
   
   // Ticker Tabelle in die nicht sichtbare Ebene schreiben und abmessen
   objTickerBuilder.innerHTML = tickerTable;
   objTickerTableBuilder = document.getElementById("MP_TICKER_TABLE_BUILDER");
   
   this.tickerContentWidth = objTickerTableBuilder.offsetWidth;
   this.tickerContentHeight = objTickerTableBuilder.offsetHeight;
   
   var contentStyle = "position:relative; left:0px; top:0px;";
   contentStyle +=""
   
   // Tickerinhalt neu aufbauen, allerdings doppelt.
   tickerTable = '<div id="MP_TICKER_CONTENT_'+this.tickerId+'" style="'+contentStyle+'"><table id="MP_TICKER_TABLE_' + this.tickerId + '" class="MpTickerTable_'+this.tickerId+'" cellspacing="0" cellpadding="0" border="0"><tr>';
   for (i=0;i<this.tickerDataAry.length;i++) {
    tickerTable += '<td style="padding-left:10px; padding-right:10px; font-size:12px; color:black;"><b>|</b></td><td nowrap="nowrap">' + 
                   '<a href="' + this.tickerDataAry[i]['link'] + '" style="' + linkStyle + '" target="_blank">' + this.tickerDataAry[i]['text'] + '</a></td>';
   }  
   for (i=0;i<this.tickerDataAry.length;i++) {
    tickerTable += '<td style="padding-left:10px; padding-right:10px; font-size:12px; color:black;"><b>|</b></td><td nowrap="nowrap">' + 
                   '<a href="' + this.tickerDataAry[i]['link'] + '" style="' + linkStyle + '" target="_blank">' + this.tickerDataAry[i]['text'] + '</a></td>';
   }  
   tickerTable += '</tr></table></div>';   

   // Ticker HTML Inhalt in Ticker Ebene Schreiben
   this.tickerObj = document.getElementById("MP_TICKER_" + this.tickerId);
   this.tickerObj.innerHTML = tickerTable;

   // Ticker Content Stylen und Positionieren   
   this.tickerContent = document.getElementById("MP_TICKER_CONTENT_" + this.tickerId);
   this.tickerContent.style.position = "relative";
   this.tickerContent.style.top = "0px";
   this.tickerContent.style.left = "0px";
   
   // Maus Handler den Ticker_Content_id zuweisen
   this.tickerContent.tickerObj = this;
   this.tickerContent.onmousemove = this.OnMouseMove;
   this.tickerContent.onmouseover = this.OnMouseOver;
   this.tickerContent.onmouseout = this.OnMouseOut;

   // Lösche Build Ticker HTML   
   objTickerBuilder.innerHTML = "";
   
   this.tickerTimer = null;
 }
 
 MP_Ticker.prototype.SetXY = function(x,y) {
   this.SetX(x);
   this.SetY(y);
 }
 
 MP_Ticker.prototype.SetXY = function(x,y) {
   if (x != null) this.tickerContent.style.left = x; 
   if (y != null) this.tickerContent.style.top = y;
 }
 
 MP_Ticker.prototype.SetByXY = function(x,y) { 
   if (x != null) this.tickerContent.style.left = this.GetX() + x; 
   if (y != null) this.tickerContent.style.top = this.GetY() + y;
 }
 
 MP_Ticker.prototype.GetX  = function() {
   return parseInt(this.tickerContent.style.left); 
 }
 
 MP_Ticker.prototype.GetY  = function() {
   return parseInt(this.tickerContent.style.top); 
 }
 
 MP_Ticker.prototype.ScrollHorizontal = function() {
   tickerX = this.GetX();
   tickerY = this.GetY();

   if (this.tickerContentWidth + tickerX > 0) {
     this.SetByXY(-1,null);
   } else {
     this.SetXY(0,null);
     tickerX = 0;
   }
   this.Scroll();
 }

 MP_Ticker.prototype.Scroll = function() {
   document.mpTickerAry[this.tickerId].tickerTimer = 
      setTimeout("document.mpTickerAry["+this.tickerId+"].ScrollHorizontal()",this.tickerSpeed);   
 }

 MP_Ticker.prototype.Start = function() {
   this.Scroll();
 }
 
 /****************************************************************************
 ** MP_Ticker.prototype.ParseTypo3NewsLinks                                 **
 **                                                                         **
 ** Spezial funktionen um aus Typo3 Links Ticker Daten zu erstellen.        **
 **                                                                         **
 ** Parameter:                                                              **
 **                                                                         **
 **  @tickerData: Typo3 Ticker Daten Array                                  **
 **               Bsp.: <a href="link"><strong>Text</strong></a>            **
 **  @strBaseUrl: Basis Url der TickerDaten                                 **
 **               bsp.: http://www.medienpark.net/                          **   
 **                                                                         **
 **                          MP_Ticker (c) 2007, medienPARK, Daniel Schwarz **
 ****************************************************************************/      
 MP_Ticker.prototype.ParseTypo3NewsLinks = function(tickerData,strBaseUrl)  {
  
    var m;
    for (i=0;i< tickerData.length;i++) {  
     // Ticker Daten mÃƒÂ¼ssen neu geparst werden da Sie keine Basis URL Haben und von typo3 erzeugt werden.
     m = tickerData[i].match('href=\"([^"]*)\"');
     if (m && m.length > 0) {
       strLink = m[1];
     } else {
       strLink = "";
     }
      
     m = tickerData[i].match('>(.*)</a>');
     if (m && m.length > 0) {
       strText = m[1];
     } else {
       strText = "";
     }
     
     if (strLink != "" && strText != "") {
       // Link Neu erzeugen .... bzw. in Ticker Struktur umwandeln (Text und Link Url sind getrennt)
       tickerData[i] = new Array();
       tickerData[i]['link'] = strBaseUrl + "/" + strLink;
       tickerData[i]['text'] = strText.replace("<strong>","").replace("</strong>","").replace("'","\'");
     }
   } // for (i=0;i< tickerData.length;i++)
 } // function MP_Ticker.prototype.ParseTypo3NewsLinks

 
 /****************************************************************************
 **                                                                         **
 ** Spezial funktionen um Deutsche UTF-8 Sonderzeichen in HTML Entitys      **
 ** umzuwandeln.
 **                                                                         **
 ** Erstellt: 29.05.2007                                                    **
 **                                                                         **
 ** Parameter:                                                              **
 **                                                                         **
 **  @tickerData: Typo3 Ticker Daten Array                                  **
 **               Bsp.: <a href="link"><strong>Text</strong></a>            **
 **									    **
 ** HINWEIS: der Script CODE MUSS in UTF-8 geschrieben sein !		    **
 **                                                                         **
 **                          MP_Ticker (c) 2007, medienPARK, Daniel Schwarz **
 ****************************************************************************/  

MP_Ticker.prototype.KonvertiereZuEntitys = function(tickerData) {
   for (i=0;i< tickerData.length;i++) { 
     tickerData[i]['text'] = tickerData[i]['text'].replace("ö","&ouml;"); // Ã¶
     tickerData[i]['text'] = tickerData[i]['text'].replace("ü","&uuml;"); // Ã¼
     tickerData[i]['text'] = tickerData[i]['text'].replace("ä","&auml;"); // Ã¤
     tickerData[i]['text'] = tickerData[i]['text'].replace("Ü","&Uuml;"); // Ãœ
     tickerData[i]['text'] = tickerData[i]['text'].replace("Ö","&Ouml;"); // Ã–
     tickerData[i]['text'] = tickerData[i]['text'].replace("Ä","&Auml;"); // Ã„ 
     tickerData[i]['text'] = tickerData[i]['text'].replace("ß","&szlig;"); // ÃŸ
     
//     tickerData[i]['text'] = tickerData[i]['text'].replace("Ã¢â€šÂ¬","&eur"); // â‚¬
   }
 } // MP_Ticker.prototype.KonvertiereEntitys    
 
    
 






 /****************************************************************************
 ** Einstellungen um diesen Ticker in andere seiten durch einen             **
 ** <script src=""></script> Bereich an beliebiger stelle in einem HTML     **
 ** Dokument einzubauen.                                                    **
 **                                                                         **
 **                                                                         **
 **                          MP_Ticker (c) 2007, medienPARK, Daniel Schwarz **
 ****************************************************************************/      

 
 // Standard Konfiguration
 // Variablen können bevor dieses Skript eingebunden wird Definiert werden
 if (typeof("bjTickerWidth") == "undefined") var bjTickerWidth = 100;
 if (typeof("bjTickerHeight") == "undefined") var bjTickerHeight = 20;
 if (typeof("bjTickerSpeed") == "undefined") var bjTickerSpeed = 20;
 if (typeof("bjTickerBackgroundColor") == "undefined") var bjTickerBackgroundColor = "";
 if (typeof("bjTickerLinkColor") == "undefined") var bjTickerLinkColor = "black";
 if (typeof("bjTickerLinkFontSize") == "undefined") var bjTickerLinkFontSize = "14px";
 if (typeof("bjTickerLinkFontFamily") == "undefined") var bjTickerLinkFontFamily = "Helvetica";
 if (typeof("bjTickerLinkFontWeight") == "undefined") var bjTickerLinkFontWeight = "bold";
 if (typeof("bjTickerTarget") == "undefined") var bjTickerTarget = "_blank";

 
 
 // Ticker darf nur einmal in der Seite eingebaut werden.
 if (!bjLatestNewsTicker) {
 
   MP_Ticker.prototype.ParseTypo3NewsLinks(tickerData_LatestNews,"http://www.bikersjournal.de"); 
   MP_Ticker.prototype.KonvertiereZuEntitys(tickerData_LatestNews);
   
   var bjLatestNewsTicker = new MP_Ticker(bjTickerWidth,bjTickerHeight,0,bjTickerSpeed,tickerData_LatestNews); 
   bjLatestNewsTicker.SetBackgroundColor(bjTickerBackgroundColor);
   bjLatestNewsTicker.SetLinkColor(bjTickerLinkColor);
   bjLatestNewsTicker.SetLinkFontSize(bjTickerLinkFontSize);
   bjLatestNewsTicker.SetLinkFontFamily(bjTickerLinkFontFamily);
   bjLatestNewsTicker.SetLinkFontWeight(bjTickerLinkFontWeight);
   bjLatestNewsTicker.SetTarget(bjTickerTarget);
 }