/* [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','12601',jdecode('Accueil'),jdecode(''), jdecode('%2F12601.html'), 'true',[],'',''],
	['PAGE','11922',jdecode('Nos+s%C3%A9minaires'),jdecode(''), jdecode('%2F11922%2Findex.html'), 'true',[ 
		['PAGE','11964',jdecode('Teambuilding'),jdecode(''), jdecode('%2F11922%2F11964.html'), 'true',[],'',''],
		['PAGE','11943',jdecode('Leadership'),jdecode(''), jdecode('%2F11922%2F11943.html'), 'true',[],'','']
	],'',''],
	['PAGE','12673',jdecode('Equiway%2C+c%26%23x27%3Best....'),jdecode(''), jdecode('%2F12673%2Findex.html'), 'true',[ 
		['PAGE','9001',jdecode('Nous'),jdecode(''), jdecode('%2F12673%2F9001.html'), 'true',[],'',''],
		['PAGE','22701',jdecode('Nos+chevaux'),jdecode(''), jdecode('%2F12673%2F22701.html'), 'true',[],'',''],
		['PAGE','22722',jdecode('Nos+valeurs'),jdecode(''), jdecode('%2F12673%2F22722.html'), 'true',[],'','']
	],'',''],
	['PAGE','22743',jdecode('Nos+objectifs'),jdecode(''), jdecode('%2F22743.html'), 'true',[],'',''],
	['PAGE','21101',jdecode('Infos+pratiques'),jdecode(''), jdecode('%2F21101.html'), 'true',[],'',''],
	['PAGE','11985',jdecode('Contacts+et+Liens'),jdecode(''), jdecode('%2F11985.html'), 'true',[],'',''],
	['PAGE','27201',jdecode('++++++++++IN++ENGLISH+NOW+'),jdecode(''), jdecode('%2F27201.html'), 'true',[],'',''],
	['PAGE','22001',jdecode('Welcome'),jdecode(''), jdecode('%2F22001.html'), 'true',[],'',''],
	['PAGE','25401',jdecode('Our+Seminars'),jdecode(''), jdecode('%2F25401%2Findex.html'), 'true',[ 
		['PAGE','25422',jdecode('Team+Building'),jdecode(''), jdecode('%2F25401%2F25422.html'), 'true',[],'',''],
		['PAGE','25443',jdecode('Leadership'),jdecode(''), jdecode('%2F25401%2F25443.html'), 'true',[],'','']
	],'',''],
	['PAGE','25464',jdecode('Equiway+is....'),jdecode(''), jdecode('%2F25464%2Findex.html'), 'true',[ 
		['PAGE','25485',jdecode('Us'),jdecode(''), jdecode('%2F25464%2F25485.html'), 'true',[],'',''],
		['PAGE','25506',jdecode('Our+horses'),jdecode(''), jdecode('%2F25464%2F25506.html'), 'true',[],'',''],
		['PAGE','25527',jdecode('Our+values'),jdecode(''), jdecode('%2F25464%2F25527.html'), 'true',[],'','']
	],'',''],
	['PAGE','25548',jdecode('Our+objectives'),jdecode(''), jdecode('%2F25548.html'), 'true',[],'',''],
	['PAGE','25569',jdecode('Practical+information'),jdecode(''), jdecode('%2F25569.html'), 'true',[],'',''],
	['PAGE','25590',jdecode('Contacts+and+links'),jdecode(''), jdecode('%2F25590.html'), 'true',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Trend';
theSitetree.paletteFamily='929192';
theSitetree.keyvisualId='7928';
theSitetree.keyvisualName='kv_7928.jpg';
theSitetree.fontsetId='16910';
theSitetree.graphicsetId='12327';
theSitetree.contentColor='555455';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Trend',
				paletteFamily: 	'929192',
				keyvisualId: 	'7928',
				keyvisualName: 	'kv_7928.jpg',
				fontsetId: 		'16910',
				graphicsetId: 	'12327',
				contentColor: 	'555455',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22701',
internalId:  '',
customField: '20100426-101940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20100427-124034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20100408-193328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11922',
internalId:  '',
customField: '20100416-110626'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12673',
internalId:  '',
customField: '20100408-093424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11964',
internalId:  '',
customField: '20100408-010503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11943',
internalId:  '',
customField: '20100427-125152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22722',
internalId:  '',
customField: '20100407-234815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21101',
internalId:  '',
customField: '20100408-193434'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '12601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11985',
internalId:  '',
customField: '20100413-100347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22001',
internalId:  '',
customField: '20100427-124225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22743',
internalId:  '',
customField: '20100416-111829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25401',
internalId:  '',
customField: '20100409-092922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25422',
internalId:  '',
customField: '20100408-092027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25443',
internalId:  '',
customField: '20100427-125119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25464',
internalId:  '',
customField: '20100408-010947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25485',
internalId:  '',
customField: '20100412-185956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25506',
internalId:  '',
customField: '20100426-102147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25527',
internalId:  '',
customField: '20100408-193854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25548',
internalId:  '',
customField: '20100416-111904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25569',
internalId:  '',
customField: '20100408-194002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25590',
internalId:  '',
customField: '20100412-203908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27201',
internalId:  '',
customField: '20100408-012315'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW330INEIX0';
var companyName   = 'EQUIWAY';
var htmlTitle	  = '';
var metaKeywords  = 'leadership+teambuilding+horses+chevaux+professional+education+formation+professionnelle%0D%0Ad%C3%A9veloppement+personnel+';
var metaContents  = 'Formation+et+d%C3%A9veloppement+professionnel+et+personnel+assist%C3%A9+par+les+chevaux%0D%0AHorse+Assisted+Personal+and+professional+development+%0D%0AThe+Art+of+Leadership%0D%0ATeambuilding+Experience';
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();
};

