
	var arImageURL = new Array();
	var arImageOBJ = new Array();
	var arAllNodes = new Array();
	
	/*
		checks if the given property exists
	*/
	function IsDefined(pProperty)
	{
		if(pProperty + '' == 'undefined')
			return false;
		if(pProperty == null)
			return false;
		return true;
	}
arImageURL[1] = new Array();
		arImageURL[1]['url'] = '/city_data/images/4/6/12664/orig_1x1.gif';
		arImageURL[1]['width'] = '1';
		arImageURL[1]['height'] = '1';
		arImageURL[2] = new Array();
		arImageURL[2]['url'] = '/city_data/images/4/6/12664/orig_1x1.gif';
		arImageURL[2]['width'] = '1';
		arImageURL[2]['height'] = '1';
		arImageURL[3] = new Array();
		arImageURL[3]['url'] = '/city_data/images/4/6/12664/orig_1x1.gif';
		arImageURL[3]['width'] = '1';
		arImageURL[3]['height'] = '1';
		arImageURL[4] = new Array();
		arImageURL[4]['url'] = '/city_data/images/4/6/12664/orig_1x1.gif';
		arImageURL[4]['width'] = '5';
		arImageURL[4]['height'] = '1';
		arImageURL[5] = new Array();
		arImageURL[5]['url'] = '/city_data/images/4/6/12664/orig_1x1.gif';
		arImageURL[5]['width'] = '5';
		arImageURL[5]['height'] = '1';
		arImageURL[6] = new Array();
		arImageURL[6]['url'] = '/city_data/images/4/6/12664/orig_1x1.gif';
		arImageURL[6]['width'] = '1';
		arImageURL[6]['height'] = '1';
		arImageURL[7] = new Array();
		arImageURL[7]['url'] = '/city_data/images/4/6/12664/orig_1x1.gif';
		arImageURL[7]['width'] = '1';
		arImageURL[7]['height'] = '1';
		arImageURL[8] = new Array();
		arImageURL[8]['url'] = '/city_data/images/4/6/12664/orig_1x1.gif';
		arImageURL[8]['width'] = '1';
		arImageURL[8]['height'] = '1';
		arImageURL[9] = new Array();
		arImageURL[9]['url'] = '/city_data/images/4/6/12664/orig_1x1.gif';
		arImageURL[9]['width'] = '1';
		arImageURL[9]['height'] = '1';
		
	var linkTarget = new Array();linkTarget['1'] = '_self';linkTarget['2'] = '_blank';linkTarget['3'] = '_top';linkTarget['537'] = 'frame_1';linkTarget['538'] = 'frame_2';linkTarget['539'] = 'frame_3';linkTarget['540'] = 'frame_4';linkTarget['541'] = 'frame_5';
	
	/*
		executes the given link id with the given target
		
		parameter:
			iLinkID - the link id
			szTarget - the target name
	*/
	function clLink(szLink,szTarget) {
		window.open(szLink,szTarget);
	}
	
	/*
		called if a user clicks on the prefix image
		
		parameter:
			objSource - the source from where the event is emitted
			iLeft - the left value
			iRight - the right value
			iExtra - the extra value
	*/
	function Icon_ClickAction_1046(objSource,iLeft,iRight,iExtra,iRootID) {
		var iExpandStatus;

		var iLevel = GetObject_1046('mainspan_' + iRight).iLevel;
		var objTable = GetObject_1046('subtag_' + iRight);
		var objIcon1 = GetObject_1046('img_' + iRight + '_1');
		var objIcon2 = GetObject_1046('img_' + iRight );
	
			if(objTable.className != 'hidden') {
				// zuklappen
				objTable.className = 'hidden';
			} else {
				// aufklappen
					CloseAllUnder_1046(iLeft,iRight);
				
				if(iLeft + 1 != iRight)
					objTable.className = '';
				else
					objTable.className = 'hidden';
				}

				
			if(iLeft + 1 == iRight)
				CloseAllUnder_1046(iLeft,iRight);
	

			if(objIcon1 != null && objIcon2 != null)
			{
				if(objIcon1.className == 'hidden') {
					objIcon2.className = 'hidden';
					objIcon1.className = '';
				} else {	
					objIcon1.className = 'hidden';	
					objIcon2.className = '';
				}
			}
			
		return false;	
	}
	
	/*
		shows the given submenu always
	*/
	function Icon_ClickAction_Show_1046(objSource,iLeft,iRight,iRootID) {
		Icon_ClickAction_1046(objSource,iLeft,iRight,0,iRootID);
		return false;	
	}
	
	/*
		returns a object by name
	*/	
	function GetObject_1046(szName) {
		return document.getElementById(szName + '_1046');
	}

	/*
		called if a user click on text or the normal image
		
		parameter:
			objSource - the source from where the event is emitted
			iLeft - the left value
			iRight - the right value
	*/	
	function Menu_ClickAction_1046(objSource,iLeft,iRight) {

				if(3 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=31515&modul_id=5','frame_3');
				}
				if(5 == iLeft) {	
					clLink('/city_info/display/bs/vorgang/default.cfm?region_id=232&az=all&design_id=3879&EpS=20','frame_3');
				}
				if(7 == iLeft) {	
					clLink('/city_info/display/lebenslage/default.cfm?region_id=232&design_id=3897&EpS=20','frame_3');
				}
				if(9 == iLeft) {	
					clLink('/city_info/display/bs/mitarbeiter/default.cfm?region_id=232&design_id=3871&EpS=20','frame_3');
				}
				if(11 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9428&modul_id=5','frame_3');
				}
				if(14 == iLeft) {	
					clLink('/city_info/display/show.cfm?region_id=232&record_id=2167&modul_id=13&design_id=3868','frame_3');
				}
				if(16 == iLeft) {	
					clLink('/city_info/display/show.cfm?region_id=232&record_id=3998&modul_id=13&design_id=3868','frame_3');
				}
				if(18 == iLeft) {	
					clLink('/city_info/display/show.cfm?region_id=232&record_id=2168&modul_id=13&design_id=3868','frame_3');
				}
				if(20 == iLeft) {	
					clLink('/city_info/display/show.cfm?region_id=232&record_id=13800&modul_id=15&design_id=3880','frame_3');
				}
				if(22 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=10844&modul_id=5','frame_3');
				}
				if(25 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9663&modul_id=5','frame_3');
				}
				if(27 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=58048&modul_id=5','frame_3');
				}
				if(29 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9652&modul_id=5','frame_3');
				}
				if(31 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=13554&modul_id=5','frame_3');
				}
				if(33 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9981&modul_id=5','frame_3');
				}
				if(35 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9425&modul_id=5','frame_3');
				}
				if(39 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9253&modul_id=5','frame_3');
				}
				if(41 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9251&modul_id=5','frame_3');
				}
				if(43 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9257&modul_id=5','frame_3');
				}
				if(45 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9364&modul_id=5','frame_3');
				}
				if(48 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=56251&modul_id=5','frame_3');
				}
				if(50 == iLeft) {	
					clLink('/city_info/display/show.cfm?region_id=232&record_id=13872&modul_id=15&design_id=3880','frame_3');
				}
				if(52 == iLeft) {	
					clLink('/city_info/display/v_kalender/default.cfm?region_id=232&design_id=3904&keyword=&EpS=20','frame_3');
				}
				if(54 == iLeft) {	
					clLink('http://tbb.active-city.net/city_info/display/bb/rubrik/details.cfm?region_id=232&design_id=0&id=3867&rubrik_id=0','frame_3');
				}
				if(56 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9503&modul_id=5','frame_3');
				}
				if(59 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=43199&modul_id=5','frame_3');
				}
				if(61 == iLeft) {	
					clLink('/city_info/display/news/aktuelles/default.cfm?region_id=232&design_id=3899&keyword=917&az=all&EpS=20','frame_3');
				}
				if(64 == iLeft) {	
					clLink('/city_info/display/show.cfm?region_id=232&record_id=46&modul_id=77&Wort=0','frame_3');
				}
				if(67 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9686&modul_id=5','frame_3');
				}
				if(69 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=9687&modul_id=5','frame_3');
				}
				if(72 == iLeft) {	
					clLink('/city_info/anzeige/redaktionssystem/main/show.cfm?region_id=232&lang_id=1&id=8348&modul_id=5','frame_3');
				}

	}
	
	/*
		called if a user moves text or the normal image
		
		parameter:
			objSource - the source from where the event is emitted
			iLeft - the left value
			iRight - the right value
	*/	
	function Menu_OverAction_1046(objSource,iLeft,iRight) {

	}
	
	function Menu_OutAction_1046(objSource,iLeft,iRight) {
		window.status = '';
	}
	
	/*
		creates a list of all menü root nodes
	*/
	function Init_1046(iMaxRight) {
		for(var iIndex = 0; iIndex < iMaxRight; iIndex++)
		{
			if(GetObject_1046('mainspan_' + iIndex) != null) 
			{
				arAllNodes[arAllNodes.length] = new Array();
				arAllNodes[arAllNodes.length - 1]['objTable'] = GetObject_1046('subtag_' + iIndex);
				arAllNodes[arAllNodes.length - 1]['objIcon'] = GetObject_1046('img_' + iIndex);
				arAllNodes[arAllNodes.length - 1]['objIcon_1'] = GetObject_1046('img_' + iIndex + '_1');
				arAllNodes[arAllNodes.length - 1]['iRightID'] = iIndex;
				arAllNodes[arAllNodes.length - 1]['iLeftID'] = GetObject_1046('mainspan_' + iIndex).getAttribute('iLeft');
				arAllNodes[arAllNodes.length - 1]['iLevel'] = GetObject_1046('mainspan_' + iIndex).getAttribute('iLevel');
			}		
		}
	}
	
	/**
	 * closes all items between the given iLeftID and iRightID expect the item with the right id iRightNotToClose
	 */
	function CloseAllUnder_1046(iRightNotToClose,iLeftNotToClose) 
	{
		for(var iIndex = 0; iIndex < arAllNodes.length; iIndex++)
		{

			// fehler dektion
			
			if(isNaN(arAllNodes[iIndex]['iRightID']))
				alert('Fehler in Node ' + iIndex + ':' + arAllNodes[iIndex]['iRightID']);
			if(isNaN(arAllNodes[iIndex]['iLeftID']))
				alert('Fehler in Node ' + iIndex + ':' + arAllNodes[iIndex]['iLeftID']);
		
			// richtige abfragen
	
			if(((iRightNotToClose < arAllNodes[iIndex]['iRightID']) && 
			    (iRightNotToClose < arAllNodes[iIndex]['iLeftID'])) ||
			   ((iLeftNotToClose > arAllNodes[iIndex]['iRightID']) && 
			    (iLeftNotToClose > arAllNodes[iIndex]['iLeftID'])))
			{
				// zuklappen
				arAllNodes[iIndex]['objTable'].className = 'hidden';
				if(IsDefined(arAllNodes[iIndex]['objIcon']) && 
				   IsDefined(arAllNodes[iIndex]['objIcon_1']))
				{
					arAllNodes[iIndex]['objIcon'].className = 'hidden';
					arAllNodes[iIndex]['objIcon_1'].className = '';			
				}
			}
		}
	}


