<?php
/**
 * KalenderMx v1.4
 * Copyright (c) 2004 by A.Ellsel (kalender@pragmamx.org)
 * http://www.pragmamx.org & http://www.shiba-design.de
 * 
 * KalenderMx was based on EventCalendar 2.0
 * Copyright (c) 2001 Originally by Rob Sutton
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * $Source: D:\CVS/dev-Kalender/html/blocks/block-Calendar_month.php,v $
 * $Revision: 1.6 $
 * $Author: Andreas Ellsel $
 * $Date: 2006/07/17 11:28:04 $
 */
// ## !!!! don't change this 3 lines !!!! #########################################
$thisfile = basename(__file__);
if (eregi($thisfile, $_SERVER["PHP_SELF"])) die ("You can't access this file directly...");
global $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $bgcolor5, $textcolor1, $textcolor2, $dbi;
// ################################################################################
$mxblockcache = false;
// #####  Einstellungen fuer den Block  ###################################################
// CHANGE THIS IF YOU CHANGE THE CALENDAR-MODULES FOLDER NAME
if (!defined("CAL_MODULE_NAME")) define("CAL_MODULE_NAME", "Kalender");
// ########################################################################################
// verschiedene Einstellungen
$bordercolor = $bgcolor2;         // Rahmenfarbe um Tage
$todaycolor = $textcolor2;         // Textfarbe HEUTE
$todaybackground = $bgcolor2;         // Hintergrundfarbe HEUTE
$daycolor = $textcolor1;         // Textfarbe normale Tage
$daybackground = $bgcolor1;         // Hintergrundfarbe normale Tage
$showtodayevents = 1;         // heutige Termine anzeigen
$showLegend = 0;         // Farblegende anzeigen: 0=nein / 1=ja
$showNewlink = 1;         // Link um neuen Termin zu uebermitteln anzeigen
$showsymbols = 1;         // Bildsymbole anzeigen
// ##### Ende der Einstellungen, ab hier nichts veraendern !! #############################
$conftest = @include("modules/" . CAL_MODULE_NAME . "/config/config.php");
if (!$conftest) {
    $content = "<b>Error!</b><br>You must change the constant '\"CAL_MODULE_NAME\"' in file: <br>" . __file__ . "";
    return;
} 
get_lang(CAL_MODULE_NAME);
if (!isset($calconf)) @include(CAL_MODULE_PATH . "config/config.php");
if (!defined("CAL_MODULE_PATH")) define("CAL_MODULE_PATH", "modules/" . CAL_MODULE_NAME . "/");
if (!defined("CAL_TABLE_EVENTS")) @include_once(CAL_MODULE_PATH . "includes/functions.php");

