﻿function HideContent(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowContent(d,parentElement) {
if(d.length < 1) { return; }
var hoverDiv = document.getElementById(d);
hoverDiv.style.position = "absolute";
hoverDiv.style.left = window.event.clientX;
hoverDiv.style.top = window.event.clientY - 150;
hoverDiv.style.display = "block";
}
function ReverseContentDisplay(d) {

//if(d.length < 1) { return; }

if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}

function ShowReportsMenu (d)
{
    var menuDiv = document.getElementById(d);
    menuDiv.style.display = "block";
}
function HideReportsMenu (d)
{
    var menuDiv = document.getElementById(d);
    menuDiv.style.display = "none";
}
function ShowTip()
{
    var divToolTip = document.getElementById ('tooltip');
    var spanToolTip = document.getElementById ('reporttip');
    var imgToolTip = document.getElementById ('imgReportTip');
    var selReportList = document.getElementById ('report_list');
    var reportTip = selReportList.options[selReportList.options.selectedIndex].getAttribute('description');
    if (reportTip != '')
    {
        spanToolTip.innerHTML = reportTip;
        var thumbnailPath = selReportList.options[selReportList.options.selectedIndex].getAttribute('ThumbnailPath');
        if (thumbnailPath == '')
        {
            thumbnailPath = 'images/thumbnails/TAKSCampusSummaryRoster.jpg';
        }
        imgToolTip.src = thumbnailPath;
        divToolTip.style.display = 'block';
        divToolTip.style.width = imgToolTip.getAttribute('width') + 'px';
        
    }
}
function AdjustToolTipSize()
{
    var divToolTip = document.getElementById ('tooltip');
    var imgToolTip = document.getElementById ('imgReportTip');
    var reportTip = selReportList.options[selReportList.options.selectedIndex].getAttribute('description');
    if (reportTip != '')
    {
        spanToolTip.innerHTML = reportTip;
        var thumbnailPath = selReportList.options[selReportList.options.selectedIndex].getAttribute('ThumbnailPath');
        if (thumbnailPath == '')
        {
            thumbnailPath = 'images/thumbnails/TAKSCampusSummaryRoster.jpg';
        }
        imgToolTip.src = thumbnailPath;
        divToolTip.style.display = 'block';
        divToolTip.style.width = imgToolTip.getAttribute('width') + 'px';
        
    }
}
function HideTip()
{
    var divToolTip = document.getElementById ('tooltip');
    divToolTip.style.display = 'none';
}
