



var lc_strBannerID = '';
var strCurrentBannerID = '';

function onLcContentPageLoaded_realBannerChangeHandler()
{
    //alert(strCurrentBannerID);
    //alert(lc_strBannerID);
    try
    {
        if(strCurrentBannerID != lc_strBannerID)
        {


            if(lc_strBannerID.length > 0)
            {
                top.contentFrame.bannerFrame.document.getElementById('actionbannerdiv').innerHTML='<IFRAME NAME="actionbannerFrame" MARGINWIDTH="0" MARGINHEIGHT="0" SRC="http://www.innovationsmanagement.at/_lccms_/banners/' + lc_strBannerID + '/bannerinclude.htm" WIDTH="337" HEIGHT="376" 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.bannerFrame.document.getElementById('actionbannerdiv').innerHTML='<IFRAME NAME="actionbannerFrame" MARGINWIDTH="0" MARGINHEIGHT="0" SRC="http://www.innovationsmanagement.at/actionbannerFrame.htm" WIDTH="337" HEIGHT="376" 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);
        return;
    }
}

function onLcContentPageLoaded_bannerChangeHandler(strBannerID)
{
    lc_strBannerID = strBannerID;
    onLcContentPageLoaded_realBannerChangeHandler();
    //alert(top.menuFrame.document.getElementById('actionbannerdiv').innerHTML);
}


var lc_strImgUrl = '';

var lc_arMenuObject;
var lc_iMenuIndex;
var lc_strMenuName;

    if(typeof(displayMenu) == 'undefined')
    {
        var displayMenu = 'ger';

        var iPos = self.location.search.indexOf('?LANG=');
        if(iPos == -1)
        {
            iPos = self.location.search.indexOf('&LANG=');
        }

        if(iPos > -1)
        {
            displayMenu = self.location.search.substr(iPos + 6);
        }
        }


function onLcContentPageLoaded_userDefHandler(arMenuObject, iMenuIndex, strMenuName)
{
    lc_arMenuObject = arMenuObject;
    lc_iMenuIndex = iMenuIndex;
    lc_strMenuName = strMenuName;

    onLcContentPageLoaded_realUserDefHandler();
}

function onLcContentPageLoaded_realUserDefHandler()
{
    if(typeof(top.menutwoFrame.Menu_OnPageLoadHandler) == 'undefined' ||
            typeof(top.menutwoFrame.SetActiveItem) == 'undefined')
    {
        window.setTimeout('onLcContentPageLoaded_realUserDefHandler()', 250);
    }
    else
    {
        var arMenuObject = lc_arMenuObject;
        var iMenuIndex = lc_iMenuIndex;
        var strMenuName = lc_strMenuName;
        if(displayMenu == 'ger') displayMenun='deutsch'; else displayMenun='englisch';
        var iSub = 0;
        for(var i = 0; i < LCSiteMenus.length; i++)
        {
            if(LCSiteMenus[i][0] == 0 && LCSiteMenus[i][3].toLowerCase() == 'menü ' + displayMenun )
            {
                iSub = i + 1;
                break;
            }
        }
        if(strMenuName.toLowerCase() == 'menü ' + displayMenun)
        {
            try
            {
            if(iMenuIndex-iSub > 1)
            {


        if(top.topFrame.document.getElementById('deck').style.width=='500px'){top.topFrame.document.getElementById('deck').style.width='1px';}


            }

            else
                {
                    if(top.topFrame.document.getElementById('deck').style.width=='1px'){top.topFrame.document.getElementById('deck').style.width='500px';}

                }
            }
            catch(ex)
            {}
        }
        else
        {
        }
    }
}

function onLcContentPageLoaded_completeHandler(strActionImageUrl, strActionBannerNumber, strActionHeadlineText, strActionLongtextUrl, iMenuItemIndex, strMenuName, iMenuItemLevel)
{
    if(strMenuName == 'Menü Alt' || strMenuName == 'Menü Neu')
    {
        var iFirstLevelItemCount = 0;
        var iMenuStartPos = -1;

        for(var i = 0; i < LCSiteMenus.length; i++)
        {
            var smenu = LCSiteMenus[i];

            if(iMenuStartPos < 0)
            {
                if(smenu[0] == 0 && smenu[3] == strMenuName)
                {
                    iMenuStartPos = i + 1;
                }
            }
            else
            {
                if(smenu[0] == 0)
                {
                    break;
                }

                if(smenu[0] == 1)
                {
                    iFirstLevelItemCount++;
                }

                if(i - iMenuStartPos == iMenuItemIndex)
                {
                    break;
                }
            }
        }

        if(iFirstLevelItemCount < 1)
        {
            top.menuFrame.setActive(-1);
        }
        else
        {
            top.menuFrame.setActive(iFirstLevelItemCount);
        }
    }
    else
    {
        top.menuFrame.setActive(-1);
    }
}
