/* [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','4598',jdecode('Inicio'),jdecode(''),'/4598.html','true',[],'',''],
	['PAGE','38167',jdecode('Informaciones'),jdecode(''),'/38167.html','true',[],'',''],
	['PAGE','24865',jdecode('%C2%BFQuienes+Somos%3F'),jdecode(''),'/24865.html','true',[],'',''],
	['PAGE','42267',jdecode('Estela+Cabezas'),jdecode(''),'/42267.html','true',[],'',''],
	['PAGE','47407',jdecode('Capacitaci%C3%B3n'),jdecode(''),'/47407.html','true',[],'',''],
	['PAGE','48719',jdecode('Experiencias+Pedag%C3%B3gicas'),jdecode(''),'/48719.html','true',[],'',''],
	['PAGE','24027',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/24027/index.html','true',[ 
		['PAGE','27672',jdecode('Cont%C3%A1ctenos+%28follow+up+page%29'),jdecode(''),'/24027/27672.html','false',[],'','']
	],'',''],
	['PAGE','49678',jdecode('Libro+de+visitas'),jdecode(''),'/49678/index.html','true',[ 
		['PAGE','49677',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/49678/49677.html','false',[],'','']
	],'','']];
var siteelementCount=10;
theSitetree.topTemplateName='Seasons_winter';
theSitetree.paletteFamily='FFFFFF';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='21093';
theSitetree.graphicsetId='13196';
theSitetree.contentColor='2E2E2E';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Seasons_winter',
				paletteFamily: 	'FFFFFF',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'21093',
				graphicsetId: 	'13196',
				contentColor: 	'2E2E2E',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4598',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-49678avec10inxxa1']={
webappId:    '1002',
documentId:  '49678',
internalId:  '49678avec10inxxa1',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-50495']={
webappId:    '1501',
documentId:  '4598',
internalId:  '50495',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20100414-103625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42267',
internalId:  '',
customField: '20091023-154502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24865',
internalId:  '',
customField: '20100503-111619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38167',
internalId:  '',
customField: '20100607-123706'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47407',
internalId:  '',
customField: '20100607-123244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48719',
internalId:  '',
customField: '20100608-150148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24027',
internalId:  '',
customField: '20080815-092555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27672',
internalId:  '',
customField: '20041026-092203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49678',
internalId:  '',
customField: '20090202-160959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49677',
internalId:  '',
customField: '20080603-070347'
};
webappMappings['7008']=webappMappings['7008-7010']={
webappId:    '7008',
documentId:  '24027',
internalId:  '7010',
customField: 'language:es;country:ES;'
};
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXXA1';
var companyName   = 'M%C3%9ASICA+EN+COLORES';
var htmlTitle	  = 'www.musicaencolores.com';
var metaKeywords  = 'm%C3%BAsica+para+ni%C3%B1os';
var metaContents  = 'Iniciaci%C3%B3n+musical%2C+pedagog%C3%ADa+musical%2C+m%C3%A9todo+de+educaci%C3%B3n+musical.';
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();
};
