function setMenuTop(iIndex, iTry)
{
	if(typeof(iTry) == 'undefined')
	{
		iTry = 1;
	}
	
	try
	{
		top.menuFrame.Menu_OnPageLoadHandler(iIndex);
	}
	catch(E)
	{
		if(iTry < 10)
		{
			window.setTimeout('setMenuTop(' + iIndex + ', ' + (iTry + 1) + ');', 250);
		}
	}
}

function setMenuLeft(iIndex, iTry)
{
	if(typeof(iTry) == 'undefined')
	{
		iTry = 1;
	}
	
	try
	{
		top.contentFrame.menuLeftFrame.setMenu(iIndex);
	}
	catch(E)
	{
		if(iTry < 10)
		{
			window.setTimeout('setMenuLeft(' + iIndex + ', ' + (iTry + 1) + ');', 250);
		}
	}
}

function setHeadline(strHeadline, iTry)
{
	if(typeof(iTry) == 'undefined')
	{
		iTry = 1;
	}
	
	try
	{
		top.contentFrame.actionTextFrame.document.getElementById('actiontext').innerHTML = strHeadline;
	}
	catch(E)
	{
		if(iTry < 10)
		{
			window.setTimeout('setHeadline("' + strHeadline + '", ' + (iTry + 1) + ');', 250);
		}
	}
}

function onLcContentPageLoaded_completeHandler(strActionImageUrl, strActionBannerNumber, strActionHeadlineText, strActionLongtextUrl, iMenuItemIndex, strMenuName, iMenuItemLevel)
{
	var iMenuTop = -1;
	var iMenuLeft = -1;	
	
	if(strMenuName == 'Menü Deutsch' || strMenuName == 'Menü Englisch')
	{
		iMenuTop = iMenuItemIndex;
	}	
	else if(strMenuName == 'Menü links Deutsch' || strMenuName == 'Menü links Englisch')
	{
		iMenuLeft = iMenuItemIndex;
	}
	
	var strActionText = '';	
	
	var bIsStartPage = ((strMenuName == 'Menü Deutsch' || strMenuName == 'Menü Englisch') && iMenuItemIndex == 0);
	
	if(!bIsStartPage)
	{
		for(var i = 0; i < LCSiteMenus.length; i++)
		{
			if(LCSiteMenus[i][0] == 0 && LCSiteMenus[i][3] == strMenuName)
			{
				var iCurLevelOfInterest = iMenuItemLevel;
				
				for(var j = i + 1 + iMenuItemIndex; j > i && iCurLevelOfInterest > 0; j--)
				{
					if(LCSiteMenus[j][0] == iCurLevelOfInterest)
					{
						if(strActionText.length > 0)
						{
							strActionText = '&nbsp;&gt;&nbsp;' + strActionText;
						}
						
						var strURL = LCSiteMenus[j][2];
						if(strURL.indexOf('?') > -1)
						{
							strURL += '&MID=' + LCSiteMenus[j][1];
						}
						
						strActionText = '<a href="' + strURL + '" target="bodyFrame">' + LCSiteMenus[j][3] + '</a>' + strActionText;
						
						iCurLevelOfInterest--;
					}
				}
				
				break;
			}
		}
	}
	
	setHeadline(strActionText);
	
	setMenuTop(iMenuTop);
	setMenuLeft(iMenuLeft);
	
	if(bIsStartPage)
	{
		top.contentFrame.document.getElementById('startextra').style.display = 'block';
		top.contentFrame.document.getElementById('bodyFrame').style.width = '592px';
	}
	else	
	{
		top.contentFrame.document.getElementById('startextra').style.display = 'none';
		top.contentFrame.document.getElementById('bodyFrame').style.width = '765px';
	}
}
