﻿var menuHide = null;
var timeout = 100;
var menuId = '';

function SetHoverEvents(hoverId)
{
    $('#'+hoverId).mouseover(function(){
        CancelHideTimeout();
    });
    $('#'+hoverId).mouseout(function(){
        HideTimeout();
    });
}
function CancelHideTimeout()
{
    if(menuHide)
    {
        window.clearTimeout(menuHide);
        menuHide = null;
    }
}
function HideTimeout()
{
    menuHide = window.setTimeout(HideMenu, timeout);
}
function HideMenu()
{
    if(menuId!='')
    {
        //$('#'+menuId).hoverFlow('mouseout').slideUp('slow');
        $('#'+menuId).hoverFlow('mouseout').hide();
        CancelHideTimeout();
    }                    
}
function ShowMenu()
{   
    if(menuId!='')
    {
        //$('#'+menuId).hoverFlow('mouseover').slideDown('slow');
        $('#'+menuId).hoverFlow('mouseover').show();
    }
}
function SetCorrectHeights (container1, container2)
{
    var div1 = document.getElementById(container1);
    var div2 = document.getElementById(container2);
    
    if(div1 && div2)
    {
        var div1Height = div1.offsetHeight;
        var div2Height = div2.offsetHeight;
        
        if(div1Height > div2Height)
        {
            div2Height = div1Height;
        }
        else
        {
            div1Height = div2Height;
        }
        
        div1.style.height = div1Height+'px';
        div2.style.height = div2Height+'px';
    }
}

function PartnerInfo()
{
    this.Id = -1;
    this.Description = '';
}
