/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','3501',jdecode('Me+in+a+nutshell'),jdecode(''),'/3501.html','true',[],'',''],
	['PAGE','30412',jdecode('Services'),jdecode(''),'/30412.html','true',[],'',''],
	['PAGE','1901',jdecode('Resources'),jdecode(''),'/1901/index.html','true',[ 
		['PAGE','10901',jdecode('Ref'),jdecode(''),'/1901/10901.html','true',[],'',''],
		['PAGE','10943',jdecode('Tools'),jdecode(''),'/1901/10943.html','true',[],'',''],
		['PAGE','10964',jdecode('Translator+webs'),jdecode(''),'/1901/10964.html','true',[],'',''],
		['PAGE','10985',jdecode('Blogs'),jdecode(''),'/1901/10985.html','true',[],'','']
	],'',''],
	['PAGE','4301',jdecode('Freeware'),jdecode(''),'/4301.html','true',[],'',''],
	['PAGE','2301',jdecode('Tips+and+tricks'),jdecode(''),'/2301/index.html','true',[ 
		['PAGE','7901',jdecode('Google'),jdecode(''),'/2301/7901.html','true',[],'',''],
		['PAGE','7922',jdecode('Word'),jdecode(''),'/2301/7922.html','true',[],'',''],
		['PAGE','7943',jdecode('Excel'),jdecode(''),'/2301/7943.html','true',[],'',''],
		['PAGE','7964',jdecode('Win+Explorer'),jdecode(''),'/2301/7964.html','true',[],'',''],
		['PAGE','25401',jdecode('Trados'),jdecode(''),'/2301/25401.html','true',[],'','']
	],'',''],
	['PAGE','23501',jdecode('My+stuff'),jdecode(''),'/23501.html','true',[],'',''],
	['PAGE','11006',jdecode('Job+Hunting'),jdecode(''),'/11006.html','true',[],'',''],
	['PAGE','15801',jdecode('Blog'),jdecode(''),'/15801.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Airplane';
theSitetree.paletteFamily='FFFFFF';
theSitetree.keyvisualId='10200';
theSitetree.keyvisualName='airplane_vintage.swf';
theSitetree.fontsetId='21114';
theSitetree.graphicsetId='13212';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='C9C0A6';
var localeDef={
  language: 'es',
  country: 'ES'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Airplane',
				paletteFamily: 	'FFFFFF',
				keyvisualId: 	'10200',
				keyvisualName: 	'airplane_vintage.swf',
				fontsetId: 		'21114',
				graphicsetId: 	'13212',
				contentColor: 	'000000',
				contentBGColor: 'C9C0A6',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100826-215809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7922',
internalId:  '',
customField: '20100329-181919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7943',
internalId:  '',
customField: '20081204-010606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20090715-205705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2301',
internalId:  '',
customField: '20081204-002811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11006',
internalId:  '',
customField: '20090814-181540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4301',
internalId:  '',
customField: '20091115-115624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3501',
internalId:  '',
customField: '20100826-220711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20100826-212559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7964',
internalId:  '',
customField: '20090407-180921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23501',
internalId:  '',
customField: '20100826-212852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10964',
internalId:  '',
customField: '20100130-120146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10943',
internalId:  '',
customField: '20090719-192343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10901',
internalId:  '',
customField: '20090715-204954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30412',
internalId:  '',
customField: '20100826-220917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10985',
internalId:  '',
customField: '20090816-200101'
};
webappMappings['7050']=webappMappings['7050-5762']={
webappId:    '7050',
documentId:  '15801',
internalId:  '5762',
customField: 'language:es;country:ES;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20100327-153005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20091115-120654'
};
var canonHostname = 'llwc535.servidoresdns.net';
var accountId     = 'AARS20IN3PJT';
var companyName   = 'bonding+through+words%3A+translation+resources';
var htmlTitle	  = 'Bonding+thru+the+word';
var metaKeywords  = 'Palabras+clave++from+spanish+to+english++english+to+translation++translate+english+to+spanish++language+translation+services++online+translation+services++translation+services++professional+translation+services+from++business+translation+services++translation+services+europe++translation+service+online++translation+service++spanish+translation+service++translation+service+europe++language+translation++translation++translation+localization++spanish+translation++translation+agencies++translation+companies++translation+company++international+translation++translation+contract++business+translation++document+translation++financial+translation++professional+spanish+translation++translation+software++website+language+translation++foreign+language+translation++languages+translation++translation+help++professional+translation++website+translation+spanish++web+translation++translation+web+site++website+translation++engineering+translation++manual+translation++medical+translation++translation+agencies+europe++translation+companies+europe++translation+firm++industrial+translation++translation+company+europe++translation+quote++spanish+translations+for++website+translations++language+translations++professional+translations++translations++spanish+translations++document+translations++translations+companies++translations+services++business+translations++translations+contract++translations+medical++translator++translator+language++international+translator++professional+translator++spanish+translator++spanish+language+translator++contract+translator++medical+translator++outsourced+translator++technical+translator++specialized+translator++translator+commercial++translators++spanish+translators++language+translators++legal+translators++technical+translators++translators+outsourced++commercial+translators++translators+contract++translators+specialized++translating+text++translating++translating+languages++translating+language++translating+service++translating+services++translating+companies++translating+company++translating+contract++translating+legal++medical+translating++technical+translating++translating+business++localization+testing++localization++localization+service++localization+tools++software+localization++website+localization++c%23+localization++asp+net+localization++localization+companies++symphony+software++software++outsource+software++software+localisation++interpreters++translate++translate+web++translate+website++sdl++translater';
var metaContents  = 'translation%2C+localization%2C+foreign+languages';
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();
};
