var lc_strImgUrl = '';

function onLcContentPageLoaded_realImageChangeHandler()
{
    var strImgUrl = lc_strImgUrl;

    try
    {
        if(top.logoFrame){top.logoFrame.document.getElementById('actionimage').src=strImgUrl; } else { top.contentFrame.logoFrame.document.getElementById('actionimage').src=strImgUrl; }
    }
    catch(ex)
    {
        window.setTimeout('onLcContentPageLoaded_realImageChangeHandler()', 100);
        return;
    }
}

function onLcContentPageLoaded_imageChangeHandler(strImgUrl)
{
    lc_strImgUrl = strImgUrl;
    onLcContentPageLoaded_realImageChangeHandler();
}

function setActiveMenu(iIndex, iTry)
{
    if(typeof(iTry) == 'undefined')
    {
        iTry = 1;
    }

    try
    {
        top.menuFrame.Menu_OnPageLoadHandler(iIndex);
    }
    catch(E)
    {
        if(iTry < 10)
        {
            window.setTimeout('setActiveMenu(' + iIndex + ', ' + (iTry + 1) + ')', 250);
        }
    }
}
var strCurActionBanner = '';

function setActionBanner(strBannerNumber)
{
    try
    {
        if(top.bannerFrame)
        {
            if(strBannerNumber.length > 0)
            {
                window.open('http://www.lilienapotheke.at/_lccms_/banners/' + strBannerNumber + '/bannerinclude.htm', 'bannerFrame');
            }
            else
            {
                window.open('http://www.lilienapotheke.at/bannerFrame.htm', 'bannerFrame');
            }
        }
        else
        {
            window.setTimeout('setActionBanner("' + strBannerNumber + '");', 250);
        }
    }
    catch(E)
    {
        window.setTimeout('setActionBanner("' + strBannerNumber + '");', 250);
    }
}

function onLcContentPageLoaded_completeHandler(strActionImageUrl, strActionBannerNumber, strActionHeadlineText, strActionLongtextUrl, iMenuItemIndex, strMenuName, iMenuItemLevel,strAltText)
{

    if(strActionBannerNumber != strCurActionBanner)
    {
        strCurActionBanner = strActionBannerNumber;
        setActionBanner(strActionBannerNumber);
    }

    var iIndex = -1;

    if(strMenuName == 'Menü Deutsch' || strMenuName == 'Menü Englisch')
    {
        iIndex = iMenuItemIndex;
    }

    setActiveMenu(iIndex);


}

