/* [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','401',jdecode('Orthop%C3%A9die'),jdecode(''),'/401/index.html','true',[ 
		['PAGE','65601',jdecode('Principe+d%26%23x27%3Baplomb'),jdecode(''),'/401/65601.html','true',[],'',''],
		['PAGE','65622',jdecode('Complications+pathologiques'),jdecode(''),'/401/65622.html','true',[],'',''],
		['PAGE','65643',jdecode('Principe+de+correction'),jdecode(''),'/401/65643.html','true',[],'',''],
		['PAGE','56701',jdecode('Compte+rendu'),jdecode(''),'/401/56701.html','true',[],'','']
	],'',''],
	['PAGE','557',jdecode('Prestations'),jdecode(''),'/557/index.html','true',[ 
		['PAGE','56722',jdecode('Diagnostic'),jdecode(''),'/557/56722.html','true',[],'',''],
		['PAGE','56743',jdecode('Traitement'),jdecode(''),'/557/56743.html','true',[],'',''],
		['PAGE','53901',jdecode('Contact'),jdecode(''),'/557/53901.html','true',[],'','']
	],'',''],
	['PAGE','494',jdecode('Formation'),jdecode(''),'/494/index.html','true',[ 
		['PAGE','45301',jdecode('Descriptif'),jdecode(''),'/494/45301.html','true',[],'',''],
		['PAGE','53801',jdecode('Inscription'),jdecode(''),'/494/53801.html','true',[],'',''],
		['PAGE','64701',jdecode('CG'),jdecode(''),'/494/64701.html','true',[],'','']
	],'',''],
	['PAGE','63601',jdecode('Boutique'),jdecode(''),'/63601.html','true',[],'',''],
	['PAGE','54701',jdecode('Science'),jdecode(''),'/54701/index.html','false',[ 
		['PAGE','452',jdecode('Des+aplombs'),jdecode(''),'/54701/452.html','true',[],'',''],
		['PAGE','55101',jdecode('Physiologie'),jdecode(''),'/54701/55101.html','true',[],'',''],
		['PAGE','55122',jdecode('Anatomie'),jdecode(''),'/54701/55122.html','true',[],'',''],
		['PAGE','55201',jdecode('Orientation'),jdecode(''),'/54701/55201.html','true',[],'','']
	],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='555454';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10892';
theSitetree.contentColor='555454';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'555454',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10892',
				contentColor: 	'555454',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'555454',
				e_color: 		'555454',
				f_color: 		'555454',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090716-073156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20091207-123321'
};
webappMappings['7008']=webappMappings['7008-3415']={
webappId:    '7008',
documentId:  '53901',
internalId:  '3415',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20090622-204218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20090320-215322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45301',
internalId:  '',
customField: '20090505-111425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53801',
internalId:  '',
customField: '20090505-104054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53901',
internalId:  '',
customField: '20090320-151104'
};
webappMappings['7050']=webappMappings['7050-593']={
webappId:    '7050',
documentId:  '54701',
internalId:  '593',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54701',
internalId:  '',
customField: '20090321-125443'
};
webappMappings['7008']=webappMappings['7008-3413']={
webappId:    '7008',
documentId:  '53801',
internalId:  '3413',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55201',
internalId:  '',
customField: '20090321-132248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55101',
internalId:  '',
customField: '20090321-133832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55122',
internalId:  '',
customField: '20090321-133812'
};
webappMappings['7060']=webappMappings['7060-57db5a51b9bda64e0a2cb5c530a2e8e6']={
webappId:    '7060',
documentId:  '56701',
internalId:  '57db5a51b9bda64e0a2cb5c530a2e8e6',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56722',
internalId:  '',
customField: '20090412-165938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56701',
internalId:  '',
customField: '20090622-220852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56743',
internalId:  '',
customField: '20090320-220423'
};
webappMappings['4001']=webappMappings['4001-29157637']={
webappId:    '4001',
documentId:  '63601',
internalId:  '29157637',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63601',
internalId:  '',
customField: '20091123-152939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64701',
internalId:  '',
customField: '20090505-110310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65622',
internalId:  '',
customField: '20090622-223950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65601',
internalId:  '',
customField: '20090622-223910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65643',
internalId:  '',
customField: '20090623-210245'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2BIY';
var companyName   = 'www.sos-sabot.com';
var htmlTitle	  = 'sos-sabot+s%C3%A0rl+-++orthop%C3%A9die+%C3%A9quine';
var metaKeywords  = 'sabot%2C+fourbure%2C+boiterie%2C+abc%3Fs%2C+cheval%2C+chevaux%2C+orthop%3Fdie%2C+%3Fquine%2C+paralysie%2C+blessure%2C+maladie%2C+sos-sabot%2C+Claudine%2C+Herzog%2C+d%3Fformation%2C+physiologique%2C+tendinite%2C+seimes%2C+sabot%2C+cass%3F%2C+pied%2C+nu%2C+d%3Ffaut+daplomb%2C+tares%2C+naviculaire%2C+pathologie%2C+du+pied%2C+arthrose%2C+pied-bot%2C+encastelure%2C+fourmili%3Fre%2C+pourriture%2C+pododermatite%2C+crevasses%2C+%3Fne%2C+poulain%2C+gale+de+boue%2C+bleimes%2C+%3Ftonnement%2C+piq%3Fre%2C+atteints%2C+entorses%2C+ferrure%2C+fractures%2C+fourchette%2C+couronne%2C+tendons%2C+nerf%2C+nerectomie%2C+parois%2C+sec%2C+cassante%2C+talon%2C+pododerme%2C+tige%2C+pince%2C+cartier%2C+pieds%2C+plat%2C+poney%2C+enflure%2C+traitement%2C+articulation%2C+%3Fquid%3F%2C+orthop%3Fdiste%2C+sabot+du+cheval';
var metaContents  = 'sos-sabot.com+dispose+dune+haute+comp%3Ftence+dans+le+domaine+de+lorthop%3Fdie+%3Fquine.+Des+boiteries+et+des+blessures+ainsi+que+des+maladies+au+sabot+peuvent+%3Ftre+r%3Ftablis+par+ce+traitement.';
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();
};
