/* [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 theSitetree=[ 
	['PAGE','1506',jdecode('Inicio'),jdecode(''),'/1506.html','true',[],''],
	['PAGE','1563',jdecode('Nosotros'),jdecode(''),'/1563.html','true',[],''],
	['PAGE','33602',jdecode('Misi%C3%B3n'),jdecode(''),'/33602.html','true',[],''],
	['PAGE','1590',jdecode('Productos'),jdecode(''),'/1590/index.html','true',[ 
		['PAGE','1617',jdecode('Persianas+de+Bamb%C3%BA'),jdecode(''),'/1590/1617.html','true',[],''],
		['PAGE','1644',jdecode('Persianas+de+Madera+2%22'),jdecode(''),'/1590/1644.html','true',[],''],
		['PAGE','1671',jdecode('Imitacion+Madera'),jdecode(''),'/1590/1671.html','true',[],''],
		['PAGE','2028',jdecode('Persianas+Romanas'),jdecode(''),'/1590/2028.html','true',[],''],
		['PAGE','2055',jdecode('Paneles+Deslizantes'),jdecode(''),'/1590/2055.html','true',[],''],
		['PAGE','2082',jdecode('Persianas+Enrollables'),jdecode(''),'/1590/2082.html','true',[],''],
		['PAGE','2109',jdecode('Persianas+Aluminio+1%22'),jdecode(''),'/1590/2109.html','true',[],''],
		['PAGE','2136',jdecode('Persianas+Plisadas'),jdecode(''),'/1590/2136.html','true',[],''],
		['PAGE','2163',jdecode('Persianas+Celulares'),jdecode(''),'/1590/2163.html','true',[],''],
		['PAGE','2190',jdecode('Persianas+Verticales'),jdecode(''),'/1590/2190.html','true',[],''],
		['PAGE','2217',jdecode('Puertas+Plegables+de+PVC'),jdecode(''),'/1590/2217.html','true',[],''],
		['PAGE','63226',jdecode('Persianas+ciclonicas'),jdecode(''),'/1590/63226.html','true',[],''],
		['PAGE','63235',jdecode('Toldos'),jdecode(''),'/1590/63235.html','true',[],''],
		['PAGE','34702',jdecode('Shutter'),jdecode(''),'/1590/34702.html','true',[],''],
		['PAGE','34729',jdecode('Piso+Laminado'),jdecode(''),'/1590/34729.html','true',[],''],
		['PAGE','34756',jdecode('Alfombra'),jdecode(''),'/1590/34756.html','true',[],''],
		['PAGE','48215',jdecode('++Motorizacion'),jdecode(''),'/1590/48215.html','true',[],''],
		['PAGE','38018',jdecode('Muestrarios'),jdecode(''),'/1590/38018.html','true',[],''],
		['PAGE','34783',jdecode('Mantenimiento'),jdecode(''),'/1590/34783.html','true',[],'']
	],''],
	['PAGE','10564',jdecode('Promociones+del+mes'),jdecode(''),'/10564.html','true',[],''],
	['PAGE','36115',jdecode('Instituciones'),jdecode(''),'/36115.html','true',[],''],
	['PAGE','45215',jdecode('Consejos'),jdecode(''),'/45215.html','true',[],''],
	['PAGE','39415',jdecode('Galeria+Fotos'),jdecode(''),'/39415.html','true',[],''],
	['PAGE','1698',jdecode('Contactenos'),jdecode(''),'/1698/index.html','true',[ 
		['PAGE','5438',jdecode('Contacto+%28follow+up+page%29'),jdecode(''),'/1698/5438.html','false',[],'']
	],'']];
var siteelementCount=29;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='86862D';
theSitetree.keyvisualId='983';
theSitetree.keyvisualName='alte_moebel.jpg';
theSitetree.fontsetId='167';
theSitetree.graphicsetId='196';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				name: 			'NewYork',
				paletteFamily: 	'86862D',
				keyvisualId: 	'983',
				keyvisualName: 	'alte_moebel.jpg',
				fontsetId: 		'167',
				graphicsetId: 	'196',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'86862D',
				c_color: 		'000000',
				d_color: 		'2C331B',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63226',
internalId:  '',
customField: '20090624-160511'
};
webappMappings['1501']=webappMappings['1501-87103']={
webappId:    '1501',
documentId:  '1506',
internalId:  '87103',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1506',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-df032a563d37d467db6d24af1096815e']={
webappId:    '7060',
documentId:  '39415',
internalId:  'df032a563d37d467db6d24af1096815e',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1506',
internalId:  '',
customField: '20090624-161924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10564',
internalId:  '',
customField: '20090921-081633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1563',
internalId:  '',
customField: '20050910-135250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33602',
internalId:  '',
customField: '20050421-172911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1590',
internalId:  '',
customField: '20090624-160940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1617',
internalId:  '',
customField: '20090715-140428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1644',
internalId:  '',
customField: '20070905-150336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1671',
internalId:  '',
customField: '20070618-225804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2028',
internalId:  '',
customField: '20060202-010635'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2055',
internalId:  '',
customField: '20050328-120240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2082',
internalId:  '',
customField: '20050328-120743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2109',
internalId:  '',
customField: '20050421-160204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2136',
internalId:  '',
customField: '20050627-153658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2163',
internalId:  '',
customField: '20050328-121959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2190',
internalId:  '',
customField: '20090715-141141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2217',
internalId:  '',
customField: '20050328-122153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34702',
internalId:  '',
customField: '20050910-140405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34729',
internalId:  '',
customField: '20050421-163558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34756',
internalId:  '',
customField: '20050421-164456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34783',
internalId:  '',
customField: '20060902-150503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38018',
internalId:  '',
customField: '20090624-161322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48215',
internalId:  '',
customField: '20070618-232603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36115',
internalId:  '',
customField: '20080827-105107'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45215',
internalId:  '',
customField: '20090501-155213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39415',
internalId:  '',
customField: '20050528-144423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63235',
internalId:  '',
customField: '20090624-160511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1698',
internalId:  '',
customField: '20080603-112401'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5438',
internalId:  '',
customField: '20050328-122239'
};
webappMappings['7008']=webappMappings['7008-7184']={
webappId:    '7008',
documentId:  '1698',
internalId:  '7184',
customField: 'language:es;country:ES;'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INXXFS';
var companyName   = '';
var htmlTitle	  = 'persianas+%2C+cortinas+en+monterrey+%2C+persianas+en+monterrey+%2C+motorizacion';
var metaKeywords  = 'persianas%2C+decoracion%2C+alfombras%2C+pisos+laminado%2C+decoracion%2C+ventanas%2C+persianas+en+monterrey%2C+persianas+en+todo+mexico+%2C+Motorizacion+de+persianas';
var metaContents  = 'persianas+%2C+persianas+en+monterrey+%2C+mexico+%2C+enrrollables%2C+celulares+%2C+Motorizacion%2C+plisadas%2C+madera%2C++horizontales+%2C+piso+laminado+%2C+persianas+en+todo+mexico';
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();
};
