  // ===============================
  // Bibliothek - Standardfunktionen
  // ===============================

  // -----------------
  // Browser ermitteln
  // -----------------
  var MSIE = (document.all) ;

  // ---------
  // Variablen
  // ---------
  // var numberOfFillerGraphics = 43 ;   /* Anzahl verfuegbarer Filler-Grafiken - alt */
  var numberOfFillerGraphics = 34 ;      /* Anzahl verfuegbarer Filler-Grafiken - neu */
  var fillerGraphicsPath = "/images/random_fillers/" ;
  var activeItem = "" ;
  var srcString  = "" ;
  var imageName  = "" ;
  var mehrInfos  = "<span class=\"mehrInfos\">mehr Infos...</span>" ;
  var TabReportPictures = new Array() ;
  // var TabReportAreasPictures = new Array() ;


  // ------------------------------------------------------
  // globale Reportvariablen fuer Popup-Ausgabe der Reports
  // ------------------------------------------------------
  var S_DATUM = "", N_DATUM = "", E_DATUM = "", SNE_DATUM = "" ;
  var S_TITEL = "", N_TITEL = "", E_TITEL = "", SNE_TITEL = "" ;
  var S_TEXT = "", N_TEXT = "", E_TEXT = "", SNE_TEXT = "" ;


  // ------------------------------------------
  // vollstaendige Email-Adresse zurueckliefern
  // ------------------------------------------
  function GetMailAddress(name)
  {
    var domain  = "boars" ;
    var dot     = "." ;
    var country = "de" ;
    return name + decodeURIComponent("%40") + domain + dot + country ;
  }


  // ---------------------------------------------------------------
  // Image-Sourcen fuer Events "onMouseOver" und "onMouseOut" setzen
  // ---------------------------------------------------------------
  function SetHoverAttributes(item,mode)
  {
    // alert("\nitem.name [" + item.name + "]\nactiveItem [" + activeItem + "]\nmode [" + mode + "]") ;
    if (item.name != activeItem)
    {
      srcString = item.src.substring(0,item.src.indexOf("_")+1) + mode + item.src.substr(item.src.length-4) ;
      // alert("\nsrcString >" + srcString + "<") ;
      item.src = srcString ;
    }
  }

  
  function LoadRandomFillerGraphics()
  {
    var randomIndex = Math.round(Math.random() * 100) ;
    randomIndex = (randomIndex < 1) ? 1 : (randomIndex > numberOfFillerGraphics) ? (randomIndex - numberOfFillerGraphics) : randomIndex ;
    randomIndex = (randomIndex > numberOfFillerGraphics) ? numberOfFillerGraphics : randomIndex ;
    // window.status = "RFG-Index = [" + randomIndex + "]" ;
    window.status = "Willkommen im Baldham Boars Internet Ballpark" ;
    document.writeln("<img src=\"" + fillerGraphicsPath + "filler" + randomIndex + ".jpg\" width=\"236\" height=\"274\" alt=\"\">") ;
  }


  // ---------------------------------------------------------------
  // Ausgewaehltes Thema (via Navigationsbutton oder "mehr Info...")
  // in den Content-Bereich laden
  // ---------------------------------------------------------------
  function RequestContent(content)
  {
    globalContent = content ;
    if (playFlash)
    {
      var ca = document.getElementById("ContentArea") ;
      ca.innerHTML = "<body style=\"background-color:#D9D9D9;\">" + swaInnerHtmlString + "</body>" ;
    }
    else
    {
      LoadContent() ;
    }
  }


  // ---------------------------------------------------------------
  // Ausgewaehltes Thema (via Navigationsbutton oder "mehr Info...")
  // in den Content-Bereich laden
  // ---------------------------------------------------------------
  function LoadContent()
  {
    if (LoadContent.arguments.length > 0)         /* Variable "globalContent" */
    {                                             /* fuer Unterseiten-Aufrufe */
      globalContent = LoadContent.arguments[0] ;  /* versorgen (Parameter)    */
    }
    if (globalContent.indexOf("_") < 0)    /* Unterseiten hier nicht beruecksichtigen */
    {
      if (activeItem != "")
      {
        imageName = "Button" + activeItem.substring(7,8).toUpperCase() + activeItem.substr(8) + "_out.gif" ;
        document.images[activeItem].src = "./images/buttons/" + imageName ;
      }
      if (globalContent != "home")
      {
        activeItem = "button_" + globalContent ;
        imageName = "Button" + globalContent.substring(0,1).toUpperCase() + globalContent.substr(1) + "_click.gif" ;
        document.images["button_"+globalContent].src = "./images/buttons/" + imageName ;
      }
      else
        activeItem = "" ;
    }
    var globalContentSuffix = (globalContent != "home") ? "htm" : "php" ;
    var ca = document.getElementById("ContentArea") ;
    ca.innerHTML = "<iframe src=\"./" + globalContent + "." + globalContentSuffix + "\" name=\"ContentAreaFrame\" width=\"843\" height=\"407\" frameborder=\"0\" scrolling=\"no\" style=\"border:0px solid #800000;\"></iframe>" ;
    // ---------------------------------------------
    // globale MI-Container ausblenden, sofern nicht
    // die Team-Hauptseite aufgerufen wird
    // ---------------------------------------------
    if (globalContent != "teams")
    {
      if (contentArea6_MI)
      {
        contentArea6_MI.style.visibility         = "hidden" ;
        contentArea6_MI.style.display            = "none" ;
      }
      if (contentArea7_MI)
      {
        contentArea7_MI.style.visibility         = "hidden" ;
        contentArea7_MI.style.display            = "none" ;
      }
    }
  }


  function DrawShadow()
  {
    document.writeln("<table width=\"100%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td class=\"boxCornersTopLeftFrontS\">&nbsp;</"+"td><td class=\"boxCornersTopRightFrontS\">&nbsp;</"+"td></"+"tr><tr><td class=\"boxCornersBottomLeftFrontS\">&nbsp;</"+"td><td class=\"boxCornersBottomRightFrontS\">&nbsp;</"+"td></"+"tr></"+"table>") ;
  }


  // ---------------------------------------------------------------------
  // Content-Bereich "NextMatch" mit Inhalt (Vereinslogos, Datum, Uhrzeit)
  // zum nächsten Spiel des Teams <team> versorgen
  // ---------------------------------------------------------------------
  function LoadNextMatch(team)
  {
    parent.contentArea6S.style.visibility = "hidden" ;
    parent.nextMatchArea.innerHTML = "<iframe src=\"/cgi-bin/NextMatch.pl?TEAM=" + team + "\" name=\"NextMatch\" width=\"236\" height=\"130\" frameborder=\"0\" scrolling=\"no\"></iframe>" ;
  }


  // --------------------------------------------------------
  // Baseball Card zu vorgegebenem Spieler (nachname,vorname)
  // in Container "BBCArea" einer Teamunterseite ausgeben
  // (Sliding-Mechanismus)
  // --------------------------------------------------------
  function LoadBBC(nachname,vorname)
  {
    var bbcVerz     = "/images/teams/bbc" ;
    var bbcFormat   = "jpg" ;
    var bbcNachName = nachname.toLowerCase().replace(/ /g, "_") ;
    bbcNachName     = bbcNachName.replace(/ä/g, "ae") ;
    bbcNachName     = bbcNachName.replace(/ö/g, "oe") ;
    bbcNachName     = bbcNachName.replace(/ü/g, "ue") ;
    bbcNachName     = bbcNachName.replace(/ß/g, "ss") ;
    var bbcVorName  = vorname.toLowerCase().replace(/ /g, "_") ;
    bbcVorName      = bbcVorName.replace(/ä/g, "ae") ;
    bbcVorName      = bbcVorName.replace(/ö/g, "oe") ;
    bbcVorName      = bbcVorName.replace(/ü/g, "ue") ;
    bbcVorName      = bbcVorName.replace(/ß/g, "ss") ;
    var bbcPfad     = bbcVerz + "/" + bbcNachName + "_" + bbcVorName + "." + bbcFormat ;
    var bbca        = document.getElementById("BBCArea") ;
    bbca.innerHTML = "<body style=\"margin:0px; padding:0px; cursor:pointer\"><table width=\"247\" height=\"369\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><td width=\"100%\" height=\"100%\" style=\"background-image:url(" + bbcPfad + "); background-repeat:no-repeat;\" onClick='UnloadBBC();'>&nbsp;</td></table></body>" ;
    // SetSlideContainerValues("BBCArea","V",25,10,10,"I");    /* vertikales Sliding */
    SetSlideContainerValues("BBCArea","H",10,10,15,"I");    /* horizontales Sliding */
    SlideContainer();
  }

  // ------------------------------------------
  // Ausgegebene Baseball Card wieder verbergen
  // (Sliding-Mechanismus)
  // ------------------------------------------
  function UnloadBBC()
  {
    // SetSlideContainerValues("BBCArea","V",25,10,10,"O");    /* vertikales Sliding */
    SetSlideContainerValues("BBCArea","H",10,10,15,"O");    /* horizontales Sliding */
    SlideContainer();
  }


  // ------------------------------------------------------------
  // Bereiche "NextMatchArea" und "AdditionalDataArea" wieder auf
  // Standardinhalt zuruecksetzen
  // ------------------------------------------------------------
  function ResetAdditionalAreas()
  {
    if (parent.nextMatchArea)
      parent.nextMatchArea.innerHTML                  = parent.nextMatchAreaHTML ;
    if (parent.additionalDataArea)
    {
      parent.additionalDataArea.innerHTML             = parent.additionalDataAreaHTML ;
      parent.additionalDataArea.style.borderWidth     = "1px;" ;
      parent.additionalDataArea.style.backgroundColor = "#D9D9D9" ;
    }
    if (parent.contentArea6S)
    {
      parent.contentArea6S.style.display              = "none" ;
      parent.contentArea6S.style.visibility           = "hidden" ;
    }
    if (parent.contentArea7S)
    {
      parent.contentArea7S.style.display              = "none" ;
      parent.contentArea7S.style.visibility           = "hidden" ;
    }
  }


  function ShowPopupContentArea(typeOfContent)
  {
    // alert("\nKontrolle 1... SPCA") ;
    var popupTitleString = "", reportTypeString = "" ;

    if (typeOfContent == "anfahrt")
      popupTitleString = "<span class=\"headLine_grau\">ANFAHRT <span class=\"headLine_rot\">ZUM </span>BOARS <span class=\"headLine_rot\">BALLPARK</span></span>" ;
    if (typeOfContent == "S")   popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">MATCH</span></span>" ;
    // if (typeOfContent == "S")   popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">FLASHBACK</span></span>" ;
    if (typeOfContent == "N")   popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">NEWS</span></span>" ;
    if (typeOfContent == "E")   popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">EVENT</span></span>" ;
    if (typeOfContent == "SNE")
    {
      // alert("\nPopup-Bereich fuer Typ \"" + typeOfContent + "\" initiiert...") ;
      // reportTypeString = parent.document.getElementById("report_type").innerHTML ;
      popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">" + parent.reportTypeString + "</span></span>" ;
      // alert("\nReportSelectionArea-ID [" + parent.reportSelectionArea.id + "]") ;
      parent.reportSelectionArea.style.visibility = "hidden" ;
    }
    if (typeOfContent == "LM")             /* ---- Boars Last Matches ---- */
      popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">LAST</span> MATCHES</span>" ;

    if (typeOfContent == "I")
      popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">IMPRESSUM</span></span>" ;

    if (typeOfContent == "DM2006")         /* ---- DM 2006 - Statistik ---- */
      popupTitleString = "<span class=\"headLine_grau\">DEUTSCHE <span class=\"headLine_rot\">JUNIOREN </span>MEISTERSCHAFT <span class=\"headLine_rot\">2006</span></span>" ;

    if (typeOfContent == "D")              /* ---- Download ---- */
      popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">DOWNLOAD</span></span>" ;

    if (typeOfContent == "G")              /* ---- Galerie ---- */
      popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">PHOTO </span>GALLERIES</span>" ;

    if (typeOfContent == "B")              /* ---- Bestellung ---- */
      popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">ORDER </span>SERVICE</span>" ;

    if (typeOfContent == "K")              /* ---- Kalender ---- */
      popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">TERMINE</span>" ;

    if (typeOfContent == "T")
      popupTitleString = "<span class=\"headLine_grau\">BOARS <span class=\"headLine_rot\">" + ShowPopupContentArea.arguments[1] + "</span></span>" ;

    var closeIcon = "<a style=\"text-decoration:none;\" href='javascript:HidePopupContentArea(\"" + typeOfContent + "\");'><img src=\"/images/close_1.jpg\" border=\"0\" alt=\"Schliessen\"></" + "a>" ;
    if (typeOfContent == "B")
    {
      closeIcon = "<a style=\"text-decoration:none;\" href=\"/download/Bestellwesen_HowTo.pdf\" target=\"order_help\"><img src=\"/images/help_1.gif\" border=\"0\" alt=\"How to order\"></" + "a>" + closeIcon ;
    }
    var closeCode = "<table width=\"100%\" border=\"0\"><tr><td width=\"80%\" style=\"text-align:left; padding-left:10px;\">" + popupTitleString + "</" + "td><td width=\"20%\" align=\"right\">" + closeIcon + "</" + "td></" + "tr></" + "table>" ;

    popupContentArea.style.display     = "block" ;
    popupContentArea.innerHTML = closeCode + popupContentArea.innerHTML ;

    if (typeOfContent == "G")        /* Galerie - benoetigt etwas mehr Platz */
    {
      popupContentArea.style.top     = popupContentArea.offsetTop - 70 ;
      popupContentArea.style.height  = popupContentArea.offsetHeight + 260 ;
      popupContentAreaS.style.top    = popupContentAreaS.offsetTop - 70 ;
      popupContentAreaS.style.height = popupContentAreaS.offsetHeight + 260 ;
    }

    if (typeOfContent == "K")        /* Kalender - benoetigt etwas mehr Platz */
    {
      popupContentArea.style.top     = popupContentArea.offsetTop - 30 ;
      popupContentArea.style.height  = popupContentArea.offsetHeight + 180 ;
      popupContentAreaS.style.top    = popupContentAreaS.offsetTop - 30 ;
      popupContentAreaS.style.height = popupContentAreaS.offsetHeight + 180 ;
    }

    popupContentArea.style.visibility  = "visible" ;
    popupContentAreaS.style.visibility = "visible" ;
  }


  function HidePopupContentArea(typeOfContent)
  {
    if (typeOfContent == "G")
    {
      popupContentArea.style.top     = popupContentArea.offsetTop + 70 ;
      popupContentArea.style.height  = popupContentArea.offsetHeight - 260 ;
      popupContentAreaS.style.top    = popupContentAreaS.offsetTop + 70 ;
      popupContentAreaS.style.height = popupContentAreaS.offsetHeight - 260 ;
    }
    if (typeOfContent == "K")
    {
      popupContentArea.style.top     = popupContentArea.offsetTop + 30 ;
      popupContentArea.style.height  = popupContentArea.offsetHeight - 180 ;
      popupContentAreaS.style.top    = popupContentAreaS.offsetTop + 30 ;
      popupContentAreaS.style.height = popupContentAreaS.offsetHeight - 180 ;
    }
    popupContentArea.style.visibility  = "hidden" ;
    popupContentArea.style.display     = "none" ;
    popupContentAreaS.style.visibility = "hidden" ;
    if (parent.reportSelectionArea)
      parent.reportSelectionArea.style.visibility = "visible" ;
    if (parent.volumeSelectionArea)
      parent.volumeSelectionArea.style.visibility = "visible" ;
  }


  function ZoomRouteDescription()
  {
    if (popupContentArea)
    {
      var popupContentAreaString = document.getElementById("ContentArea4_text").innerHTML ;
      popupContentAreaString = popupContentAreaString.replace(/255x125/, "300x330") ;
      popupContentAreaString = popupContentAreaString.replace(/Boars Ballpark"/, "Boars Ballpark\" align=\"left\"") ;
      popupContentArea.innerHTML = popupContentAreaString ;
      // -----------------------------------------------------
      // Content-Area vor Ausgabe in Popup-Area nachbearbeiten
      // -----------------------------------------------------
      ShowPopupContentArea("anfahrt") ;
    }
  }


  function SetPopupContent(typeOfContent,contentDocument)
  {
    // --------------------------------
    // typeOfContent    contentDocument
    // -------------    ---------------
    //   D                download
    //   G                galerie
    //   B                bestellung
    //   I                impressum
    //   DM2006           dm2006
    // --------------------------------
    var scrollingIndicator     = (typeOfContent == "B" || typeOfContent == "G" || typeOfContent == "K") ? "no" : "yes" ;
    var popupContent_filetype  = (typeOfContent == "B") ? "php" : "htm" ;
    var popupFrameWidth        = "798" ;
    var popupFrameHeight       = "330" ;
    popupFrameWidth            = (typeOfContent == "G") ? "798" : popupFrameWidth ;
    popupFrameHeight           = (typeOfContent == "G") ? "590" : popupFrameHeight ;
    popupFrameWidth            = (typeOfContent == "K") ? "798" : popupFrameWidth ;
    popupFrameHeight           = (typeOfContent == "K") ? "510" : popupFrameHeight ;
    var popupContentAreaString = "<iframe src=\"/" + contentDocument + "." + popupContent_filetype + "\" name=\"" + contentDocument.substr(0,1).toUpperCase() + contentDocument.substr(1) + "Frame\" width=\"" + popupFrameWidth + "\" height=\"" + popupFrameHeight + "\" frameborder=\"0\" scrolling=\"" + scrollingIndicator + "\"></iframe>" ;
    popupContentArea.innerHTML = popupContentAreaString ;
    popupContentArea.style.overFlow = "hidden" ;
    ShowPopupContentArea(typeOfContent) ;
  }


  function PopupDownload()
  {
    var popupContentAreaString = "<iframe src=\"/download.htm\" name=\"DownloadFrame\" width=\"798\" height=\"330\" frameborder=\"0\" scrolling=\"yes\"></iframe>" ;
    popupContentArea.innerHTML = popupContentAreaString ;
    popupContentArea.style.overFlow = "hidden" ;
    ShowPopupContentArea("D") ;
  }


  function PopupKalender()
  {
    var popupContentAreaString = "<iframe src=\"/kalender.htm\" name=\"KalenderFrame\" width=\"810\" height=\"640\" frameborder=\"0\" scrolling=\"no\"></iframe>" ;
    popupContentArea.innerHTML = popupContentAreaString ;
    popupContentArea.style.overFlow = "hidden" ;
    ShowPopupContentArea("K") ;
  }


  function PopupImpressum()
  {
    var popupContentAreaString = "<iframe src=\"/impressum.htm\" name=\"ImpressumFrame\" width=\"798\" height=\"330\" frameborder=\"0\" scrolling=\"yes\"></iframe>" ;
    popupContentArea.innerHTML = popupContentAreaString ;
    popupContentArea.style.overFlow = "hidden" ;
    ShowPopupContentArea("I") ;
  }


  function PopupDM2006()
  {
    var popupContentAreaString = "<iframe src=\"/dm2006.htm\" name=\"DM2006Frame\" width=\"798\" height=\"330\" frameborder=\"0\" scrolling=\"yes\"></iframe>" ;
    popupContentArea.innerHTML = popupContentAreaString ;
    popupContentArea.style.overFlow = "hidden" ;
    ShowPopupContentArea("DM2006") ;
  }


  function PopupLastReports()
  {
    var popupContentAreaString = "<iframe src=\"/cgi-bin/DisplayReport.pl?TYP=S&DATUM=last&JAHRGANG=ACTIVE&TEAM=ALL\" name=\"PopupLastReportsFrame\" width=\"798\" height=\"330\" frameborder=\"0\" scrolling=\"yes\"></iframe>" ;
    popupContentArea.innerHTML = popupContentAreaString ;
    popupContentArea.style.overFlow = "hidden" ;
    ShowPopupContentArea("LM") ;
  }


  function PopupTeams(team)
  {
    var imageString = "<img src=\"/images/teams/team_" + team + "_p.jpg\" alt=\"\" width=\"780\"><br>" ;
    var teamMappingString = "herren1HERREN 1|herren2HERREN 2|herren3HERREN 3|juniorenJUNIOREN|jugendJUGEND|schueler_lSCHÜLER LIVEPITCHING|schueler_tSCHÜLER TOSSBALL 1|schueler_t2SCHÜLER TOSSBALL 2|kinderKINDER|bbqBBQ|" ;
    var popupTeam = teamMappingString.substring(teamMappingString.indexOf(team)+team.length,teamMappingString.indexOf("|",teamMappingString.indexOf(team))) ;
    // alert("\nteam [" + team + "]\npopupTeam [" + popupTeam + "]") ;
    var popupContentAreaString = "<table width=\"100%\" cellspacing=\"0\" style=\"border-width:0px;\"><tr><td style=\"text-align:center; vertical-align:top;\">" + imageString + "</td></tr></table>" ;
    popupContentArea.innerHTML = popupContentAreaString ;
    ShowPopupContentArea("T",popupTeam) ;
  }


  function PopupReport(typ)
  {
    // alert("\nFunktion \"PopupReport\" ist fuer Typ \"" + typ + "\" angelaufen...\n\nN_DATUM [" + N_DATUM + "]\nN_TITEL [" + N_TITEL + "]\nN_TEXT [" + N_TEXT + "]") ;
    var prDatum = (typ == "S") ? S_DATUM : (typ == "N") ? N_DATUM : (typ == "E") ? E_DATUM : SNE_DATUM ;
    var prTitel = (typ == "S") ? S_TITEL : (typ == "N") ? N_TITEL : (typ == "E") ? E_TITEL : SNE_TITEL ;
    var prText  = (typ == "S") ? S_TEXT  : (typ == "N") ? N_TEXT  : (typ == "E") ? E_TEXT  : SNE_TEXT ;
    if (prDatum.length > 9 && prDatum.indexOf(" ") > -1)
      prDatum = prDatum.substr(6,2) + "." + prDatum.substr(4,2) + "." + prDatum.substr(0,4) + " / " + prDatum.substr(9) ;
    else
      prDatum = prDatum.substr(6,2) + "." + prDatum.substr(4,2) + "." + prDatum.substr(0,4) ;
    prText = prText.replace(/\[MI1\]/, "") ;
    prText = prText.replace(/\[MI2\]/, "") ;
    prText = prText.replace(/\[MI3\]/, "") ;
    prText = prText.replace(/\[dquot\]/g, "&#34;") ;
    prText = prText.replace(/\[squot\]/g, "&#39;") ;
    prTitel = prTitel.replace(/\[dquot\]/g, "&#34;") ;
    prTitel = prTitel.replace(/\[squot\]/g, "&#39;") ;
    var imageString = "" ;
    // alert("\nTabReportPictures.length [" + TabReportPictures.length + "]") ;
    for (i=0; i<TabReportPictures.length; i++)
    {
      if (TabReportPictures[i].substr(0,typ.length) == typ)
        imageString += "<img src=\"/images/archivbilder/" + TabReportPictures[i].substr(typ.length+1) + "\" alt=\"\" width=\"350\"><br><br>" ;
    }
    // alert("\nimageString [" + imageString + "]") ;
    // alert("\nprTitel [" + prTitel + "]") ;
    var popupContentAreaString = "<table width=\"100%\" cellspacing=\"0\" style=\"border-width:0px;\"><tr><td style=\"text-align:left; vertical-align:top;\" rowspan=\"3\"><br>" + imageString + "</td><td style=\"text-align:left; vertical-align:top; padding:0px; padding-right:10px;\"><table width=\"100%\" cellspacing=\"0\" style=\"border-width:0px;\"><tr><td style=\"text-align:right; vertical-align:top; padding:0px; padding-right:10px;\"><span id=\"NEWS_datum\">" + prDatum + "</span></td></tr><tr><td style=\"text-align:left; vertical-align:top; padding:2px; padding-left:10px; padding-right:10px;\"><span id=\"NEWS_titel\">" + prTitel + "<br><br></span></td></tr><tr><td style=\"text-align:left; vertical-align:top; padding:0px; padding-left:10px; padding-right:10px;\"><span id=\"NEWS_text\">" + prText + "</span></td></tr></table></td></tr></table>" ;
    // alert("\npopupContentAreaString [" + popupContentAreaString + "]") ;
    popupContentArea.innerHTML = popupContentAreaString ;
    ShowPopupContentArea(typ) ;
  }


  function ClearReportPicturesTable()
  {
    // for (i=parent.TabReportPictures.length; i>0; i--)
    for (i=TabReportPictures.length; i>0; i--)
      TabReportPictures.pop() ;
      // parent.TabReportPictures.pop() ;
  }

  function SetReportPictures(typ, datei)
  {
    // alert("\nFunktion \"SetReportPictures\" aufgerufen mit:\n\nTyp [" + typ + "]\nGrafikdatei [" + datei + "]") ;
    if (datei != "")
      TabReportPictures.push(typ + "|" + datei) ;
      // parent.TabReportPictures.push(typ + "|" + datei) ;
  }


  function FillReportAreas(typ, feld, wert, id, jahrgang)
  {
    // if (typ == "SNE")
    //   alert("\nFunktion \"FillReportAreas\" aufgerufen mit:\n\nTyp [" + typ + "]\nFeld [" + feld + "]\nWert [" + wert + "]") ;

    // window.status = "Feldname [" + feld.name + "] ---- Feldwert [" + feld.value + "]" ;
    var blankString = "", htmlString1 = "", htmlString2 = "", datumString = "", authorString = "" ;
    // alert("\nwert VORHER [" + wert + "]") ;
    // var feldValue = wert.replace(/\[dquot\]/g, "&#34;") ;
    // feldValue = feldValue.replace(/\[squot\]/g, "&#39;") ;
    var feldValue = wert.replace(/\[dquot\]/g, "\"") ;
    feldValue = feldValue.replace(/\[squot\]/g, "'") ;
    // alert("\nwert NACHHER [" + feldValue + "]") ;

    var mehrInfosString = "<a href='javascript:DeliverReport(\"" + id + "\",\"" + jahrgang + "\");'>" + mehrInfos + "</a>" ;

    if (feld == "DATUM")
    {
      datumString = feldValue.substr(6,2) + "." + feldValue.substr(4,2) + "." + feldValue.substr(0,4) ;
      if (feldValue.length > 9 && feldValue.indexOf(" ") > -1)
      {
        datumString += " / " ;
        authorString = feldValue.substr(feldValue.indexOf(" ")+1) ;
        for (i=0; i<authorString.length; i++)
        {
          if (authorString.substr(i,1) == authorString.substr(i,1).toUpperCase() && authorString.substr(i,1) != " ")
            datumString += authorString.substr(i,1) ;
        }
      }
      if (typ == "S")    /* Spielbericht (MATCH) */
        document.getElementById("MATCH_datum").innerHTML = datumString ;
      if (typ == "N")    /* News (NEWS) */
        document.getElementById("NEWS_datum").innerHTML  = datumString ;
      if (typ == "E")    /* Event (EVENT) */
        document.getElementById("EVENT_datum").innerHTML = datumString ;
      if (typ == "SNE")
        document.getElementById("SNE_datum").innerHTML   = datumString ;
    }
    if (feld == "TITEL")
    {
      if (typ == "S")    /* Spielbericht (MATCH) */
        document.getElementById("MATCH_titel").innerHTML = feldValue ;
      if (typ == "N")    /* News (NEWS) */
        document.getElementById("NEWS_titel").innerHTML  = feldValue ;
      if (typ == "E")    /* Event (EVENT) */
        document.getElementById("EVENT_titel").innerHTML = feldValue ;
      if (typ == "SNE")
      {
        // alert("\nSNE_titel.innerHTML VORHER [" + document.getElementById("SNE_titel").innerHTML + "]\n\nfeldValue [" + feldValue + "]") ;
        document.getElementById("SNE_titel").innerHTML   = feldValue ;
        // alert("\nSNE_titel.innerHTML NACHHER [" + document.getElementById("SNE_titel").innerHTML + "]") ;
      }
    }
    if (feld == "TEXT")
    {
      feldValue = escape(feldValue) ;
      feldValue = feldValue.replace(/%0D%0A/g, "%3Cbr%3E") ;
      feldValue = unescape(feldValue) ;
      // ----------------------------------------------------------------------
      if (typ == "S")         /* Report-Area: Spielbericht */
      {
        document.getElementById("MATCH_text").innerHTML = feldValue ;
        document.getElementById("MATCH_text").innerHTML = document.getElementById("MATCH_text").innerHTML.replace(/\[MI1\]/, "") ;
        if (document.getElementById("MATCH_text").innerHTML.indexOf("[MI2]") > -1)
        {
          blankString = "" ;
          htmlString1 = feldValue.substring(0, feldValue.indexOf("[MI2]")) ;
          for (i=htmlString1.length-1; i>=0; i--)
          {
            if (htmlString1.substr(i,1) != " ")
              break ;
            else
              blankString += "&nbsp;" ;
          }
          document.getElementById("MATCH_text").innerHTML = htmlString1.substr(0,i+1) + blankString + mehrInfosString ;
        }
      }
      // ----------------------------------------------------------------------
      if (typ == "N")         /* Report-Area: News */
      {
        document.getElementById("NEWS_text").innerHTML = feldValue ;
        if (document.getElementById("NEWS_text").innerHTML.indexOf("[MI1]") > -1)
        {
          blankString = "" ;
          htmlString1 = feldValue.substring(0, feldValue.indexOf("[MI1]")) ;
          for (i=htmlString1.length-1; i>=0; i--)
          {
            if (htmlString1.substr(i,1) != " ")
              break ;
            else
              blankString += "&nbsp;" ;
          }
          document.getElementById("NEWS_text").innerHTML = htmlString1.substr(0,i+1) + blankString + mehrInfosString ;
        }
      }
      // ----------------------------------------------------------------------
      if (typ == "E")         /* Report-Area: Event */
      {
        document.getElementById("EVENT_text").innerHTML = feldValue ;
        if (document.getElementById("EVENT_text").innerHTML.indexOf("[MI1]") > -1)
        {
          blankString = "" ;
          htmlString1 = feldValue.substring(0, feldValue.indexOf("[MI1]")) ;
          for (i=htmlString1.length-1; i>=0; i--)
          {
            if (htmlString1.substr(i,1) != " ")
              break ;
            else
              blankString += "&nbsp;" ;
          }
          document.getElementById("EVENT_text").innerHTML = htmlString1.substr(0,i+1) + blankString + mehrInfosString ;
        }
      }
      // ----------------------------------------------------------------------
      if (typ == "SNE")
      {
        // document.getElementById("SNE_text").innerHTML = feldValue ;
        var feldValueSNE = feldValue ;
        feldValueSNE = feldValueSNE.replace(/\[MI1\]/, "") ;
        feldValueSNE = feldValueSNE.replace(/\[MI2\]/, "") ;
        if (feldValueSNE.indexOf("[MI3]") > -1)
        {
          blankString = "" ;
          htmlString1 = feldValueSNE.substring(0, feldValueSNE.indexOf("[MI3]")) ;
          for (i=htmlString1.length-1; i>=0; i--)
          {
            if (htmlString1.substr(i,1) != " ")
              break ;
            else
              blankString += "&nbsp;" ;
          }
          document.getElementById("SNE_text").innerHTML = htmlString1.substr(0,i+1) + blankString + mehrInfosString ;
        }
        else
          document.getElementById("SNE_text").innerHTML = feldValueSNE ;
      }
    }
    eval("parent." + typ + "_" + feld + " = \"" + wert + "\" ;") ;

    // ------------------------------------------------------
    // "mehr Infos..."-Bereich aktivieren, falls erforderlich
    // ------------------------------------------------------
    ExecuteMI(typ,feld,id,jahrgang) ;

  }





















