/* [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','4606',jdecode('Principal'),jdecode(''),'/4606.html','true',[],'',''],
	['PAGE','30001',jdecode('Clases+de+Nataci%C3%B3n'),jdecode(''),'/30001.html','true',[],'',''],
	['PAGE','30022',jdecode('Acuaerobics'),jdecode(''),'/30022.html','true',[],'',''],
	['PAGE','30043',jdecode('Fitness%2FGimnasio'),jdecode(''),'/30043/index.html','true',[ 
		['PAGE','37901',jdecode('BodyBalance'),jdecode(''),'/30043/37901.html','true',[],'',''],
		['PAGE','42101',jdecode('BodyCombat'),jdecode(''),'/30043/42101.html','true',[],'',''],
		['PAGE','43101',jdecode('BodyPump'),jdecode(''),'/30043/43101.html','true',[],'','']
	],'',''],
	['PAGE','4663',jdecode('Instalaciones'),jdecode(''),'/4663.html','true',[],'',''],
	['PAGE','40601',jdecode('Como+Llegar'),jdecode(''),'/40601.html','true',[],'',''],
	['PAGE','11602',jdecode('Acerca+de+Urueta'),jdecode(''),'/11602.html','true',[],'',''],
	['PAGE','46801',jdecode('Fotos+Campamento+Verano+08'),jdecode(''),'/46801.html','true',[],'',''],
	['PAGE','53701',jdecode('Contacto'),jdecode(''),'/53701.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Rectangle';
theSitetree.paletteFamily='FFFFFF';
theSitetree.keyvisualId='2526';
theSitetree.keyvisualName='schwimmen.jpg';
theSitetree.fontsetId='452';
theSitetree.graphicsetId='506';
theSitetree.contentColor='033568';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Rectangle',
				paletteFamily: 	'FFFFFF',
				keyvisualId: 	'2526',
				keyvisualName: 	'schwimmen.jpg',
				fontsetId: 		'452',
				graphicsetId: 	'506',
				contentColor: 	'033568',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4606',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-8c7198e0125d419d9ce0d58bec93f81c']={
webappId:    '7060',
documentId:  '46801',
internalId:  '8c7198e0125d419d9ce0d58bec93f81c',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4606',
internalId:  '',
customField: '20100701-140810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20100527-173608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30022',
internalId:  '',
customField: '20100527-173608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30043',
internalId:  '',
customField: '20100527-173608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37901',
internalId:  '',
customField: '20100527-173608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42101',
internalId:  '',
customField: '20100527-173608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43101',
internalId:  '',
customField: '20100527-173608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4663',
internalId:  '',
customField: '20100527-173608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40601',
internalId:  '',
customField: '20100527-173608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11602',
internalId:  '',
customField: '20100527-173608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46801',
internalId:  '',
customField: '20100527-173608'
};
webappMappings['7008']=webappMappings['7008-17425']={
webappId:    '7008',
documentId:  '53701',
internalId:  '17425',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53701',
internalId:  '',
customField: '20100529-183922'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INX24K';
var companyName   = 'URUETA+Aquatic+%26+Fitness+Center';
var htmlTitle	  = 'Natacion+Urueta+-+Natacion%2C+Acuaerobics+y+Fitness+para+todas+las+edades';
var metaKeywords  = 'natacion+albercas+nataci%C3%B3n+alberca+clases+escuela+acuaerobics+aquaerobics+fitness+gimnasio+karate+body+systems+balance+pump+combat+control+pesocondicion+fisica+taichi';
var metaContents  = 'Urueta+Aquatic++Fitness+Center+es+mas+que+una+escuela+de+natacion.++Contamos+con+cursos+para+beb%C3%A9s%2C+ni%C3%B1os%2C+j%C3%B3venes+y+adultos.++Bajo+la+tutela+de+nuestro+experimentado+entrenador+e+instructor+desarrollamos+t%C3%A9cnica+y+aptitud+f%C3%ADsica.++Ofrecemos+cursos+de+acuaerobics+%28o+aquaerobics%29+para+damas+y+damitas%3B+y+cursos+que+combinan+el+fitness+con+el+entrenamiento+en+alberca+para+un+desarrollo+integral.++En+nuestro+gimnasio+ofrecemos+los+prestigiosos+programas+de+Body+Combat+y+Body+Pump+para+completar+el+desarrollo+f%C3%ADsico.++Ya+sea+para+control+de+peso%2C+para+bajar+de+peso+o+desarrollo+f%C3%ADsico+en+Nataci%C3%B3n+Urueta+podemos+ofrecerle+el+programa+que+necesita.';
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();
};
