


var lc_strBannerID = '';
var strCurrentBannerID = '';

function onLcContentPageLoaded_realBannerChangeHandler()
{

    //alert(lc_strBannerID);
    try
    {
        if(strCurrentBannerID != lc_strBannerID)
        {


            if(lc_strBannerID.length > 0)
            {
                top.contentFrame.menuFrame.document.getElementById('actionbannerdiv').innerHTML='<IFRAME NAME="actionbannerFrame" MARGINWIDTH="0" MARGINHEIGHT="0" SRC="http://www.haartransplantation.at/_lccms_/banners/' + lc_strBannerID + '/bannerinclude.htm" WIDTH="446" HEIGHT="280" SCROLLING="No" NORESIZE FRAMEBORDER="0" HSPACE="0" VSPACE="0" ALIGN="left"></IFRAME>';
                //top.actionbannerFrame.location.replace('http://www.officecms.com/members/gemeindestenzen/_lccms_/banners/' + lc_strBannerID + '/bannerinclude.htm');
            }
            else
            {
                top.contentFrame.menuFrame.document.getElementById('actionbannerdiv').innerHTML='<IFRAME NAME="actionbannerFrame" MARGINWIDTH="0" MARGINHEIGHT="0" SRC="http://www.haartransplantation.at/actionbannerFrame1.htm" WIDTH="446" HEIGHT="280" SCROLLING="No" NORESIZE FRAMEBORDER="0" HSPACE="0" VSPACE="0" ALIGN="left"></IFRAME>';
                //top.actionbannerFrame.location.replace('http://www.officecms.com/members/gemeindestenzen/actionbannerFrame.htm');
            }


            strCurrentBannerID = lc_strBannerID;
        }
    }
    catch(ex)
    {
        window.setTimeout('onLcContentPageLoaded_realBannerChangeHandler()', 100);
        //alert(ex);
    }
}

function onLcContentPageLoaded_bannerChangeHandler(strBannerID)
{
    lc_strBannerID = strBannerID;
    onLcContentPageLoaded_realBannerChangeHandler();
    //alert(top.menuFrame.document.getElementById('actionbannerdiv').innerHTML);
}

function onLcContentPageLoaded_completeHandler(strActionImageUrl, strActionBannerNumber, strActionHeadlineText, strActionLongtextUrl, iMenuItemIndex, strMenuName, iMenuItemLevel,strAltText)
{
    /*
    var strNewText1 = '';
    var strNewText2 = '';

    for(var i = 0; i < LCSiteMenus.length; i++)
    {
        if(LCSiteMenus[i][0] == 0 && LCSiteMenus[i][3] == strMenuName)
        {
            i += 1 + iMenuItemIndex;

            var iNextLevelOfInterest = iMenuItemLevel;
            for(; i >= 0 && iNextLevelOfInterest > 0; i--)
            {
                if(LCSiteMenus[i][0] == 0)
                {
                    break;
                }

                if(LCSiteMenus[i][0] == iNextLevelOfInterest)
                {

                    var strText = LCSiteMenus[i][3].replace(/#/g, ' ');

                    if(LCSiteMenus[i][4].indexOf('_mihl_') > -1)
                    {
                        strText = LCLib_GetStringBetweenTags(LCSiteMenus[i][4], '_mihl_', '_mihl2_');
                        if(strText.length == 0)
                        {
                            strText = LCSiteMenus[i][3].replace(/#/g, ' ');
                        }
                    }

                    if(iNextLevelOfInterest == 1)
                    {
                        strNewText1 = strText;
                    }

                    if(strNewText2.length > 0)
                    {
                        strNewText2 = ' / ' + strNewText2;
                    }

                    strNewText2 = strText + strNewText2;

                    iNextLevelOfInterest--;
                }

            }

            break;
        }
    }

    lc_strHeadline1 = '<nobr>' + strNewText1 + '</nobr>';
    lc_strHeadline2 = '<nobr>' + strNewText2 + '</nobr>';

    setHeadlines();
        */
    try
    {
    var iFirstLevelItem = -1;
    var iSecondLevelItem = -1;

    if(strMenuName == 'Menü Fettabsaugung' || strMenuName == 'Menü Haartransplantation' || strMenuName == 'Menü Privat')
    {
        for(var i = 0; i < LCSiteMenus.length; i++)
        {
            if(LCSiteMenus[i][0] == 0 && LCSiteMenus[i][3] == strMenuName)
            {
                var j = i + iMenuItemIndex + 1;

                iFirstLevelItem = -1;
                var iTmp = j;

                for(; j >= 0; j--)
                {
                    if(LCSiteMenus[j][0] == 0)
                    {
                        break;
                    }

                    if(iMenuItemLevel > 1 && iSecondLevelItem == -1)
                    {
                        if(LCSiteMenus[j][0] == 1)
                        {
                            iSecondLevelItem = iTmp - j - 1;
                        }
                    }

                    if(LCSiteMenus[j][0] == 1)
                    {
                        iFirstLevelItem++;
                    }
                }

                break;
            }
        }
    }

    top.iFirstLevelItem = iFirstLevelItem;
    top.iSecondLevelItem = iSecondLevelItem;

    if(top.contentFrame.menuFrame.selectedMenu == iFirstLevelItem + 1)
    {
        top.contentFrame.menutwoFrame.Menu_OnPageLoadHandler(iSecondLevelItem);
    }

    top.contentFrame.menuFrame.selectMenu(iFirstLevelItem + 1);
    }
    catch(E)
    {
    }
}
