var lc_strBannerID = '';
var strCurrentBannerID = '';

function onLcContentPageLoaded_realBannerChangeHandler()
{
    //alert(strCurrentBannerID);
    //alert(lc_strBannerID);
    try
    {
      if(strCurrentBannerID != lc_strBannerID)
      {
          //alert(top.contentFrame);
          //alert(top.contentFrame.actionbannerFrame);
          //alert(top.contentFrame.actionbannerFrame.actionbannerFrame1);
        if(lc_strBannerID.length > 0)
        {
            top.contentFrame.actionbannerFrame.actionbannerFrame1.location.href = 'http://www.alpenhotel-ensmann.at/_lccms_/banners/' + lc_strBannerID + '/bannerinclude.htm';
        }
        else
        {
            top.contentFrame.actionbannerFrame.actionbannerFrame1.location.href = 'http://www.alpenhotel-ensmann.at/actionbannerFrame1.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)
{

    lc_iMenuItemIndex=iMenuItemIndex;
    lc_strMenuName=strMenuName;
    if(typeof(top.contentFrame.SetActiveItem)!='undefined' && typeof(top.contentFrame.Menu_OnPageLoadHandler)!='undefined')
    {
        setAct();
  }
  else
      window.setTimeout('setAct()',300);

}

function setAct()
{
        try
    {
    var iFirstLevelItem = -1;

    if(lc_strMenuName == 'Menü Deutsch' || lc_strMenuName == 'Menü Englisch')
    {

iFirstLevelItem=lc_iMenuItemIndex;
    }

    top.iFirstLevelItem = iFirstLevelItem;
    top.contentFrame.Menu_OnPageLoadHandler(top.iFirstLevelItem);

//    top.menuFrame.selectMenu(iFirstLevelItem + 1);
    }
    catch(E)
    {
    }
}

