/* [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','4556',jdecode('PRESENTACION'),jdecode(''),'/4556.html','true',[],'',''],
	['PAGE','46564',jdecode('RESERVAS'),jdecode(''),'/46564.html','true',[],'',''],
	['PAGE','46501',jdecode('El+SECTOR+con+el+CINE'),jdecode(''),'/46501.html','true',[],'',''],
	['PAGE','46522',jdecode('El+SECTOR+Solidario'),jdecode(''),'/46522.html','true',[],'',''],
	['PAGE','45643',jdecode('NUESTRA+OFERTA+y+COLABORADORES'),jdecode(''),'/45643.html','true',[],'',''],
	['PAGE','4613',jdecode('FIESTAS'),jdecode(''),'/4613.html','true',[],'',''],
	['PAGE','4640',jdecode('DONDE+ESTAMOS'),jdecode(''),'/4640.html','true',[],'',''],
	['PAGE','51001',jdecode('GALERIA+FOTOS'),jdecode(''),'/51001.html','true',[],'',''],
	['PAGE','57301',jdecode('LIBRO+DE+VISITAS'),jdecode(''),'/57301.html','true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='931';
theSitetree.keyvisualName='mixgetraenk.jpg';
theSitetree.fontsetId='169';
theSitetree.graphicsetId='197';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'arsys',
  product: 'WSCSYSSSSLYTC2IK'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'NewYork',
				paletteFamily: 	'660000',
				keyvisualId: 	'931',
				keyvisualName: 	'mixgetraenk.jpg',
				fontsetId: 		'169',
				graphicsetId: 	'197',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'660000',
				c_color: 		'000000',
				d_color: 		'990000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4556',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-6801']={
webappId:    '7008',
documentId:  '46564',
internalId:  '6801',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20110117-111317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4613',
internalId:  '',
customField: '20110117-122430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4640',
internalId:  '',
customField: '20101025-174453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51001',
internalId:  '',
customField: '20110117-114152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45643',
internalId:  '',
customField: '20100708-132434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46522',
internalId:  '',
customField: '20100113-144230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46501',
internalId:  '',
customField: '20100614-012134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46564',
internalId:  '',
customField: '20100515-190230'
};
webappMappings['1002']=webappMappings['1002-57301aas010inev5z']={
webappId:    '1002',
documentId:  '57301',
internalId:  '57301aas010inev5z',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57301',
internalId:  '',
customField: '20100515-184327'
};
var webAppHostname = 'wsc.webaporter.com:80';
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'Aas010INEV5Z';
var companyName   = 'COPAS+Y+MUSICA+A+TU+GUSTO';
var htmlTitle	  = 'EL+SECTOR+Lounge+Bar';
var metaKeywords  = 'Celebrar+cumplea%C3%B1os%2C+local+fiestas+privadas%2C+local+eventos%2C+despedidas+de+solteros%2C+bodas%2C+local+para+cumplea%C3%B1os%2C+local+para+fiestas+privadas%2C+de+copas+con+amigos%2C+recaudaci%C3%B3n+de+fondos+ONG%2C+proyecci%C3%B3n+de+cortos%2C+para+ver+futbol%2C+ver+futbol+%2Ccumplea%C3%B1os+y+fiestas%2CFiestas+de+cumplea%C3%B1os%2Ckdd%2Ccocteles%2Cofertas+copas%2CHALLOWEEN+2010%2C+fiesta+halloween%2C+Alfred+Hitchcock%2C+Psicosis%2C+Fiesta+nochevieja+2010%2C+Fiesta+del+oeste%2C+fiesta+vaquera%2C+ultimo+jueves+e+mes%2C+Kedin.es';
var metaContents  = 'El+sitio+ideal+para+celebrar+una+fiestas+con+tus+amigos%2C+fiestas++privadas+y+fiestas+de+cumplea%C3%B1os%2C+aniversarios%2C+despedidas%2C+bodas%2C+KDD%C2%B4s';
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();
};

