/* [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','701',jdecode('Home'),jdecode(''), jdecode('%2F701.html'), 'true',[],'',''],
	['PAGE','836',jdecode('Oficina+Virtual'),jdecode(''), jdecode('%2F836%2Findex.html'), 'true',[ 
		['PAGE','8301',jdecode('Planes'),jdecode(''), jdecode('%2F836%2F8301.html'), 'true',[],'','']
	],'',''],
	['PAGE','857',jdecode('Virtual+Offices+in+Mexico'),jdecode(''), jdecode('%2F857.html'), 'true',[],'',''],
	['PAGE','29801',jdecode('Requisitos+Contrataci%C3%B2n'),jdecode(''), jdecode('%2F29801.html'), 'true',[],'',''],
	['PAGE','878',jdecode('Centro+de+Negocios'),jdecode(''), jdecode('%2F878.html'), 'true',[],'',''],
	['PAGE','33401',jdecode('Contacto'),jdecode(''), jdecode('%2F33401.html'), 'true',[],'',''],
	['PAGE','8343',jdecode('Clientes+-+Casos+de+Exito'),jdecode(''), jdecode('%2F8343.html'), 'true',[],'',''],
	['PAGE','44301',jdecode('Boletines+y+Publicaciones'),jdecode(''), jdecode('%2F44301.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='FFCC33';
theSitetree.keyvisualId='959';
theSitetree.keyvisualName='telekommunikation.jpg';
theSitetree.fontsetId='167';
theSitetree.graphicsetId='199';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'es',
  country: 'ES'
};
var prodDef={
  wl_name: 'grp13-hostin',
  product: 'WSCVWLSSSLYTC2IW'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'NewYork',
				paletteFamily: 	'FFCC33',
				keyvisualId: 	'959',
				keyvisualName: 	'telekommunikation.jpg',
				fontsetId: 		'167',
				graphicsetId: 	'199',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000066',
				b_color: 		'FFCC33',
				c_color: 		'000000',
				d_color: 		'406BC0',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-3594']={
webappId:    '7008',
documentId:  '33401',
internalId:  '3594',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20101207-232042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '878',
internalId:  '',
customField: '20100617-193949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8343',
internalId:  '',
customField: '20100503-225836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33401',
internalId:  '',
customField: '20101207-232131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20090320-125732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8301',
internalId:  '',
customField: '20090826-104010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '857',
internalId:  '',
customField: '20100109-141924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29801',
internalId:  '',
customField: '20090423-191634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44301',
internalId:  '',
customField: '20100109-143426'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INZEUF';
var companyName   = '++++++SOLUCIONES+PARA+SU+NEGOCIO';
var htmlTitle	  = '';
var metaKeywords  = 'Oficinas+virtuales%2C+oficinas+f%C3%ADsicas%2C+oficinas%2C+oficina+virtual%2C+domicilio+fiscal%2C+oficinas+virtuales+mexico%2C+oficinas+virtuales+df%2C+reduccion+de+costos%2C+Oficinas+Virtuales+Mexico+DF%2C+alquiler+despachos%2C+centro+negocios%2C+oficinas+virtual%2C+oficinas+en+renta%2C+renta+oficinas%2C+aumento+de+utilidades%2C+oficina%2C+oficinas%2C+asesor%C3%ADas+y+consultor%C3%ADa+en+negocios%2C+ciudad+de+M%C3%A9xico%2C+DF%2C+Coyoac%C3%A1n%2C+Contabilidad%2C+Administraci%C3%B3n%2C+Procesos+administrativos%2C+Mercadotecnia%2C+reduccion+de+costos%2C+reduccion+de+gastos%2C+costos%2C+gastos%2C+recorte+de+gastos%2C+recorte+de+costos%2C+eliminar+costos%2C+eliminar+gastos%2C+contador+publico%2C+contadores+publicos%2C+bulmaro+crespo%2C+impuestos%2C+cut+cost%2C+reduction+cost%2C+reduction+expenses%2C+reduccion+de+gatos+empresa';
var metaContents  = 'Oficinas+virtuales%2C+Oficinas+Virtuales+en+M%C3%A9xico+DF%2C+oficina+virtual%2C+oficinas+virtuales+df%2C+domicilio+fiscal%2C++oficinas+virtuales+mexico%2C+oficinas+fisicas+renta+por+horas%2C+alquiler+despachos%2C+centro+negocios%2C+oficinas+virtual%2C+oficinas+en+renta%2C+domicilio+comercial+y+fiscal%2C+reduzca+gastos+con+una+oficina+virtual+con+contestacion+telefonica%2C+Ciudad+de+M%C3%A9xico%2C+DF%2C+Coyoac%C3%A1n.';
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();
};

