/* [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','4556',jdecode('HOME+%2F+P%C3%A1g+Inicial'),jdecode(''),'/4556.html','true',[],''],
	['PAGE','9065',jdecode('PRODUTOS'),jdecode(''),'/9065.html','true',[],'']];
var siteelementCount=2;
theSitetree.topTemplateName='Clearline';
theSitetree.paletteFamily='C7C6C5';
theSitetree.keyvisualId='3301';
theSitetree.keyvisualName='kv_3301.jpg';
theSitetree.fontsetId='10589';
theSitetree.graphicsetId='10718';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Clearline',
				paletteFamily: 	'C7C6C5',
				keyvisualId: 	'3301',
				keyvisualName: 	'kv_3301.jpg',
				fontsetId: 		'10589',
				graphicsetId: 	'10718',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'C7C6C5',
				e_color: 		'989696',
				f_color: 		'989696',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12'
			  };
var webappMappings = {};
webappMappings['5000']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20110329-011453'
};
webappMappings['5000']={
webappId:    '5000',
documentId:  '9065',
internalId:  '',
customField: '20100819-044524'
};
webappMappings['1501']={
webappId:    '1501',
documentId:  '4556',
internalId:  '6933876',
customField: '1501'
};
webappMappings['1006']={
webappId:    '1006',
documentId:  '4556',
internalId:  '1006',
customField: '1006'
};
var canonHostname = 'creator.amenworld.com';
var accountId     = 'AAM010INE9TI';
var companyName   = 'AstriMed+-+Inform%C3%A1tica+e+Tecnologia+M%C3%A9dica%2C+Lda';
var htmlTitle	  = '..++AstriMed+-+Inform%C3%A1tica+e+Tecnologia+M%C3%A9dica%2C+Lda.';
var metaKeywords  = 'ecografia+ecografo+ecografos+ecocardiografo+sondas+sonda+aloka+sonoscape+mindray+edam+preservativos+gel+ecogel+echogel+ultrasons+sony+monitores+printers+video+registo+imagem+papel+termico+astraia+obstetricia+ginecologia+base+dados+colposcopia+ecocardiografia+fetal+dicom+monitor+fetal+doppler+wallach+crio-cirurgia+consumiveis+electro-cirurgia+colposcopios+colposcopio+marquesas+ginecologicas+urologia+urovision+contratos+assist%C3%AAncia+manuten%C3%A7%C3%A3o+marquesa+pin%C3%A7as++ssd+ssi+ust+';
var metaContents  = 'ecografia%2C+ecografo%2C+ecografos%2C+ecocardiografo%2C+sondas%2C+sonda%2C+aloka%2C+sonoscape%2C+mindray%2C+edam%2C+preservativos%2C+gel%2C+ecogel%2C+echogel%2C+ultrasons%2C+sony%2C+monitores%2C+printers%2C+video%2C+registo%2C+imagem%2C+papel%2C+termico%2C+astraia%2C+obstetricia%2C+ginecologia%2C+base%2C+dados%2C+colposcopia%2C+ecocardiografia%2C+fetal%2C+dicom%2C+monitor%2C+fetal%2C+doppler%2C+wallach%2C+criocirurgia%2C+consumiveis%2C+electrocirurgia%2C+colposcopios%2C+colposcopio%2C+marquesas%2C+ginecologicas%2C+urologia%2C+urovision%2C+contratos%2C+assist%C3%AAncia%2C+manuten%C3%A7%C3%A3o%2C+marquesa%2C+pin%C3%A7as%2C+ssd%2C+ssi%2C+ust+';
					                                                                    
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 */					                                                            

