/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','473',jdecode('Audio%2C+disco+e+iluminaci%C3%B3n'),jdecode(''), jdecode('%2F473.html'), 'true',[],'',''],
	['PAGE','81212',jdecode('ALIMENTOS'),jdecode(''), jdecode('%2F81212.html'), 'true',[],'',''],
	['PAGE','5301',jdecode('Casino+y+STAFF'),jdecode(''), jdecode('%2F5301.html'), 'true',[],'',''],
	['PAGE','66712',jdecode('FIESTAS+TEMA'),jdecode(''), jdecode('%2F66712.html'), 'true',[],'',''],
	['PAGE','36243',jdecode('Diversi%C3%B3n%2C+Ni%C3%B1os+y...'),jdecode(''), jdecode('%2F36243.html'), 'true',[],'',''],
	['PAGE','63512',jdecode('SALONES+Y+JARDINES'),jdecode(''), jdecode('%2F63512.html'), 'true',[],'',''],
	['PAGE','10901',jdecode('Promociones+y+edecanes'),jdecode(''), jdecode('%2F10901.html'), 'true',[],'',''],
	['PAGE','536',jdecode('Cont%C3%A1ctenos'),jdecode(''), jdecode('%2F536.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='9240';
theSitetree.keyvisualName='kv2.swf';
theSitetree.fontsetId='17363';
theSitetree.graphicsetId='12763';
theSitetree.contentColor='660000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'grp13-hostin',
  product: 'WSCVWLSSSLYTC2IW'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Transluszent',
				paletteFamily: 	'660000',
				keyvisualId: 	'9240',
				keyvisualName: 	'kv2.swf',
				fontsetId: 		'17363',
				graphicsetId: 	'12763',
				contentColor: 	'660000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-933996']={
webappId:    '1501',
documentId:  '401',
internalId:  '933996',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100427-153620'
};
webappMappings['7008']=webappMappings['7008-9869']={
webappId:    '7008',
documentId:  '536',
internalId:  '9869',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63512',
internalId:  '',
customField: '20091203-010032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100427-155043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66712',
internalId:  '',
customField: '20100427-134303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20100427-172945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20100427-173820'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36243',
internalId:  '',
customField: '20071204-122014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '536',
internalId:  '',
customField: '20100427-174213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81212',
internalId:  '',
customField: '20110412-155937'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2YH2';
var companyName   = '%C2%A1LU2+EVENTOS+Y+PRODUCCIONES%21';
var htmlTitle	  = 'FIESTAS+LU2';
var metaKeywords  = 'LUDOS%2C+CASINOS%2C+FERIAS%2C+FIESTAS%2C+EVENTOS%2C+AUDIO%2C+DISCO%2C+ANTRO%2C+CASINO%2C+TAQUIZAS%2C+PARRILLADAS%2C+INTEGRACION%2C+XV+A%C3%91OS%2C+SERVICIOS%2C+JARDINES%2C+ANIMACION%2C+ANIMADORES%2C+BANQUETES%2C+DESAYUNOS%2C+BABY%2C+SHOWER%2C+EDECAN%2C+BUSCAVIONES%2C+SKY+TRAKERS%2C+LU2%2C+LUDOS%2C+PARTY%2C+LUZ%2C+SONIDO%2C+ANIMACION%2C+ANIMADORES%2C+STAFF%2C+HADA%2C+HADAS%2C+THERAPEDIC';
var metaContents  = 'ORGANIZACION+DE+SERVICIOS%2C+FIESTAS+Y+EVENTOS+EMPRESARIALES+Y+PARTICULARES%2C+EVENTOS+DE+INTEGRACI%C3%93N%2C+CASINOS+DE+FANTAS%C3%8DA%2C+AUDIO+E+ILUMINACION%2C+ANTRO%2C+DISCOTECAS%2C+FIESTAS+TEMA%2C+XV+A%C3%91OS%2C+PRESENTACIONES%2C+FIESTAS+INFANTILES%2C+EDECANES+Y+MAS...NUESTRO+LEMA+UN+PRODUCTO+SUPERIOR+A+UN+GRAN+PRECIO%2C+SIEMPRE';
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();
};

