/* [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','22703',jdecode('Home'),jdecode(''),'/22703.html','true',[],'',''],
	['PAGE','4595',jdecode('Experiencia+y+Clases'),jdecode(''),'/4595/index.html','true',[ 
		['PAGE','4679',jdecode('Fiestas+y+Cumplea%C3%B1os'),jdecode(''),'/4595/4679.html','true',[],'','']
	],'',''],
	['PAGE','4706',jdecode('Campamentos+de+Vacaciones'),jdecode(''),'/4706.html','true',[],'',''],
	['PAGE','11122',jdecode('Aprende+a+moldear'),jdecode(''),'/11122/index.html','true',[ 
		['PAGE','4814',jdecode('Nuevas+figuras+'),jdecode(''),'/11122/4814.html','true',[],'',''],
		['PAGE','4787',jdecode('Fotos+de+plastilina'),jdecode(''),'/11122/4787.html','true',[],'','']
	],'',''],
	['PAGE','4760',jdecode('Galer%C3%ADa+de+fotos'),jdecode(''),'/4760.html','true',[],'',''],
	['PAGE','11149',jdecode('Contactanos'),jdecode(''),'/11149.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Celebration';
theSitetree.paletteFamily='51C862';
theSitetree.keyvisualId='3790';
theSitetree.keyvisualName='kv_3790.jpg';
theSitetree.fontsetId='10478';
theSitetree.graphicsetId='10981';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Celebration',
				paletteFamily: 	'51C862',
				keyvisualId: 	'3790',
				keyvisualName: 	'kv_3790.jpg',
				fontsetId: 		'10478',
				graphicsetId: 	'10981',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'47B757',
				e_color: 		'FB454D',
				f_color: 		'4545FB',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-51083']={
webappId:    '1501',
documentId:  '22703',
internalId:  '51083',
customField: '1501'
};
webappMappings['7005']=webappMappings['7005-658']={
webappId:    '7005',
documentId:  '11122',
internalId:  '658',
customField: 'language:es;country:ES;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '22703',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22703',
internalId:  '',
customField: '20080524-110807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4595',
internalId:  '',
customField: '20090430-130816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4679',
internalId:  '',
customField: '20041208-141940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4706',
internalId:  '',
customField: '20090430-131146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11122',
internalId:  '',
customField: '20090430-135439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4814',
internalId:  '',
customField: '20050104-100100'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4787',
internalId:  '',
customField: '20041203-003327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4760',
internalId:  '',
customField: '20041124-201500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11149',
internalId:  '',
customField: '20090430-131824'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXXME';
var companyName   = 'COLORCITO-CLAY+ART';
var htmlTitle	  = 'CLAYART%2Cclayart%2CPLASTILINA%2C+MANUALIDADES%2C+CLASES+de+ARTE%2Ccolorcitos%2CCOLORCITOS%2CPLASTILINA+COLORCITOS%2C+plastilina+colorcitos%2Cclases+de+plastilina%2C+clases+plastilina%2C+plasti%2Cfotos+de+plastilina%2C+fotosdeplastilina%2Cplastilina+clayart%2C+plastilina+clay+art%2Cplas';
var metaKeywords  = 'CLAYART%2CPLASTILINA%2C+CLASES%2C+PSICOMOTRICIDAD%2C+CAMPOS+DE+VERANO%2C+CAMPAMENTOS+DE+VERANO%2C+MANUALIDADES%2C+COLORCITOS%2C+CLAYART%2C+CUADROS+DE+PLASTILINA%2C+CUADROS%2C+FIGURAS%2C+FIGURAS+DE+PLASTILINA%2C+ARTE%2C+ARTE+EN+PLASTILINA%2C+FOTOS+DE+PLASTILINA%2CAUTOESTIMA%2C+CREATIVIDAD%2C+IMAGINACION%2CFIESTAS%2C+PI%C3%91ATAS%2C+CUMPLEA%C3%91OS%2C+ACUARELAS%2C+ACUARELA%2C+CRAYON%2C+CRAYONES%2C+CRAYOLA%2C+CRAYOLAS%2C+EXPOSICION%2C+EXPOSICIONES%2CMOLDEADO%2C+MODELADO%2C+ILUSTRACIONES%2C+ILUSTRACIONES+DE+PLASTILINA%2C+IMAGENES+DE+PLASTILINA%2C+DIBUJOS%2C+COLORES.+CLAYART%2C+clayart%2C+colorcitos%2C+plastilina%2Cplasti%2Cfotos%2C+fotosdeplastilina%2C+';
var metaContents  = 'CLAYART%2CCLASES+DE+PLASTILINA+CON+PERFIL+PSICOLOGICO%2C+CAMPAMENTOS+DE+VERANO%2C+PASCUA+Y+NAVIDAD%2C+VENTA+DE+PRODUCTOS+COLORCITOS%2C+CUADROS+ARTISTICOS+Y+FIGURAS+DE+PLASTILINA.';
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();
};

