/* [nodename, id, name, navigationtext, href, isnavigation, childs[], templatename] */

if (typeof(decodeURIComponent) == 'undefined') {
  decodeURIComponent = function(s) {
    return unescape(s);
  }
}

function jdecode(s) {
    s = s.replace(/\+/g, "%20")
    return decodeURIComponent(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 POS_TARGET=8;
var theSitetree=[ 
	['PAGE','5501',jdecode('INICIO'),jdecode(''),'/5501.html','true',[],'',''],
	['PAGE','18101',jdecode('PROGRAMACI%C3%93N'),jdecode(''),'/18101/index.html','true',[ 
		['PAGE','14001',jdecode('-+PRE+CONGRESO'),jdecode(''),'/18101/14001.html','true',[],'',''],
		['PAGE','14201',jdecode('-+JUEVES+29'),jdecode(''),'/18101/14201.html','true',[],'',''],
		['PAGE','25201',jdecode('-+VIERNES+30'),jdecode(''),'/18101/25201.html','true',[],'',''],
		['PAGE','26001',jdecode('-+S%C3%81BADO+31'),jdecode(''),'/18101/26001.html','true',[],'','']
	],'',''],
	['PAGE','12101',jdecode('CONFERENCISTAS'),jdecode(''),'/12101/index.html','true',[ 
		['PAGE','14501',jdecode('-+Invitadas'),jdecode(''),'/12101/14501.html','true',[],'','']
	],'',''],
	['PAGE','18901',jdecode('SEDES'),jdecode(''),'/18901.html','true',[],'',''],
	['PAGE','11401',jdecode('CLAM'),jdecode(''),'/11401.html','true',[],'',''],
	['PAGE','22101',jdecode('WFMT'),jdecode(''),'/22101.html','true',[],'',''],
	['PAGE','5636',jdecode('FACEBOOK'),jdecode(''),'/5636.html','true',[],'',''],
	['PAGE','5657',jdecode('CONTACTO'),jdecode(''),'/5657.html','true',[],'',''],
	['PAGE','37401',jdecode('COMENTARIOS'),jdecode(''),'/37401.html','true',[],'','']];
var siteelementCount=14;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='5E5E5E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10344';
theSitetree.graphicsetId='10448';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='5e5e5e';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Akropolis',
				paletteFamily: 	'5E5E5E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10344',
				graphicsetId: 	'10448',
				contentColor: 	'FFFFFF',
				contentBGColor: '5e5e5e',
				a_color: 		'5E5E5E',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20100802-104104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20100616-215202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5636',
internalId:  '',
customField: '20100306-121741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5657',
internalId:  '',
customField: '20100306-224721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26001',
internalId:  '',
customField: '20100714-001804'
};
webappMappings['7008']=webappMappings['7008-6994']={
webappId:    '7008',
documentId:  '5657',
internalId:  '6994',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-37401ahw050inzae7']={
webappId:    '1002',
documentId:  '37401',
internalId:  '37401ahw050inzae7',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25201',
internalId:  '',
customField: '20100713-235222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20100607-144944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20100511-152138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20100722-114112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20100713-235251'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20100511-152213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18101',
internalId:  '',
customField: '20100802-104216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18901',
internalId:  '',
customField: '20100802-103721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37401',
internalId:  '',
customField: '20100802-110704'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INZAE7';
var companyName   = 'WWW.MUSICOTERAPIA.LA';
var htmlTitle	  = 'IV+CONGRESO+LATINOAMERICANO+DE+MUSICOTERAPIA.+Bogot%C3%A1%2C+Colombia.+julio+de+2010';
var metaKeywords  = 'Congreso%2C+comit%C3%A9%2C+latinoamericano%2C+musicoterapia%2C+investigaci%C3%B3n%2C+pr%C3%A1ctica+%2C+musicoterap%C3%A9utica%2C+conferencistas%2C+asistencia%2C+m%C3%BAsica%2C+terapia%2C+CLAM%2C+Colombia%2C+Bogot%C3%A1.';
var metaContents  = 'Congreso%2C+comit%C3%A9%2C+latinoamericano%2C+musicoterapia%2C+investigaci%C3%B3n%2C+pr%C3%A1ctica+%2C+musicoterap%C3%A9utica%2C+conferencistas%2C+asistencia%2C+m%C3%BAsica%2C+terapia%2C+CLAM%2C+Colombia%2C+Bogot%C3%A1.';
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;
};

theSitetree.getByXx = function(lookup, xx, ar) {
    if (typeof(ar) == 'undefined'){
    	ar = this;
    }
    for (var i=0; i < ar.length; i++) {
        if (ar[i][xx] == lookup){
        	return ar[i];
        }
        if (ar[i][POS_CHILDS].length > 0) {
        	var result=this.getByXx(lookup, xx, ar[i][POS_CHILDS]);
            if (result != null){
                return result;
               }
        }
    }
    return null;
};

function gotoPage(lookup) {
	if(__path_prefix__ == "/servlet/CMServeRES" && typeof (changePage) == 'function'){
		changePage(lookup);
		return;
	}
	var page = theSitetree.getHREF(lookup);
	if (!page) {
		var testFor = [ POS_NAME, POS_NAVIGATIONTEXT ];
		for (var i=0 ; i < testFor.length ; i++) {
			var p = theSitetree.getByXx(lookup, testFor[i]);
			if (p != null) {
				page = p[POS_HREF];
				break;
			}
		}
	}
	document.location.href = (new URL(__path_prefix__ + page, true, true)).toString();
};

