/* [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','4598',jdecode('INICIO'),jdecode(''),'/4598.html','true',[],'',''],
	['PAGE','4655',jdecode('QUIENES+SOMOS'),jdecode(''),'/4655.html','true',[],'',''],
	['PAGE','4682',jdecode('IMP.SOCIALES'),jdecode(''),'/4682/index.html','true',[ 
		['PAGE','249501',jdecode('BODA'),jdecode(''),'/4682/249501.html','true',[],'',''],
		['PAGE','82656',jdecode('XV+ANOS'),jdecode(''),'/4682/82656.html','true',[],'',''],
		['PAGE','69130',jdecode('GRADUACION'),jdecode(''),'/4682/69130.html','true',[],'',''],
		['PAGE','69139',jdecode('BAUTIZO'),jdecode(''),'/4682/69139.html','true',[],'',''],
		['PAGE','69148',jdecode('BABY+SHOWER+Y+NEW+BORN'),jdecode(''),'/4682/69148.html','true',[],'',''],
		['PAGE','69157',jdecode('PAPELERIA+PERSONAL'),jdecode(''),'/4682/69157.html','true',[],'',''],
		['PAGE','69166',jdecode('TARJETAS+INFANTILES'),jdecode(''),'/4682/69166.html','true',[],'',''],
		['PAGE','69175',jdecode('PRIMERA+COMUNION'),jdecode(''),'/4682/69175.html','true',[],'',''],
		['PAGE','124101',jdecode('NAVIDAD'),jdecode(''),'/4682/124101.html','true',[],'',''],
		['PAGE','127301',jdecode('DESPEDIDA+DE+SOLTERA'),jdecode(''),'/4682/127301.html','true',[],'','']
	],'',''],
	['PAGE','4709',jdecode('IMP.COMERCIALES'),jdecode(''),'/4709/index.html','true',[ 
		['PAGE','69184',jdecode('FACTURAS+Y+RECIBOS'),jdecode(''),'/4709/69184.html','true',[],'',''],
		['PAGE','69193',jdecode('VOLANTES+Y+FOLLETOS'),jdecode(''),'/4709/69193.html','true',[],'',''],
		['PAGE','69202',jdecode('RECETARIOS+MEDICOS'),jdecode(''),'/4709/69202.html','true',[],'',''],
		['PAGE','69211',jdecode('ETIQUETAS'),jdecode(''),'/4709/69211.html','true',[],'',''],
		['PAGE','69220',jdecode('TARJETAS+DE+PRESENTACON'),jdecode(''),'/4709/69220.html','true',[],'',''],
		['PAGE','130101',jdecode('BOLETOS'),jdecode(''),'/4709/130101.html','true',[],'',''],
		['PAGE','130122',jdecode('HOJAS+Y+SOBRES+MEMBRETADOS'),jdecode(''),'/4709/130122.html','true',[],'',''],
		['PAGE','130143',jdecode('NOTAS+Y+ORDENES+DE+COMPRA'),jdecode(''),'/4709/130143.html','true',[],'',''],
		['PAGE','130164',jdecode('REMISIONES'),jdecode(''),'/4709/130164.html','true',[],'',''],
		['PAGE','130501',jdecode('DIPLOMAS'),jdecode(''),'/4709/130501.html','true',[],'','']
	],'',''],
	['PAGE','4736',jdecode('CONT%C3%81CTANOS'),jdecode(''),'/4736/index.html','true',[ 
		['PAGE','38576',jdecode('CONT%C3%81CTANOS+%28follow+up+page%29'),jdecode(''),'/4736/38576.html','false',[],'','']
	],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Comedy';
theSitetree.paletteFamily='98814F';
theSitetree.keyvisualId='2805';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='10422';
theSitetree.graphicsetId='10720';
theSitetree.contentColor='F4F1EA';
theSitetree.contentBGColor='B19B69';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Comedy',
				paletteFamily: 	'98814F',
				keyvisualId: 	'2805',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'10422',
				graphicsetId: 	'10720',
				contentColor: 	'F4F1EA',
				contentBGColor: 'B19B69',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'705F3A',
				e_color: 		'705F3A',
				f_color: 		'705F3A',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '249501',
internalId:  '',
customField: '20090913-193747'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4598',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20070614-152538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4682',
internalId:  '',
customField: '20100617-192834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4655',
internalId:  '',
customField: '20090323-172854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82656',
internalId:  '',
customField: '20100617-194431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69130',
internalId:  '',
customField: '20090326-131409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69139',
internalId:  '',
customField: '20080226-191622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69148',
internalId:  '',
customField: '20080220-162159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69157',
internalId:  '',
customField: '20070115-175221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69166',
internalId:  '',
customField: '20080701-135833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69175',
internalId:  '',
customField: '20080225-125030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124101',
internalId:  '',
customField: '20081112-180022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127301',
internalId:  '',
customField: '20070117-200422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4709',
internalId:  '',
customField: '20070117-162550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69184',
internalId:  '',
customField: '20070611-193041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69193',
internalId:  '',
customField: '20070613-153754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69202',
internalId:  '',
customField: '20070613-154250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69211',
internalId:  '',
customField: '20070613-154808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69220',
internalId:  '',
customField: '20070613-195123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130101',
internalId:  '',
customField: '20070613-195620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130122',
internalId:  '',
customField: '20070613-202449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130143',
internalId:  '',
customField: '20070613-203038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130164',
internalId:  '',
customField: '20070613-203650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '130501',
internalId:  '',
customField: '20070613-203838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4736',
internalId:  '',
customField: '20070117-162633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38576',
internalId:  '',
customField: '20060718-105151'
};
webappMappings['7008']=webappMappings['7008-10987']={
webappId:    '7008',
documentId:  '4736',
internalId:  '10987',
customField: 'language:es;country:ES;'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXSIR';
var companyName   = 'INVIT-ARTE...El+Arte+de+Imprimir';
var htmlTitle	  = '';
var metaKeywords  = '';
var metaContents  = '';
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();
};
