/* [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','410045',jdecode('w-Home'),jdecode(''),'/410045.html','true',[],'',''],
	['PAGE','410694',jdecode('IShop'),jdecode(''),'/410694.html','true',[],'',''],
	['PAGE','401825',jdecode('Cont%C3%A1ctanos'),jdecode(''),'/401825.html','true',[],'',''],
	['PAGE','410036',jdecode('rescate+rehen+colombia'),jdecode(''),'/410036.html','true',[],'',''],
	['PAGE','410724',jdecode('P%C3%A1gina+nueva'),jdecode(''),'/410724.html','true',[],'',''],
	['PAGE','410733',jdecode('P%C3%A1gina+nueva'),jdecode(''),'/410733.html','false',[],'',''],
	['PAGE','411503',jdecode('volcan+islandes'),jdecode(''),'/411503.html','true',[],'',''],
	['PAGE','411614',jdecode('sol'),jdecode(''),'/411614.html','true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10461';
theSitetree.graphicsetId='10892';
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: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10461',
				graphicsetId: 	'10892',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '410694',
internalId:  '',
customField: '20100324-233901'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '410045',
internalId:  '',
customField: '20100330-203801'
};
webappMappings['4001']=webappMappings['4001-15136819']={
webappId:    '4001',
documentId:  '410694',
internalId:  '15136819',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-69f8318cd28171188b41b7a90b8e8997']={
webappId:    '7060',
documentId:  '410036',
internalId:  '69f8318cd28171188b41b7a90b8e8997',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '410036',
internalId:  '',
customField: '20100209-205405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401825',
internalId:  '',
customField: '20100419-125459'
};
webappMappings['7008']=webappMappings['7008-1547']={
webappId:    '7008',
documentId:  '401825',
internalId:  '1547',
customField: 'language:es;country:ES;'
};
webappMappings['7060']=webappMappings['7060-5e76aa9fff2aec734a3116cff9ba219a']={
webappId:    '7060',
documentId:  '411503',
internalId:  '5e76aa9fff2aec734a3116cff9ba219a',
customField: 'language:es;country:ES;'
};
webappMappings['1003']=webappMappings['1003-avec10inxse81270cdb6c7d']={
webappId:    '1003',
documentId:  '410733',
internalId:  'avec10inxse81270cdb6c7d',
customField: 'es:ES'
};
webappMappings['7005']=webappMappings['7005-1426']={
webappId:    '7005',
documentId:  '410724',
internalId:  '1426',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '411503',
internalId:  '',
customField: '20100419-125348'
};
webappMappings['7060']=webappMappings['7060-3936d1d97666acc260d646fec2b64f7d']={
webappId:    '7060',
documentId:  '411614',
internalId:  '3936d1d97666acc260d646fec2b64f7d',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '411614',
internalId:  '',
customField: '20100422-163702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '410724',
internalId:  '',
customField: '20100419-125415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '410733',
internalId:  '',
customField: '20100226-193739'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXSE8';
var companyName   = 'w-In%C3%A9dita.com';
var htmlTitle	  = 'w-In%C3%A9dita+Comunicaci%C3%B3n';
var metaKeywords  = 'contenidos%2C+contenidos+digitales%2C+reportajes%2C+noticias%2C++entrevistas%2C+investigaciones%2C+prensa%2C+prensa+escrita%2C+fotograf%C3%ADa%2C+fotograf%C3%ADa+period%C3%ADstica%2C+periodismo%2C+comunidades%2C+comunidades+en+Facebook%2C+redes+sociales%2C++Twitter%2C+contenidos+para+blogs%2C+post+por++pago%2C++post+per+pay%2C+posts%2C+blogs%2C+blogging%2C+opiniones+profesionales%2C+opini%C3%B3n%2C+opinion%2C+opini%C3%B3n+period%C3%ADstica%2C++opinion+periodistica%2C+editorial%2C+editoriales%2C+editor%2C+editor+web%2C+editor+blog%2C+edici%C3%B3n+blog%2C+edici%C3%B3n%2C+edici%C3%B3n+period%C3%ADstica%2C++edicion+periodistica%2C+++inegocios%2C+i-negocios%2C+wsports%2C+w-sports%2C+infoqus%2C+ipeople%2C+i-people';
var metaContents  = 'w-In%C3%A9dita.com+w-In%C3%A9dita+Blog.+Comunicaci%C3%B3n+y+Contenidos+Digitales.+Reportajes%2C+Art%C3%ADculos+Period%C3%ADsticos%2C+Notas+Informativas%2C++Galer%C3%ADas%2C+Servicios+de+Comunicaci%C3%B3n.';
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();
};
