Source code

Back to the main page Back to the last page

<?xml version="1.0" encoding="UTF-8" ?>
<Module>
    <ModulePrefs     title="אירועי היום"
                    title_url="http://www.mouse.co.il/"
                    description="The Gadget presents today's events in Israel"
                    height="160"                    
                    scrolling="false"
                    author="Gal&#x26;Yuval"
                    screenshot="http://www.cs.tau.ac.il/~yuvalda/Events_Main.PNG"
                    thumbnail="http://www.cs.tau.ac.il/~yuvalda/mouseThumb.png"
                    author_email="galyuval@gmail.com" 
    >
        <Require feature="dynamic-height" />
        <Require feature="tabs"/>
    </ModulePrefs>
    <UserPref     name="test000"
                display_name="בחר אזור"
                default_value="1"
                datatype="enum" 
                publish="true" 
    >
        <EnumValue value="1" display_value="תל אביב" />  
        <EnumValue value="2" display_value="אזור המרכז" /> 
        <EnumValue value="3" display_value="חיפה והצפון" />   
        <EnumValue value="4" display_value="אזור הדרום" /> 
        <EnumValue value="5" display_value="ירושלים והסביבה" />
    </UserPref> 
    <UserPref name="selectedTab" datatype="hidden"/>
 
<Content type="html">
    <![CDATA[
<!--        ***************
            *   CSS       *
            ***************       -->
    <style type="text/css">
        .mainEventName    
        {
            font-size:10pt;
            direction: rtl; 
            width: 90px;
        }
        .mainEventCount    
        {
            font-size:10pt;
            direction: rtl; 
        }    
        .searchDivHidden    
        {
            display: none;
        }
        .mainStyle    
        {
            font-size:10pt; 
            padding:5px; 
            direction: rtl; 
            background-color: #FFFFCC;
        }
        .gadgetTableDiv
        {
            text-decoration: none;
            font-size:10pt;
            padding:5px;
            direction:rtl
        }
        .gadgetTableTitle
        {
            text-align:right;
            font-size:10pt;
            color: #F27F46;                
            text-decoration: underline;
        }
        .noDbFileTD
        {
            text-align:right; 
            font-size:10pt;
            color: red; 
            font-weight:bold;
            weight:bold;
        }
        .buttonTD
        {
            text-align:right; 
            font-size:10pt;
            width: 4%; 
            color: blue;
        }
        .buttonIcon
        {
            cursor: hand;
            cursor: pointer;
        }
        .buttonIconDisable
        {
            visibility: hidden;
        }
        .hourTD
        {
            color: black;
            text-align:center;
            font-size:10pt;                 
            width: 12%;
            background-color: #C4D4E3;
            padding: 2px;
        }
        .nameOrLocationTDSpecialEvents
        {
            text-align:right;
            font-size:10pt;
            width: 42%; 
            background-color: #D9E4ED;
            padding: 2px;                
        }
        .nameOrLocationTDChildren
        {
            text-align:right;
            font-size:10pt;
            width: 42%; 
            background-color: #FFE0E0;
            padding: 2px;                
        }
        .nameOrLocationTDParties
        {
            text-align:right;
            font-size:10pt;
            width: 42%; 
            background-color: #FFE0F8;
            padding: 2px;                
        }
        .nameOrLocationTDStage
        {
            text-align:right;
            font-size:10pt;
            width: 42%; 
            background-color: #E0FFFD;
            padding: 2px;                
        }
        .nameOrLocationTDMusic
        {
            text-align:right;
            font-size:10pt;
            width: 42%; 
            background-color: #E0FFE7;
            padding: 2px;                
        }
        .nameOrLocationTDExhibition
        {
            text-align:right;
            font-size:10pt;
            width: 42%; 
            background-color: #F6FFE0;
            padding: 2px;                
        }
        .nameOrLocationTDMovies
        {
            text-align:right;
            font-size:10pt;
            width: 42%; 
            background-color: #FFEBE0;
            padding: 2px;
        }
        .link
        {
            text-decoration: none;
        }
        .summaryDiv
        {
            text-align:right;
            font-size:10pt;
            background-color: #F1D3F5;
            padding: 3px;
        }
        .summaryTR    
        {
            text-align:right;
            font-size:10pt;
            display: none;
            visibility: hidden;
        }
        .summaryTRShow    
        {
            text-align:right;
            font-size:10pt;
            visibility: visible;
        }
        .addGadgetsLinks    
        {
            text-align: right;
            font-size:10pt;
            direction: rtl; 
            width: 30%;
        }
        .addGadgetsSpaceTD
        {
            width: 20%;
        }
    </style>
 
    <!--    ***************
            *  MAIN TAB   *
            ***************       -->
    <div id="main_tab">
    <div id="content_main" class="mainStyle" >
        <b>בחר אזור:</b>
        <table>
            <tr>
                <td>
                    <select id="areaName" name="areaName" onChange="updateValue()" >
                        <option value ="1">תל אביב</option>
                        <option value ="2">אזור המרכז</option>
                        <option value ="3">חיפה והצפון</option>
                        <option value ="4">אזור הדרום</option>
                        <option value ="5">ירושלים והסביבה</option>
                    </select>
                </td>                
            </tr>
        </table>
        <table>
            <tr>
                <td class="mainEventName">
                    אירועים מיוחדים                    
                </td>
                <td>
                    <div id="eventCountSpecialEvents" class="mainEventCount">0</div>
                </td>
                <td style="width: 40px"/>
                <td class="mainEventName">
                    מופעי ילדים
                </td>
                <td>
                    <div id="eventCountChildren" class="mainEventCount">0</div>
                </td>
            </tr>
            <tr>
                <td class="mainEventName">
                    מסיבות
                </td>
                <td>
                    <div id="eventCountParties" class="mainEventCount">0</div>
                </td>
                <td style="width: 40px"/>
                <td class="mainEventName">
                    הצגות תיאטרון
                </td>
                <td>
                    <div id="eventCountStage" class="mainEventCount">0</div>
                </td>
            </tr>
            <tr>
                <td class="mainEventName">
                    מופעי מוזיקה
                </td>
                <td>
                    <div id="eventCountMusic" class="mainEventCount">0</div>
                </td>
                <td style="width: 40px"/>
                <td class="mainEventName">
                    תערוכות
                </td>
                <td>
                    <div id="eventCountExhibition" class="mainEventCount">0</div>
                </td>
            </tr>
            <tr>
                <td class="mainEventName">
                    סרטים
                </td>
                <td>
                    <div id="eventCountMovies" class="mainEventCount">0</div>
                </td>
            </tr>
        </table>
    </div></div>
    <!--    ***************
            * SEARCH TAB  *
            ***************      
            *   title     *
            ***************    -->
    <div id="search_tab" class="searchDivHidden">
    <div id="content_search_title" class="mainStyle">
        <b>לביצוע החיפוש בחר אזור, תחום אירוע וטווח שעות מבוקש:</b>
        <table>
            <tr>
                <td>
                    <select id="area1" name="area1" >
                        <option value ="0">בחר אזור</option>
                        <option value ="1">תל אביב</option>
                        <option value ="2">אזור המרכז</option>
                        <option value ="3">חיפה והצפון</option>
                        <option value ="4">אזור הדרום</option>
                        <option value ="5">ירושלים והסביבה</option>
                    </select>
                </td>
                <td>
                    <select id="field" name="field" >
                        <option value ="0">בחר תחום</option>
                        <option value ="1">אירועים מיוחדים</option>
                        <option value ="2">מופעי ילדים</option>
                        <option value ="3">מסיבות</option>
                        <option value ="4">הצגות תיאטרון</option>
                        <option value ="5">מופעי מוזיקה</option>
                        <option value ="6">תערוכות</option>
                        <option value ="7">סרטים</option>
                    </select>
                </td>
            </tr>
            <tr>
                <td colspan='2'>
                    <select id="hour" name="hour" >
                        <option value ="1">כל היום</option>
                        <option value ="2">בוקר</option>
                        <option value ="3">צהריים</option>
                        <option value ="4">אחה"צ</option>
                        <option value ="5">ערב</option>
                        <option value ="6">לילה</option>
                    </select>
                    <input type="button" name="butSearch" name="butSearch" value="חיפוש" onclick="updateSearch()">
                </td>
            </tr>
        </table>
    </div>
    <!--    ******************
            *  SEARCH TAB    *
            ******************    
            * search results *
            ******************    -->
    <div id="content_search_results" class="gadgetTableDiv"></div>
    </div>
    <!--    *******************
            * ADD GADGETS TAB *
            *******************   -->
    <div id="add_gadgets_tab">
    <div id="content_add_gadgets" class="mainStyle" >
        <b>לחץ על הגאדג'ט שברצונך להוסיף לדף שלך:</b>
        <table>
            <tr/>
            <tr>
                <td class="addGadgetsSpaceTD"/>
                <td class="addGadgetsLinks">
                    <a href="http://www.google.com/ig/adde?synd=open&source=ggyp&moduleurl=hosting.gmodules.com/ig/gadgets/file/101114940008676797387/events2.xml" target="_blank">
                        אירועים מיוחדים
                    </a>
                </td>
                <td class="addGadgetsSpaceTD"/>
                <td class="addGadgetsLinks">
                    <a href="http://www.google.com/ig/adde?synd=open&source=ggyp&moduleurl=hosting.gmodules.com/ig/gadgets/file/101114940008676797387/events3.xml" target="_blank">
                        מופעי ילדים
                    </a>
                </td>                
            </tr>
            <tr>
                <td class="addGadgetsSpaceTD"/>
                <td class="addGadgetsLinks">
                    <a href="http://www.google.com/ig/adde?synd=open&source=ggyp&moduleurl=hosting.gmodules.com/ig/gadgets/file/101114940008676797387/events6.xml" target="_blank">
                        מסיבות
                    </a>
                </td>                
                <td class="addGadgetsSpaceTD"/>
                <td class="addGadgetsLinks">
                    <a href="http://www.google.com/ig/adde?synd=open&source=ggyp&moduleurl=hosting.gmodules.com/ig/gadgets/file/101114940008676797387/events4.xml" target="_blank">
                        הצגות תיאטרון
                    </a>
                </td>                
            </tr>
            <tr>
                <td class="addGadgetsSpaceTD"/>
                <td class="addGadgetsLinks">
                    <a href="http://www.google.com/ig/adde?synd=open&source=ggyp&moduleurl=hosting.gmodules.com/ig/gadgets/file/101114940008676797387/events.xml" target="_blank">
                        מופעי מוזיקה
                    </a>                
                </td>
                <td class="addGadgetsSpaceTD"/>
                <td class="addGadgetsLinks">
                    <a href="http://www.google.com/ig/adde?synd=open&source=ggyp&moduleurl=hosting.gmodules.com/ig/gadgets/file/101114940008676797387/events5.xml" target="_blank">
                        תערוכות
                    </a>
                </td>
            </tr>
            <tr>    
                <td class="addGadgetsSpaceTD"/>
                <td class="addGadgetsLinks">
                    <a href="http://www.google.com/ig/adde?synd=open&source=ggyp&moduleurl=hosting.gmodules.com/ig/gadgets/file/101114940008676797387/events7.xml" target="_blank">
                        סרטים
                    </a>
                </td>
            </tr>
            <tr/><tr/><tr/><tr/>
            <tr/><tr/><tr/><tr/>
        </table>
    </div></div>
<!--        ***************      
            *   SCRIPT    *
            ***************    -->
 
 <script type="text/javascript">
 
     /* *******************
        * GLOBAL VERIABLES   *
        *******************      */
 
    var tabs = new _IG_Tabs(__MODULE_ID__, "ראשי");
    tabs.alignTabs("right", 10);
    var prefs = new _IG_Prefs();
    var myareaPref = prefs.getString("test000");
 
    // hebrew area names Array
    var areaHeNameArray     = new Array("תל אביב", "אזור המרכז", "חיפה והצפון", "אזור הדרום", "ירושלים והסביבה");
    // english area names Array
    var areaEnNameArray     = new Array("telAviv","merkaz","haifaNorth","south","jerusalem");
    // hebrew field names Array
    var fieldHeNameArray     = new Array("אירועים מיוחדים","מופעי ילדים","מסיבות","הצגות תיאטרון","מופעי מוזיקה","תערוכות","סרטים");
    // english field names Array
    var fieldEnNameArray     = new Array("SpecialEvents","Children","Parties","Stage","Music","Exhibition","Movies");
    // title name phrase
    var titleNameOfEvent     = new Array("שם האירוע","שם המופע","שם המסיבה","שם ההצגה","שם המופע","שם התערוכה","שם הסרט");
 
    // arrays that keeps the time range for search
    var searchTimeRangeAllDay         = new Array("all","all","all","all","all");    //            All day
    var searchTimeRangeMorning         = new Array("07","08","09","10","11");        //0700-1100    Morning
    var searchTimeRangeNoon         = new Array("11","12","13","14","15");        //1100-1500    Noon
    var searchTimeRangeAfternoon     = new Array("15","16","17","18","18");        //1500-1600    Afternoon
    var searchTimeRangeEvening         = new Array("19","20","21","21","21");        //1900-2100    Evening
    var searchTimeRangeNight         = new Array("21","22","23","00","01");        //2100-0100    Night
 
    var isFirstLoad  = true;
    var searchFieldNumber;
    var searchArea;    
    var searchHour;
 
    var areaEnName = "";
    var searchEnArea;
    var searchEnField;
    var searchTimeRangeArray;
    var searchTimeAllRanges = new Array(searchTimeRangeAllDay, searchTimeRangeMorning, searchTimeRangeNoon, searchTimeRangeAfternoon, searchTimeRangeEvening, searchTimeRangeNight);//     = new Array("all","all","all","all","all");
    var html2 = ""; 
    var items = ""; // to be filled with responseText from mouse.co.il
 
    // images
    var img_greyPlus =new Image();     img_greyPlus = "http://www.cs.tau.ac.il/~yuvalda/greyPlus.png";
    var img_redPlus =new Image();    img_redPlus = "http://www.cs.tau.ac.il/~yuvalda/redPlus.png";
    var img_greyMinus =new Image();    img_greyMinus = "http://www.cs.tau.ac.il/~yuvalda/greyMinus.png";
    var img_redMinus =new Image();    img_redMinus = "http://www.cs.tau.ac.il/~yuvalda/redMinus.png";
    /*    *******************    */
 
    /*     Gets and displays the publisher gadget's local test000 userpref. New userpref value is not published
        unless user invokes updateMsg() by selecting differnt value from the combo-box.                */
 
    _gel("areaName").value = myareaPref;
    updateValue();
    _IG_RegisterOnloadHandler(init);
 
     /* ***************
        *   FUNCTIONS    *
        ***************     */
 
    // updates the hebrew and english names from the area chosen in the main gadget          
    function updateName()
    {   
        areaHeName = areaHeNameArray[myareaPref-1];
        areaEnName = areaEnNameArray[myareaPref-1];            
    }
 
    // add tabs to gadget
    function init(){
        tabs.addTab("הוספת גאדג'טים", "add_gadgets_tab", updateHeightTo160);
        tabs.addTab("חיפוש", "search_tab", updateSearchTab);
        tabs.addTab("ראשי", "main_tab", updateValue);        
        tabs.setSelectedTab(2);
    }
 
    // sets the height of the "add gadgets" tab to 160px
    function updateHeightTo160() {
        _IG_AdjustIFrameHeight(160);
        _IG_AdjustIFrameHeight(160);
    }
 
    /*     This publisher gadget updates the value for the test000 
        userpref when users choose an area in the combo-box.    */
    function updateValue() {
        var newMsg = _gel("areaName").value;
        prefs.set("test000", newMsg);
        myareaPref = prefs.getString("test000");
        updateName();
        for (i=0 ; i < fieldEnNameArray.length ; i++)
        {
            fetchData(fieldEnNameArray[i]);    
        }    
        _IG_AdjustIFrameHeight();
        _IG_AdjustIFrameHeight();        
    }
 
    // fills the number of events for the fields on the "main" tab
    function fetchData(field){
        var dbNameCount = "http://www.cs.tau.ac.il/~yuvalda/files/" + areaEnName + field + "Count.txt";
        var eventId = "eventCount" + field;            
        _IG_FetchContent(dbNameCount, function (responseText) {
                if (responseText.length < 200)
                {
                    _gel(eventId).innerHTML = responseText.substr(0,3);
                }
                else
                {
                    _gel(eventId).innerHTML = "0";
                }
            }
        );
    }        
 
    // show\hide summary of event when user presses the summary icon
    function showSum(elemId, movieFlag){   
        var idRow = "row"+elemId; 
        if (movieFlag)
        {
            elemId -= 2;
        }    
        else        
        {
            elemId -= 5;
        }
        var idBut = "but"+elemId;  
        if(document.getElementById(idRow).className == 'summaryTR')
        {   
            document.getElementById(idRow).className = 'summaryTRShow';  
            document.getElementById(idBut).src = img_greyMinus; 
            /*if (!movieFlag)
            {*/
                _IG_AdjustIFrameHeight(); 
                _IG_AdjustIFrameHeight();
            //}
        }    
        else
        {
            document.getElementById(idRow).className = 'summaryTR';  
            document.getElementById(idBut).src = img_greyPlus;
            /*if (!movieFlag)
            {*/
                _IG_AdjustIFrameHeight();
                _IG_AdjustIFrameHeight();
            //}
        }     
    }
 
    // onMouseOver/Out functions for changing the color of the "Plus" icon
    function chgImgMouseOn(elemId) {
        var idBut = "but"+elemId;
        if (document.getElementById(idBut).src == img_greyPlus)
        {
            document.getElementById(idBut).src = img_redPlus;        
        }
        else
        {
            document.getElementById(idBut).src = img_redMinus;
        }
    }
 
    function chgImgMouseOut(elemId) {
        var idBut = "but"+elemId;
        if (document.getElementById(idBut).src == img_redPlus)
        {
            document.getElementById(idBut).src = img_greyPlus;        
        }
        if (document.getElementById(idBut).src == img_redMinus)
        {
            document.getElementById(idBut).src = img_greyMinus;        
        }                        
    }
 
    // adjusts the frame height
    function updateSearchTab() { 
        _gel("area1").value = myareaPref;
        if (isFirstLoad)
        {
            _IG_AdjustIFrameHeight(160); 
            _IG_AdjustIFrameHeight(160);            
        }
        else
        {
            updateSearch();
            _IG_AdjustIFrameHeight();
            _IG_AdjustIFrameHeight();
        }
    }
 
    // resets the results table
    function resetData() {
        _gel('content_search_results').innerHTML = "<label class='noDbFileTD'>לא הוגדרו מספיק פרמטרים לחיפוש</label>";
        _IG_AdjustIFrameHeight(160);
        _IG_AdjustIFrameHeight(160);
    }
 
    function arrayContains(Array, element){
        for (var i = 0; i < Array.length; i++)
        {
            if (Array[i] == element)
            {
                return true;
            }
        }
        return false;
    };
 
    // builder for 'regular' events (all except movies)
    function tableBuilder()
    {    
        var counter = 0;
        for (var i = 0; i < items.length-1 ; i++)    // Append substrings to html.  
        {
            if (searchTimeRangeArray[0] != "all")
            {
                if ((i%6) == 0 && !arrayContains(searchTimeRangeArray,items[i].substr(0,2)))                                 
                {
                    i += 5;
                    continue;
                }
            }            
            if (i%6 == 0)                            // button and hour TD
            {
                counter++;
                var elem = i+5;
                var    buttonClass    = "buttonIcon";    
                if (items[i+5] == "No Data For This Event")
                {
                    buttonClass    = "buttonIconDisable";
                }                
                html2 += "<tr><td id='buttonTD' class='"+buttonClass+"' onMouseOver='chgImgMouseOn("+i+")' onMouseOut='chgImgMouseOut("+i+")'>";   
                html2 += "<img src='"+img_greyPlus+"' id='but"+i+"' class='buttonIcon' alt='תקציר' onclick='showSum("+elem+", false)'/></td>"
                if (searchFieldNumber != 6)
                {
                    html2 += "<td id='hourTD' class='hourTD'>" + items[i] + "</td>";   
                }
            }  
            else if (i%2 == 0)                        // name or location TD
            {       
                html2 += "<td id='nameOrLocationTD' class='nameOrLocationTD" + searchEnField + "'>"
                html2 += "<a href=" + items[i] + " target='_blank' class='link'>" + items[i-1]+"</a></td>";    
            }     
            else if((i+1)%6 == 0)                    // end of row and summary TD
            {             
                html2 += "</tr>";                    // end of row 
                var sumId = "row"+i;   
                html2 += "<tr id="+sumId+" class='summaryTR'>"  //row for the summary
                html2 += "<td/><td colspan='3' class='summaryDiv'>"
                html2 += items[i] + "</td></tr>";                 
            }     
        }    
        html2 += "</table>";
        if (counter == 0)
        {
            html2 = "<label class='noDbFileTD'>לא נמצאו אירועים באזור, בתחום ובטווח השעות המבוקשים</label>";            
        }
    }
 
    // table builder for movies
    function tableBuilderMovies()
    {  
        var counter = 0;
        for (var i = 0; i < items.length-1 ; i++) {    // Append substrings to html.
            if ((i%3) == 0)
            {
                counter++;
                var elem = i+2;
                var    buttonClass    = "buttonIcon";    
                if (items[i+5] == "No Data For This Event")
                {
                    buttonClass    = "buttonIconDisable";
                }
                html2 += "<tr><td id='buttonTD' class='"+buttonClass+"' onMouseOver='chgImgMouseOn("+i+")' onMouseOut='chgImgMouseOut("+i+")'>";   
                html2 += "<img src='"+img_greyPlus + "' id='but"+i+"' class='buttonIcon' alt='תקציר' onclick='showSum("+elem+", true)'/></td>"                                                
                html2 += "<td class='nameOrLocationTDMovies'>";
                html2 += "<a href=" + items[i+1] + " target='_blank' class='link'>";
                html2 += items[i] + "</a></td></tr>";                        
            }
            else if((i+1)%3 == 0)
            {
                var sumId = "row"+i;
                html2 += "<tr id="+sumId+" class='summaryTR'><td/><td colspan='3' class='summaryDiv'>";
                html2 += items[i] + "</td></tr>";                
            }
        }
        html2 += "</table>";
        if (counter == 0)
        {
            html2 = "<label class='noDbFileTD'>לא נמצאו אירועים באזור, בתחום ובטווח השעות המבוקשים</label>";            
        }
    }
 
    // titles builder for 'regular' events (all except movies and exhibitions
    function titleBuilder()
    {
        html2 += "<td style='width: 4%'></td>";    
        html2 += "<td style='width: 12%'>שעה</td>"; 
        html2 += "<td style='width: 42%'>"+titleNameOfEvent[searchFieldNumber-1]+"</td>";
        html2 += "<td style='width: 42%'>מקום</td ></tr>";
    }
 
    // title builder for movies
    function titleBuilderMovies()
    {
        html2 += "<td style='width: 4%'></td>";    
        html2 += "<td style='width: 96%'>"+titleNameOfEvent[searchFieldNumber-1]+"</td></tr>";                
    }                       
 
    // title builder for exhibitions
    function titleBuilderExhib()
    {                 
        html2 += "<td style='width: 4%'></td>";    
        html2 += "<td style='width: 48%'>"+titleNameOfEvent[searchFieldNumber-1]+"</td>";
        html2 += "<td style='width: 48%'>מקום</td ></tr>";
    }
 
    // build the events table according to the chosen area
    function fillData()
    {  
        if (searchEnArea == null || searchEnField == null)
        {
            // if one of the combo-boxes isn't chosen - reset the data shown 
            resetData();
        }
        else
        { 
            var dbName = "http://www.cs.tau.ac.il/~yuvalda/files/"+searchEnArea+searchEnField+"Table.txt";  
            _IG_FetchContent(dbName, function (responseText)         
            {
                // build the titles for the table
                html2 = "";
                html2 += "<table><tr id='gadgetTableTitle' class='gadgetTableTitle'>";
                if (searchFieldNumber < 6)            //the user is not searching for exhibitions or movies
                {
                    titleBuilder();                 //use the normal titles format
                }
                else if (searchFieldNumber == 6)    //the user is searching for exhibitions
                {
                    titleBuilderExhib();            //use the exhibitions titles format
                }
                else                                 //the user is searching for movies
                {
                    titleBuilderMovies();            //use the movies titles format
                }
 
                // Use the split function to extract substrings separated by $^$ delimiters.  
                items = responseText.split("$^$"); 
 
                // in case no DB file exist - items[0] == page not found message (404), hence > 200 characters
                if (items[0].length > 200)
                {  
                    html2 += "<tr><td/><td id='noDbFileTD' class='noDbFileTD' colspan='3'>אין אירועים רלוונטים באתר</td ></tr>"; 
                }   
 
                // build the events table 
                else 
                { 
                    if (searchFieldNumber < 7)        //the user is not searching for movies
                    {
                        tableBuilder();             //use the normal events table format (including exhibitions)
                    }
                    else 
                    {
                        tableBuilderMovies();        //use the movies events table format
                    }
                }      
 
                // Output html in div.  
                _gel('content_search_results').innerHTML = html2; 
                _IG_AdjustIFrameHeight();
                _IG_AdjustIFrameHeight();
            }); 
        }        
    } 
 
    // calculate all search parameters asked by the user and sets up a new search
    function updateSearch(){
        isFirstLoad = false;
        searchArea = document.getElementById('area1').value;
        searchFieldNumber = document.getElementById('field').value;
        searchHour = document.getElementById('hour').value;
        if (searchArea == "0")                    // search area. 0 : area hasn't been chosen
        {
            searchEnArea = null;
        }
        else
        {
            searchEnArea = areaEnNameArray[searchArea-1];
        }    
 
        if (searchFieldNumber == "0")            // search field.  0 : field hasn't been chosen
        {
            searchEnField = null;
        }
        else 
        {
            searchEnField = fieldEnNameArray[searchFieldNumber-1];
        }
 
        searchTimeRangeArray = searchTimeAllRanges[searchHour-1];
        fillData();        
    }
 
    </script>
    </div>
 ]]>
 </Content>
</Module>

Back to the main page Back to the last page

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License