/* [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','201',jdecode('Home'),jdecode(''),'/201.html','true',[],''],
	['PAGE','7301',jdecode('Membership'),jdecode(''),'/7301.html','true',[],''],
	['PAGE','1722',jdecode('Souvenirs'),jdecode(''),'/1722.html','true',[],''],
	['PAGE','1806',jdecode('Contact+Us'),jdecode(''),'/1806.html','true',[],'']];
var siteelementCount=4;
theSitetree.topTemplateName='Bigcity_NYC';
theSitetree.paletteFamily='7C0B0B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='17893';
theSitetree.graphicsetId='13164';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7C0B0B';
var theTemplate={
				name: 			'Bigcity_NYC',
				paletteFamily: 	'7C0B0B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'17893',
				graphicsetId: 	'13164',
				contentColor: 	'FFFFFF',
				contentBGColor: '7C0B0B',
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['1008']={
webappId:    '1008',
documentId:  '1806',
internalId:  '1964244',
customField: 'en:US:'
};
webappMappings['1008']={
webappId:    '1008',
documentId:  '7301',
internalId:  '1967923',
customField: 'en:US:'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '201',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INXZKR';
var companyName   = 'Gibran+Academy+of+Arts';
var htmlTitle	  = 'Gibran+Academy+of+Arts+%40+2008%7C+Kahlil+Gibran+Friends+Around+The+World';
var metaKeywords  = 'Gibran%2C+Kahlil+Gibran%2C+Kahlil%2C+Gibran+Kahlil+Gibran%2C+gibran+academy%2C+academy%2C+academy+of+arts%2C+Gibran+academy+of+arts%2C+souvenirs%2C+postcards%2C+academy+souvenirs%2C+museum%2C+library%2C+conservatory%2C+Gibran+conservatory%2C+membership%2C+contact+us%2C+quotes%2C+quote+of+the+day%2C+text+of+the+month%2C+image%2C+photo%2C+drawings%2C+drawing%2C+artistic+drawing%2C+Gibran+drawing%2C+painting%2C+Gibran+paintings%2C+paintings%2C+poet%2C+poetry%2C+gibran+poetry%2C+proses%2C+more+about+gibran%2C+about+gibran%2C+about+kahlil+gibran%2C+gibran+treasures%2C+gibran+books%2C+book+gibran%2C+the+prophet+gibran%2C+the+prophet%2C+prophet%2C+the+madman+gibran%2C+madman%2C+art%2C+arts%2C+galleries%2C+artistic+web+design%2C+webdesign%2C+artistic+webdesign';
var metaContents  = '';
					                                                                    
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 */					                                                            
