/* [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','401',jdecode('Ma+che+sito+%C3%A8%3F'),jdecode(''),'/401.html','true',[],''],
	['PAGE','1501',jdecode('SCARPE+DA+CALCIO'),jdecode(''),'/1501/index.html','true',[ 
		['PAGE','1522',jdecode('Capitolo+1+-+2'),jdecode(''),'/1501/1522.html','true',[],'']
	],''],
	['PAGE','452',jdecode('Funerale+'),jdecode(''),'/452.html','true',[],''],
	['PAGE','473',jdecode('Incontro'),jdecode(''),'/473.html','true',[],''],
	['PAGE','9001',jdecode('Monotonia'),jdecode(''),'/9001.html','true',[],''],
	['PAGE','8601',jdecode('Momenti+di+Gloria'),jdecode(''),'/8601.html','true',[],''],
	['PAGE','2901',jdecode('Invia+i+tuoi+racconti'),jdecode(''),'/2901.html','true',[],''],
	['PAGE','4706',jdecode('Dite+la+Vostra'),jdecode(''),'/4706/index.html','true',[ 
		['PAGE','4701',jdecode('Le+Vostre+opinioni'),jdecode(''),'/4706/4701.html','true',[],'']
	],'']];
var siteelementCount=10;
theSitetree.topTemplateName='Common';
theSitetree.paletteFamily='E2E2E2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='26634';
theSitetree.graphicsetId='13445';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Common',
				paletteFamily: 	'E2E2E2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'26634',
				graphicsetId: 	'13445',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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['1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1005']={
webappId:    '1005',
documentId:  '473',
internalId:  '1326c832cee.b0d13e93',
customField: 'it:IT:'
};
webappMappings['1005']={
webappId:    '1005',
documentId:  '452',
internalId:  '1326c827b1b.5541c4c6',
customField: 'it:IT:'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '4706',
internalId:  '4706aitne0inxxzz',
customField: 'action=form&icq=false'
};
webappMappings['1002']={
webappId:    '1002',
documentId:  '4701',
internalId:  '4706aitne0inxxzz',
customField: 'action=list'
};
webappMappings['1005']={
webappId:    '1005',
documentId:  '1501',
internalId:  '1326c89607a.b5432d2a',
customField: 'it:IT:'
};
webappMappings['1005']={
webappId:    '1005',
documentId:  '8601',
internalId:  '1326d304bab.9e5981ea',
customField: 'it:IT:'
};
webappMappings['1005']={
webappId:    '1005',
documentId:  '9001',
internalId:  '1326d336bfb.97096c20',
customField: 'it:IT:'
};
var canonHostname = 'wsc.startwsc.net';
var accountId     = 'AITNE0INXXZZ';
var companyName   = 'OCCHIOALLAPENNA.NET+-+LETTURA+ONLINE';
var htmlTitle	  = 'OCCHIOALLAPENNA+racconti+e+storie+per+tutti';
var metaKeywords  = 'lettura+scrittura+leggere+scrivere+raccontare+racconti+storie+fiabe+racconto+storia+fiaba+romanzo+romanzi+leggere+scrivere+pubblicare+pubblica+scrivi+leggi+freccia+occhio+alla+penna+occhioallapenna+skaltz+enrico+scaglia+scarpe+da+calcio+arbitro+calcio+arbitri+libri+online+favole+favola+lettura';
var metaContents  = 'Racconti%2C+romanzi%2C+fiabe.+Leggi+i+miei+racconti+e+se+hai+storie+che+vuoi+pubblicare%2C+in+linea+con+i+contenuti+del+sito%2C+potrai+pubblicarli.+Occhioallapenna+%C3%A8+un+sito+dove+esprimere+la+propria+creativit%C3%A0%2C+scrivendo.+Occhioallapenna+%C3%A8+un+sito+dove+leggere+libri+inediti+gratuitamente.+Libri+online+gratuiti+e+per+tutti.';
					                                                                    
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 */					                                                            

