

function showScreeningDetails(sid)
{
    // get the detail object
    detObj = document.getElementById('moreDetails_'+sid);
    if(detObj == null) { return true; }

    // find the details pane & insert the correct details
    screeningPane = document.getElementById('details-pane');
    screeningPane.innerHTML = detObj.innerHTML;

    //this var should be set to the value of the "classes" property for the wide screening
    var baseScreeningClass = 'wide-screening';

    // get a list of the screenings for doing the mouseover
    screeningTable = document.getElementById('wide-screening-table');
    screeningList = screeningTable.getElementsByTagName('td');
    if(screeningList.length <=1) { return true; }

    for(i=0; i<screeningList.length; i++)
    {
        var classes = screeningList[i].className;
        if(classes.indexOf(baseScreeningClass) >=0)
        {
            if (screeningList[i].id != ('wscreening_'+sid))
            {
                screeningList[i].className = baseScreeningClass + ' white-bg';
            }
            else
            {
                screeningList[i].className = baseScreeningClass + ' screening-mousedover-bg';
            }
        }
    }
}

function toggleDisplay()
{

    // step through the screening TDs
    screeningTable = document.getElementById('wide-screening-table');
    screeningList = screeningTable.getElementsByTagName('td');
    if(screeningList.length <=1) { return true; }

    for(i=0; i<screeningList.length; i++)
    {
        var classes = screeningList[i].className;
        if(classes.indexOf('wide-screening') >=0)
        {
            var divs = screeningList[i].getElementsByTagName('div');
            for ( j=0; j < divs.length; j++ ) {
                if ( divs[j].className.indexOf('hidden-screening-details') >= 0 ) {

                    // select the right screening
                    screeningList[i].className = screeningList[i].className + ' screening-mousedover-bg';

                    // find the details pane & insert the correct details
                    contObj = document.getElementById('wide-screening-details');
                    detObj = document.getElementById('details-pane');
                    contObj.className += ' details-mousedover-bg';
                    detObj.innerHTML = divs[j].innerHTML;

                    // we're done
                    return;
                }
            }

        }
    }

    // if we got here, we have no screenings, so set the background to white
    contObj = document.getElementById('wide-screening-details');
    contObj.style.display = "none";
}

