/* [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','4614',jdecode('Page+d%26%23x27%3Baccueil'),jdecode(''),'/4614.html','true',[],'',''],
	['PAGE','307601',jdecode('Actualit%C3%A9+2010'),jdecode(''),'/307601/index.html','true',[ 
		['PAGE','243501',jdecode('Archives+2009'),jdecode(''),'/307601/243501.html','true',[],'',''],
		['PAGE','186001',jdecode('Archives+2008'),jdecode(''),'/307601/186001.html','true',[],'',''],
		['PAGE','77601',jdecode('Archives+2007+'),jdecode(''),'/307601/77601.html','true',[],'',''],
		['PAGE','14676',jdecode('Archives+2006'),jdecode(''),'/307601/14676.html','true',[],'','']
	],'',''],
	['PAGE','308501',jdecode('Les+Belles+photos+2010'),jdecode(''),'/308501/index.html','true',[ 
		['PAGE','246501',jdecode('Archives+belles+photos+2009'),jdecode(''),'/308501/246501.html','true',[],'',''],
		['PAGE','187401',jdecode('Archives+belles+photos+2008'),jdecode(''),'/308501/187401.html','true',[],'',''],
		['PAGE','81901',jdecode('Archives+belles+photos+2007'),jdecode(''),'/308501/81901.html','true',[],'',''],
		['PAGE','14384',jdecode('Archives+belles+photos+2006'),jdecode(''),'/308501/14384.html','true',[],'','']
	],'',''],
	['PAGE','102001',jdecode('Les+vid%C3%A9os'),jdecode(''),'/102001.html','true',[],'',''],
	['PAGE','243522',jdecode('L%26%23x27%3BAtelier+%28Montage+et+R%C3%A9glage%29'),jdecode(''),'/243522.html','true',[],'',''],
	['PAGE','304401',jdecode('Carburant+LABEMA'),jdecode(''),'/304401.html','true',[],'',''],
	['PAGE','310401',jdecode('Le+Team+Pilote'),jdecode(''),'/310401.html','true',[],'',''],
	['PAGE','326515',jdecode('Pi%C3%A8ces+%22+Tuning+L%C3%BCthi+%22'),jdecode(''),'/326515.html','true',[],'',''],
	['PAGE','53822',jdecode('Les+Bons+CADEAUX'),jdecode(''),'/53822.html','true',[],'',''],
	['PAGE','55243',jdecode('Peinture+personnalis%C3%A9e'),jdecode(''),'/55243.html','true',[],'',''],
	['PAGE','53801',jdecode('Les+occasions'),jdecode(''),'/53801/index.html','true',[ 
		['PAGE','55201',jdecode('H%C3%A9licopt%C3%A8res+et+autres'),jdecode(''),'/53801/55201.html','true',[],'','']
	],'',''],
	['PAGE','17995',jdecode('Contact+et+Liens'),jdecode(''),'/17995/index.html','true',[ 
		['PAGE','18231',jdecode('Contact+%28Folgeseite%29'),jdecode(''),'/17995/18231.html','false',[],'','']
	],'',''],
	['PAGE','148506',jdecode('Signer+le+Livre+d%26%23x27%3BOR'),jdecode(''),'/148506/index.html','true',[ 
		['PAGE','148501',jdecode('Les+messages+du+livre+d%26%23x27%3BOR'),jdecode(''),'/148506/148501.html','false',[],'','']
	],'',''],
	['PAGE','185901',jdecode('Acc%C3%A8s+routier+jusqu%26%23x27%3B%C3%A0+l%26%23x27%3B%C3%A9cole'),jdecode(''),'/185901.html','true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Logg';
theSitetree.paletteFamily='3D4B78';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='421';
theSitetree.graphicsetId='468';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3D4B78';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Logg',
				paletteFamily: 	'3D4B78',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'421',
				graphicsetId: 	'468',
				contentColor: 	'FFFFFF',
				contentBGColor: '3D4B78',
				a_color: 		'3D4B78',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4614',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4614',
internalId:  '',
customField: '20100309-223634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '308501',
internalId:  '',
customField: '20100106-230119'
};
webappMappings['1501']=webappMappings['1501-238043']={
webappId:    '1501',
documentId:  '4614',
internalId:  '238043',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '307601',
internalId:  '',
customField: '20100309-220803'
};
webappMappings['1002']=webappMappings['1002-148506abw0x0inxsso']={
webappId:    '1002',
documentId:  '148506',
internalId:  '148506abw0x0inxsso',
customField: 'icq=false'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '185901',
internalId:  'routing',
customField: 'fr_FR'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '310401',
internalId:  '',
customField: '20100113-002759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '243501',
internalId:  '',
customField: '20091223-085523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '186001',
internalId:  '',
customField: '20081224-095342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77601',
internalId:  '',
customField: '20080104-234736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14676',
internalId:  '',
customField: '20070425-081339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '246501',
internalId:  '',
customField: '20091224-001615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '187401',
internalId:  '',
customField: '20081130-195946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81901',
internalId:  '',
customField: '20080105-004518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14384',
internalId:  '',
customField: '20061231-210510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55243',
internalId:  '',
customField: '20070120-204727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '243522',
internalId:  '',
customField: '20091224-001649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102001',
internalId:  '',
customField: '20100215-110408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17995',
internalId:  '',
customField: '20100118-003504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18231',
internalId:  '',
customField: '20060209-205138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53822',
internalId:  '',
customField: '20091224-001830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '326515',
internalId:  '',
customField: '20100303-225958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53801',
internalId:  '',
customField: '20080706-162950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55201',
internalId:  '',
customField: '20100221-223410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148506',
internalId:  '',
customField: '20070629-000759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148501',
internalId:  '',
customField: '20070629-000759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '185901',
internalId:  '',
customField: '20080102-172355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '304401',
internalId:  '',
customField: '20091224-001442'
};
webappMappings['7008']=webappMappings['7008-2766']={
webappId:    '7008',
documentId:  '17995',
internalId:  '2766',
customField: 'language:fr;country:FR;'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXSSO';
var companyName   = 'ECOLE+DE+PILOTAGE++www.dochelico.ch++';
var htmlTitle	  = 'www.dochelico.ch';
var metaKeywords  = 'ecole+de+pilotage%2Cdochelico.ch%2Claurent%2C+gras%2Ccours+rc%2C+doublecommande+heli+www.dochelico.com%2Cwww.dochelico.ch%2Cdochelico%2Capprendre+a+voler%2Cecole+rc%2C+%2C+pilotage%2Cecole%2Cwww.dochelico.ch%2Craptorhelico%2Cairskipper%2Cwww.dochelico.ch%2C+ecole+rc+helico%2C+ecolage+rc+helico%2C+ecolage+rc%2C+double+commande+helico+rc%2C+';
var metaContents  = 'ecole+de+pilotage%2Cdochelico.ch.+www.dochelico.com%2Cwww.dochelico.ch%2Cdochelico%2Capprendre+a+voler%2C+ecole+rc+%2C++ecolehelicoptere%2C+pilotage%2Cecole%2C+www.dochelico.ch%2C+ecole+rc+helico%2C+ecolage+rc+helico%2C+ecolage+rc%2C+';
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();
};
