/* [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','4559',jdecode('ICC+Home'),jdecode(''),'/4559.html','true',[],''],
	['PAGE','13168',jdecode('News+%26+Upcoming+Events'),jdecode(''),'/13168.html','true',[],''],
	['PAGE','13668',jdecode('Past+Events'),jdecode(''),'/13668.html','true',[],''],
	['PAGE','9701',jdecode('Festival+Diaries'),jdecode(''),'/9701/index.html','true',[ 
		['PAGE','9401',jdecode('Big+Chill+2007'),jdecode(''),'/9701/9401.html','true',[],''],
		['PAGE','23892',jdecode('Festival+Season+2008'),jdecode(''),'/9701/23892.html','true',[],''],
		['PAGE','33976',jdecode('Festival+Season+2009'),jdecode(''),'/9701/33976.html','true',[],''],
		['PAGE','50482',jdecode('Festival+Season+2010'),jdecode(''),'/9701/50482.html','true',[],''],
		['PAGE','57325',jdecode('Festival+Season+2011'),jdecode(''),'/9701/57325.html','true',[],'']
	],''],
	['PAGE','50388',jdecode('New+Releases'),jdecode(''),'/50388.html','true',[],''],
	['PAGE','14289',jdecode('Sounds+from+the+Archives'),jdecode(''),'/14289/index.html','true',[ 
		['PAGE','43362',jdecode('2006+%2F+2007+Releases'),jdecode(''),'/14289/43362.html','true',[],''],
		['PAGE','43331',jdecode('2008+Releases'),jdecode(''),'/14289/43331.html','true',[],''],
		['PAGE','13268',jdecode('2009+Releases'),jdecode(''),'/14289/13268.html','true',[],''],
		['PAGE','57813',jdecode('2010+Releases'),jdecode(''),'/14289/57813.html','true',[],'']
	],''],
	['PAGE','4751',jdecode('Audio+Visual'),jdecode(''),'/4751.html','true',[],''],
	['PAGE','13433',jdecode('Gallery'),jdecode(''),'/13433.html','true',[],''],
	['PAGE','9450',jdecode('Underground+Legends'),jdecode(''),'/9450.html','true',[],''],
	['PAGE','4616',jdecode('Image+Creation+Labs'),jdecode(''),'/4616.html','true',[],''],
	['PAGE','5103',jdecode('Fifth+Essence'),jdecode(''),'/5103.html','true',[],''],
	['PAGE','17880',jdecode('Other+Projects'),jdecode(''),'/17880/index.html','true',[ 
		['PAGE','5238',jdecode('Mad+by+Design'),jdecode(''),'/17880/5238.html','true',[],'']
	],''],
	['PAGE','8801',jdecode('Shop'),jdecode(''),'/8801.html','true',[],''],
	['PAGE','10396',jdecode('About+Us'),jdecode(''),'/10396.html','true',[],''],
	['PAGE','5319',jdecode('Making+Contact'),jdecode(''),'/5319.html','true',[],'']];
var siteelementCount=25;
theSitetree.topTemplateName='Metal';
					                                                                    
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 */					                                                            

