/* [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','501',jdecode('BIENVENIDA'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','552',jdecode('%C2%BFQuienes+somos%3F'),jdecode(''),'/552.html','true',[],'',''],
	['PAGE','43212',jdecode('Galer%C3%ADa'),jdecode(''),'/43212.html','true',[],'',''],
	['PAGE','615',jdecode('PROMOCIONES'),jdecode(''),'/615.html','true',[],'',''],
	['PAGE','573',jdecode('Show+para+XV+a%C3%B1os'),jdecode(''),'/573.html','true',[],'',''],
	['PAGE','594',jdecode('Shows+Infantiles'),jdecode(''),'/594.html','true',[],'',''],
	['PAGE','107612',jdecode('Baby+shower'),jdecode(''),'/107612.html','true',[],'',''],
	['PAGE','131244',jdecode('Show+para+Adultos'),jdecode(''),'/131244.html','true',[],'',''],
	['PAGE','131265',jdecode('Despedida+de+Soltera'),jdecode(''),'/131265.html','true',[],'',''],
	['PAGE','131286',jdecode('Entrega+de+Regalo'),jdecode(''),'/131286.html','true',[],'',''],
	['PAGE','113212',jdecode('PUBLICIDAD'),jdecode(''),'/113212.html','true',[],'',''],
	['PAGE','111912',jdecode('TU+POSADA+2010'),jdecode(''),'/111912.html','true',[],'',''],
	['PAGE','114433',jdecode('EVENTOS+ESPECIALES'),jdecode(''),'/114433/index.html','true',[ 
		['PAGE','118123',jdecode('Competencias'),jdecode(''),'/114433/118123.html','true',[],'',''],
		['PAGE','118144',jdecode('Voluntarios'),jdecode(''),'/114433/118144.html','true',[],'',''],
		['PAGE','118165',jdecode('Publicos'),jdecode(''),'/114433/118165.html','true',[],'','']
	],'',''],
	['PAGE','657',jdecode('Cont%C3%A1ctenos'),jdecode(''),'/657.html','true',[],'',''],
	['PAGE','97033',jdecode('Despedida'),jdecode(''),'/97033.html','true',[],'',''],
	['PAGE','26617',jdecode('Libro+de+visitas'),jdecode(''),'/26617/index.html','true',[ 
		['PAGE','26612',jdecode('Leer+el+libro+de+Visitas'),jdecode(''),'/26617/26612.html','false',[],'','']
	],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='FF6600';
theSitetree.keyvisualId='9240';
theSitetree.keyvisualName='kv2.swf';
theSitetree.fontsetId='17360';
theSitetree.graphicsetId='12762';
theSitetree.contentColor='FF6600';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Transluszent',
				paletteFamily: 	'FF6600',
				keyvisualId: 	'9240',
				keyvisualName: 	'kv2.swf',
				fontsetId: 		'17360',
				graphicsetId: 	'12762',
				contentColor: 	'FF6600',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				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['7008']=webappMappings['7008-471']={
webappId:    '7008',
documentId:  '657',
internalId:  '471',
customField: 'language:es;country:ES;'
};
webappMappings['1002']=webappMappings['1002-26617avec10invxk2']={
webappId:    '1002',
documentId:  '26617',
internalId:  '26617avec10invxk2',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-13cfc120f506f9b8da65d72660873caa']={
webappId:    '7060',
documentId:  '43212',
internalId:  '13cfc120f506f9b8da65d72660873caa',
customField: 'language:es;country:ES;'
};
webappMappings['1501']=webappMappings['1501-5762759']={
webappId:    '1501',
documentId:  '501',
internalId:  '5762759',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100826-160531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20100826-001753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20100826-002520'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20100826-002756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107612',
internalId:  '',
customField: '20100826-002915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111912',
internalId:  '',
customField: '20100826-003052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113212',
internalId:  '',
customField: '20100826-003013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43212',
internalId:  '',
customField: '20100826-001916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131265',
internalId:  '',
customField: '20100807-025830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131286',
internalId:  '',
customField: '20100807-025957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '131244',
internalId:  '',
customField: '20100807-103407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114433',
internalId:  '',
customField: '20100826-003238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20100826-002402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26617',
internalId:  '',
customField: '20100826-003434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26612',
internalId:  '',
customField: '20070621-091950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '657',
internalId:  '',
customField: '20100825-223354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97033',
internalId:  '',
customField: '20100826-160749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118144',
internalId:  '',
customField: '20100807-133329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118165',
internalId:  '',
customField: '20100807-133657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118123',
internalId:  '',
customField: '20100807-133246'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INVXK2';
var companyName   = 'MuNdO+LoCo+De+PaYaChOsS..%21%21';
var htmlTitle	  = 'MuNdO+LoCo+De+PaYaSoS';
var metaKeywords  = 'payasos%2Cmundo+loco%2Cfiestas%2Cdiversion%2Cshow%2Cbebilin%2Cambiente%2Ceventos%2Canimador';
var metaContents  = 'payasos+';
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();
};