$content = "";

    if (!isset($caldotcolor)) $caldotcolor = calGetDotColors();
    include(CAL_MODULE_PATH . "config/configcolors.php");
    if (!calDetectGoodBrowser() || calIsPrintView()) {
        $calconf['TextEvents'] = 1;
    } 

    $Today_d = $d = (int)Date("d");
    $Today_m = $m = (int)Date("m");
    $Today_y = $y = (int)Date("Y");

    $pd = @mktime(0, 0, 0, $m - 1, $d, $y);
    $Prev_Date = "m=" . Date("m", $pd) . "&amp;d=" . Date("d", $pd) . "&amp;y=" . Date("Y", $pd);
    $var = (Date("Y", $pd) != $y) ? " " . Date("Y", $pd) : "";
    $Prev_Month = calGetMonthName(Date("m", $pd)) . $var;

    $nd = @mktime(0, 0, 0, $m + 1, $d, $y);
    $Next_Date = "m=" . Date("m", $nd) . "&amp;d=" . Date("d", $nd) . "&amp;y=" . Date("Y", $nd);
    $var = (Date("Y", $nd) != $y) ? " " . Date("Y", $nd) : "";
    $Next_Month = calGetMonthName(Date("m", $nd)) . $var;

    $showmonth = calGetMonthName($m) . " $y";

    /**
     * *** Get the Day (Integer) for the first day in the month
     */
    $First_Day_of_Month_Date = @mktime(0, 0, 0, $m, 1, $y);
    $Day_of_First_Week = Date("w", $First_Day_of_Month_Date) - _CALWEEKBEGINN;
    if ($Day_of_First_Week < 0) $Day_of_First_Week = 6;
    /**
     * *** Find the last day of the month
     */
    $lastday = (int)Date("t", $First_Day_of_Month_Date);
    /**
     * *** Set up data
     */

    $picheight = 9;
    $GLOBALS['cal_pagetitle'] = $showmonth;
    $content .= "<br>";
    if (!calIsPrintView() && $calconf['ShowPopup']) {
        calOverlibDiv();
        $cal_overlib = new Overlib();
        $cal_overlib->ol_width = $popupwidth;
        $cal_overlib->ol_delay = $popupdelay;
        $cal_overlib->ol_hauto = "True";
        $cal_overlib->ol_vauto = "True";
    } 
    $result = sql_query("SELECT eid,title,hometext,startDate,endDate,categorie FROM " . CAL_TABLE_EVENTS . " 
	WHERE (((startDate >= '$y-$m-1' AND startDate <= '$y-$m-$lastday') 
	OR (endDate >= '$y-$m-1' AND endDate <= '$y-$m-$lastday') 
	OR (endDate >= '$y-$m-$lastday' AND startDate <= '$y-$m-1')) 
	AND alldayevent=1) 
	and (categorie in(" . calGetSqlEventpoints() . ")) 
	AND activ=1
	ORDER BY startDate ASC", $dbi);
    if (!is_resource($result)) {
        $mmsg = (calIsAdmin()) ? '<br><br><a href="admin.php?op=CalSetup"><b>goto Setup</b></a><br><br>' : '';
        calErrAdminMsg(_CALERRSQLERROR . $mmsg);
    } 
    $count = -1;
    while (list($arr_eid[], $arr_title[], $arr_hometext[], $arr_startDate[], $arr_endDate[], $arr_categorie[]) = sql_fetch_row($result, $dbi)) {
        $count++;
    } 
    /**
     * *** Build Month
     */
    $tdwidth = (int)(100 / 7) ;
    $tblwidth = 7 * $tdwidth;
    $content .= "<center>";
    $content .= "\n<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">\n<tr valign=\"top\">";
    if (!calIsPrintView()) $content .= "<td width=\"25%\" style=\"white-space: nowrap;\"><a href=\"" . CAL_MODULE_LINK . "&amp;$Prev_Date&amp;op=month\" title=\"" . $Prev_Month . "\"><span class=\"content\"><img src=\"" . CAL_IMAGE_PATH . "back.gif\" alt=\"" . $Prev_Month . "\" width=\"16\" height=\"14\" border=\"0\" hspace=\"5\">" . $Prev_Month . "</span></a></td>\n";
    $content .= "<td width=\"50%\" align=\"center\" style=\"white-space: nowrap;\"><span class=\"title\"><b>" . $showmonth . "</b></span></td>\n";
	if (!calIsPrintView()) $content .= "<td width=\"25%\" align=\"right\" style=\"white-space: nowrap;\"><a href=\"" . CAL_MODULE_LINK . "&amp;$Next_Date&amp;op=month\" title=\"" . $Next_Month . "\"><span class=\"content\">" . $Next_Month . "<img src=\"" . CAL_IMAGE_PATH . "next.gif\" alt=\"" . $Next_Month . "\" width=\"16\" height=\"14\" border=\"0\" hspace=\"5\"></span></a></td>\n";
    $content .= "</tr>\n</table>\n";
    $content .= "<table style=\"background-color: $monthtablebgcolor;\" border=\"0\" cellspacing=\"1\" cellpadding=\"0\" width=\"${tblwidth}%\" class=\"tbmonthview\">";
    $day_of_week = 1;

    $content .= "<tr style=\"background-color: $monthheadbgcolor;\">
		<th width=\"$tdwidth%\" class=\"thmonthview\"><span style=\"color: $monthheadtxtcolor;\" class=\"content\">" . _CALFIRSTDAY . "</span></th>
		<th width=\"$tdwidth%\" class=\"thmonthview\"><span style=\"color: $monthheadtxtcolor;\" class=\"content\">" . _CALSECONDDAY . "</span></th>
		<th width=\"$tdwidth%\" class=\"thmonthview\"><span style=\"color: $monthheadtxtcolor;\" class=\"content\">" . _CALTHIRDDAY . "</span></th>
		<th width=\"$tdwidth%\" class=\"thmonthview\"><span style=\"color: $monthheadtxtcolor;\" class=\"content\">" . _CALFOURTHDAY . "</span></th>
		<th width=\"$tdwidth%\" class=\"thmonthview\"><span style=\"color: $monthheadtxtcolor;\" class=\"content\">" . _CALFIFTHDAY . "</span></th>
		<th width=\"$tdwidth%\" class=\"thmonthview\"><span style=\"color: $monthheadtxtcolor;\" class=\"content\">" . _CALSIXTHDAY . "</span></th>
		<th width=\"$tdwidth%\" class=\"thmonthview\"><span style=\"color: $monthheadtxtcolor;\" class=\"content\">" . _CALSEVENTHDAY . "</span></th>
	</tr>";

    /**
     * *** Previous Greyed month days
     */
    While ($day_of_week < ($Day_of_First_Week + 1)) {
        if ($day_of_week == 1) {
            $content .= "\n<tr valign=\"top\">";
        } 
        $Tmp_Date = @mktime(0, 0, 0, $m, 1 - (($Day_of_First_Week + 1) - $day_of_week), $y);
        $Tmp_Day = Date("d", $Tmp_Date);
        $content .= "<td style=\"background-color: $monthshadedbgcolor;\" align=\"center\" height=\"$monthdayheigth\" class=\"tdmonthview2\"><span style=\"color: $monthshadedtextcolor;\" class=\"content\">$Tmp_Day</span></td>";
        $day_of_week += 1;
    } 
    $usedcount = 0;
    $cellcount = 0;
    /**
     * *** Build Current Month
     */
    for ($day = 1 ; $day <= $lastday ; $day++) {
        if ($day_of_week == 1) {
            $content .= "\n<tr valign=\"top\">";
        } 
        $xDate = @mktime(0, 0, 0, $m, $day, $y);
        $xday = getdate($xDate);
        if (($day == $Today_d) && ($m == $Today_m) && ($y == $Today_y)) {
            $bcol = $monthcurdaybgcolor;
            $tcol = $monthcurdaytxtcolor;
        } else if ($xday["weekday"] == "Sunday") {
            $bcol = $monthsundaybgcolor;
            $tcol = $monthsundaytxtcolor;
        } else {
            $bcol = $monthbgcolor;
            $tcol = $monthtextcolor;
        } 
        $content .= "\n<td height=\"$monthdayheigth\" style=\"background-color: $bcol;\" class=\"tdmonthview1\"><center><a href=\"" . CAL_MODULE_LINK . "&amp;m=$m&amp;d=$day&amp;y=$y&amp;op=day\"><span style=\"color: $tcol;\" class=\"content\"><b>$day</b></span></a></center>";
        /**
         */
        /**
         * *** SET UP DATA!!! ***
         */
        /**
         */
        /**
         * *** Reset Cell Array
         */
        $cellDate = @mktime (0, 0, 0, $m, $day, $y);
        for ($i = 0;$i <= $cellcount - 1;$i++) {
            $tmpEndDate_Array = explode("-", $cellArrayEndDate[$i]);
            $tmpEndDate = @mktime (0, 0, 0, $tmpEndDate_Array[1], $tmpEndDate_Array[2], $tmpEndDate_Array[0]);
            if ($tmpEndDate < $cellDate) {
                $cellArray[$i] = "FALSE";
            } 
        } 
        /**
         * *** Clean out Cell Array
         */
        if ($cellcount != 0) {
            $j = $cellcount;
            for ($i = $cellcount - 1;$i >= 0;$i--) {
                if ($cellArray[$i] == "FALSE") {
                    Array_pop($cellArray);
                    Array_pop($cellArrayTitle);
                    Array_pop($cellArrayEventDate);
                    Array_pop($cellArrayEndDate);
                    Array_pop($cellArrayBarColor);
                    Array_pop($cellArrayDesc);
                    $j--;
                } else {
                    break;
                } 
            } 
            $cellcount = $j;
        } 
        /**
         * *** Add neccessary additions to cellArray
         */
        if (isset($arr_startDate[$usedcount])) {
            while ((strtotime($arr_startDate[$usedcount]) <= strtotime("$y-$m-$day")) && ($usedcount <= $count)) {
                $added = "FALSE";
                /**
                 * *** First Try to find a spot in the cell for the event
                 */
                for ($i = 0;$i <= $cellcount - 1;$i++) {
                    if ($cellArray[$i] == "FALSE") {
                        /**
                         * *** Found spot in cellArray
                         */
                        $cellArray[$i] = $arr_eid[$usedcount];
                        $cellArrayTitle[$i] = $arr_title[$usedcount];
                        $cellArrayEventDate[$i] = $arr_startDate[$usedcount];
                        $cellArrayEndDate[$i] = $arr_endDate[$usedcount];
                        $cellArrayBarColor[$i] = $arr_categorie[$usedcount];
                        $cellArrayDesc[$i] = $arr_hometext[$usedcount];
                        $added = "TRUE";
                        break 1;
                    } 
                } 
                /**
                 * *** If all spots are taken in the current cellArray then add it to the end
                 */
                if ($added == "FALSE") {
                    $cellArray[] = $arr_eid[$usedcount];
                    $cellArrayTitle[] = $arr_title[$usedcount];
                    $cellArrayEventDate[] = $arr_startDate[$usedcount];
                    $cellArrayEndDate[] = $arr_endDate[$usedcount];
                    $cellArrayBarColor[] = $arr_categorie[$usedcount];
                    $cellArrayDesc[] = $arr_hometext[$usedcount];
                    $cellcount++;
                    /**
                     * *** Increase cell count since added to the end of the array
                     */
                } 
                $usedcount++;
                if (empty($arr_startDate[$usedcount])) break;
            } 
        } 
        /**
         */
        /**
         * *** INSERT DATA INTO CALENDAR!!! ***
         */
        /**
         */
        for ($i = 0; $i <= $cellcount - 1; $i++) {
            $categorie = calGetCurrentEventPoint($cellArrayBarColor[$i]);
            $popuptext = "";
            if (!calIsPrintView() && $calconf['ShowPopup']) {
                $categoriealt = calGetBarColorAlt($categorie);
                $poptitle = calValueToText($cellArrayTitle[$i]);
                $poptext = ($cellArrayDesc[$i]) ? calValueToText("$categoriealt:<br>$cellArrayDesc[$i]") : calValueToText($categoriealt);
                $cal_overlib->ol_capicon = "" . calGetBarImage("ball", $categorie) . "";
                $popuptext = $cal_overlib->vover($poptext, $poptitle);
            } 
            if (!$calconf['TextEvents']) {
                $content .= "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr $popuptext>";
            } 

            if ($cellArray[$i] != "FALSE") {
                $link = "" . CAL_MODULE_LINK . "&amp;op=view&amp;eid=$cellArray[$i]";
                $tmpEventDate_Array = explode("-", $cellArrayEventDate[$i]);
                $tmpEventDate = @mktime (0, 0, 0, $tmpEventDate_Array[1], $tmpEventDate_Array[2], $tmpEventDate_Array[0]);
                $tmpEndDate_Array = explode("-", $cellArrayEndDate[$i]);
                $tmpEndDate = @mktime (0, 0, 0, $tmpEndDate_Array[1], $tmpEndDate_Array[2], $tmpEndDate_Array[0]);
                if ($calconf['TextEvents']) {
                    $content .= "<img src=\"" . calGetBarImage("ball", $categorie) . "\" height=\"" . $picheight . "\" width=\"" . $picheight . "\" border=\"0\" hspace=\"2\" alt=\"\"><a href=\"$link\" $popuptext><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a><br>";
                } else {
                    if (($cellDate == $tmpEndDate) && ($tmpEndDate == $tmpEventDate)) {
                        $content .= "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\"  height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td><td  width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td align=\"right\"><img src=\"" . calGetBarImage("rightbarcap", $categorie) . "\" height=\"" . $picheight . "\" width=\"5\" border=\"0\"></td>";
                    } elseif ($cellDate == $tmpEventDate) {
                        $content .= "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td><td  width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                    } elseif ($cellDate == $tmpEndDate) {
                        $content .= "<td width=\"100%\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td><td valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("rightbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td>";
                    } else {
                        if ($day == 1) {
                            $content .= "<td height=\"" . $picheight . "\" valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("leftbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"10\" border=\"0\"></a></td><td width=99%  valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        } else {
                            $content .= "<td align=\"center\"  valign=\"top\"><a href=\"$link\"><img src=\"" . calGetBarImage("mainbar", $categorie) . "\" height=\"" . $picheight . "\" width=\"100%\" border=\"0\"><br><span class=\"tiny\">" . $cellArrayTitle[$i] . "</span></a></td>";
                        } 
                    }
                } 
            } else {
                if (!$calconf['TextEvents']) {
                    $content .= "<td width=\"100%\"><img src=\"" . CAL_IMAGE_PATH . "blankbar.gif\" height=\"" . $picheight . "\" border=0></td>";
                } 
            } 
            if (!$calconf['TextEvents']) {
                $content .= "</tr></table>";
            } 
        } 
        $cevents = 0;
        $onedayevents = ($calconf['TextEvents']) ? "" : "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">";
        $resultAPPT = sql_query("SELECT eid,title,hometext,startDate,endDate,startTime,endTime,categorie FROM " . CAL_TABLE_EVENTS . " 
		WHERE (startDate <= '$y-$m-$day' 
		AND endDate >= '$y-$m-$day' 
		AND alldayevent='0') 
		and (categorie in(" . calGetSqlEventpoints() . ")) 
		AND activ=1
		ORDER BY startTime, endTime ASC", $dbi);
        while (list($eid, $title, $hometext, $startDate, $endDate, $startTime, $endTime, $categorie) = sql_fetch_row($resultAPPT, $dbi)) {
            $cevents ++;
            $title = strip_tags($title); 
            $startTime = calGetTimeFormated($startTime);
            $endTime = ($startDate != $endDate) ? "" : "-" . calGetTimeFormated($endTime);
            $categorie = calGetCurrentEventPoint($categorie);
            $popuptext = "";
            if (!calIsPrintView() && $calconf['ShowPopup']) {
                $categoriealt = calGetBarColorAlt($categorie);
                $poptitle .= " - ";
                $poptitle .= calValueToText($title);
                $poptext = ($hometext) ? calValueToText("$categoriealt:<br>$hometext") : calValueToText($categoriealt);
                $cal_overlib->ol_capicon = "" . calGetBarImage("ball", $categorie) . "";
                $popuptext = $cal_overlib->vover($poptext, $poptitle);
            } 
            if ($calconf['TextEvents']) {
                $onedayevents .= "<a href=\"" . CAL_MODULE_LINK . "&amp;op=view&amp;eid=$eid\" $popuptext>";
                $onedayevents .= "<img src=\"" . calGetBarImage("ball", $categorie) . "\" height=\"" . $picheight . "\" width=\"" . $picheight . "\" border=\"0\" hspace=\"2\" alt=\"\">";
                $onedayevents .= "<span class=\"tiny\">" . $startTime . $endTime . "<br>$title</span></a><br>";
            } else {
                $onedayevents .= "<tr $popuptext valign=\"top\"><td width=\"" . $picheight . "\"><img src=\"" . calGetBarImage("ball", $categorie) . "\" height=\"" . $picheight . "\" width=\"" . $picheight . "\" border=\"0\" vspace=\"3\" alt=\"\"></td>";
                $onedayevents .= "<td><a href=\"" . CAL_MODULE_LINK . "&amp;op=view&amp;eid=$eid\">";
                $onedayevents .= "<span class=\"tiny\">" . $startTime . $endTime . "<br>" . calPrepareDisplay($title) . "</span></a></td></tr>";
            } 
        } 
        $onedayevents .= ($calconf['TextEvents']) ? "" : "</table>";
        if ($cevents) $content .= $onedayevents;

        $content .= "<br></td>";
        if ($day_of_week == 7) {
            $day_of_week = 0;
            $content .= "\n</tr>";
        } 
        $day_of_week += 1;
    } 
    /**
     * *** Next Greyed month days
     */
    $day = 1;
    While (($day_of_week <= 7) && ($day_of_week != 1)) {
        $content .= "<td style=\"background-color: $monthshadedbgcolor;\" align=\"center\" class=\"tdmonthview2\"><span style=\"color: $monthshadedtextcolor;\" class=\"content\">$day</span></td>";
        $day_of_week += 1;
        $day += 1;
    } 
    $content .= "\n</tr>\n</table><br>";
    $content .= "<div align=\"center\" style=\"width: ${tblwidth}%;\">";
    $content .= calBuildColorLegend("legend");
    $content .= "</div>";
    $content .= "</center>";
        $content .= "\n<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\">\n<tr>\n";
        $content .= "<td align=\"right\" style=\"white-space: nowrap;\"><br><span class=\"tiny\"><a href=\"http://www.pragmamx.org\" target=\"_blank\" class=\"tiny\" style=\"text-decoration: none; font-weight: lighter;\" title=\"KalenderMx v" . CAL_VERSION . " by shiba-design.de modified by Gothic-Online\"  onClick=\"window.open('http://www.gothic-online.de');\">&copy; &AElig;</a></span></td>\n";
        $content .= "</tr>\n</table>\n";


// / Der Blocktitel wird über die Sprachdatei des Kalenders gesteuert,
// / soll statt dessen die Einstellung des Adminmenüs verwendet werden,
// / einfach die folgenden Zeilen löschen oder auskommentieren
$blockfiletitle = _CALNAME;

function calOverlibDiv()
    {
        if (!defined("_Overlib_Div")) { // diese Konstante wird ab Mx2.2 automatisch definiert, wenn die Klasse vorhanden ist
            $folder = (@file_exists("includes/javascript/class.overlib.php")) ? "includes/javascript" : CAL_MODULE_PATH . "overlib";
            define("_Overlib_Div", 2);
            include_once($folder . "/class.overlib.php");
            echo "<div id=\"overDiv\" style=\"position:absolute; visibility: hidden; z-index: 1000; background: transparent;\"></div>\n";
            echo "<script language=\"javascript\" src=\"" . $folder . "/overlib.js\" type=\"text/javascript\">\n</script>\n";
            echo "<script language=\"javascript\" src=\"" . $folder . "/overlib_hideform.js\" type=\"text/javascript\">\n</script>\n";
        } 
    } 

?>