/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */



function jdecode(s) {

    s = s.replace(/\+/g, "%20")

    return unescape(s);

}



var POS_NODENAME=0;

var POS_ID=1;

var POS_NAME=2;

var POS_NAVIGATIONTEXT=3;

var POS_HREF=4;

var POS_ISNAVIGATION=5;

var POS_CHILDS=6;

var POS_TEMPLATENAME=7;

var theSitetree=[ 

	['PAGE','4595',jdecode('Home'),jdecode(''),'/4595.html','true',[],''],

	['PAGE','4652',jdecode('Aktivit%E4ten'),jdecode(''),'/4652.html','true',[],''],

	['PAGE','4679',jdecode('Centro+EcoAndina'),jdecode(''),'/4679.html','true',[],''],

	['PAGE','4706',jdecode('Projekte'),jdecode(''),'/4706/index.html','true',[ 

		['PAGE','4733',jdecode('Solarenergie'),jdecode(''),'/4706/4733.html','true',[],''],

		['PAGE','11616',jdecode('Integriertes+Projekt'),jdecode(''),'/4706/11616.html','true',[],''],

		['PAGE','4760',jdecode('Verw%FCstung'),jdecode(''),'/4706/4760.html','true',[],''],

		['PAGE','4787',jdecode('Wasserbau'),jdecode(''),'/4706/4787.html','true',[],''],

		['PAGE','4814',jdecode('Information'),jdecode(''),'/4706/4814.html','true',[],''],

		['PAGE','4841',jdecode('%D6kologischer+Goldabbau'),jdecode(''),'/4706/4841.html','true',[],''],

		['PAGE','4868',jdecode('Ausstattung+von+Schulen'),jdecode(''),'/4706/4868.html','true',[],''],

		['PAGE','4895',jdecode('Projektpartner'),jdecode(''),'/4706/4895.html','true',[],'']

	],''],

	['PAGE','4922',jdecode('Kontakt'),jdecode(''),'/4922.html','true',[],''],

	['PAGE','10102',jdecode('G%E4stebuch'),jdecode(''),'/10102/index.html','true',[ 

		['PAGE','10103',jdecode('Eintr%E4ge'),jdecode(''),'/10102/10103.html','true',[],'']

	],'']];

var siteelementCount=15;

theSitetree.topTemplateName='Arena';

					                                                                    

theSitetree.getById = function(id, ar) {												

							if (typeof(ar) == 'undefined')                              

								ar = this;                                              

							for (var i=0; i < ar.length; i++) {                         

								if (ar[i][POS_ID] == id)                                

									return ar[i];                                       

								if (ar[i][POS_CHILDS].length > 0) {                     

									var result=this.getById(id, ar[i][POS_CHILDS]);     

									if (result != null)                                 

										return result;                                  

								}									                    

							}                                                           

							return null;                                                

					  };                                                                

					                                                                    

theSitetree.getParentById = function(id, ar) {											

						if (typeof(ar) == 'undefined')                              	

							ar = this;                                             		

						for (var i=0; i < ar.length; i++) {                        		

							for (var j = 0; j < ar[i][POS_CHILDS].length; j++) {   		

								if (ar[i][POS_CHILDS][j][POS_ID] == id) {          		

									// child found                                 		

									return ar[i];                                  		

								}                                                  		

								var result=this.getParentById(id, ar[i][POS_CHILDS]);   

								if (result != null)                                 	

									return result;                                  	

							}                                                       	

						}                                                           	

						return null;                                                	

					 }								                                    

					                                                                    

theSitetree.getName = function(id) {                                                    

						var elem = this.getById(id);                                    

						if (elem != null)                                               

							return elem[POS_NAME];                                      

						return null;	                                                

					  };			                                                    

theSitetree.getNavigationText = function(id) {                                          

						var elem = this.getById(id);                                    

						if (elem != null)                                               

							return elem[POS_NAVIGATIONTEXT];                            

						return null;	                                                

					  };			                                                    

					                                                                    

theSitetree.getHREF = function(id) {                                                    

						var elem = this.getById(id);                                    

						if (elem != null)                                               

							return elem[POS_HREF];                                      

						return null;	                                                

					  };			                                                    

					                                                                    

theSitetree.getIsNavigation = function(id) {                                            

						var elem = this.getById(id);                                    

						if (elem != null)                                               

							return elem[POS_ISNAVIGATION];                              

						return null;	                                                

					  };			                                                    

					                                                                    

theSitetree.getTemplateName = function(id, lastTemplateName, ar) {             		 

	                                                                                 

	if (typeof(lastTemplateName) == 'undefined')                                     

		lastTemplateName = this.topTemplateName;	                                 

	if (typeof(ar) == 'undefined')                                                   

		ar = this;                                                                   

		                                                                             

	for (var i=0; i < ar.length; i++) {                                              

		var actTemplateName = ar[i][POS_TEMPLATENAME];                               

		                                                                             

		if (actTemplateName == '')                                                   

			actTemplateName = lastTemplateName;		                                 

		                                                                             

		if (ar[i][POS_ID] == id) {                                			         

			return actTemplateName;                                                  

		}	                                                                         

		                                                                             

		if (ar[i][POS_CHILDS].length > 0) {                                          

			var result=this.getTemplateName(id, actTemplateName, ar[i][POS_CHILDS]); 

			if (result != null)                                                      

				return result;                                                       

		}									                                         

	}                                                                                

	return null;                                                                     

	};                                                                               

/* EOF */					                                                            

