/* [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 theSitetree=[ 
	['PAGE','4479',jdecode('Comeback'),jdecode(''),'/4479.html','true',[],''],
	['PAGE','24609',jdecode('Concept'),jdecode(''),'/24609.html','true',[],''],
	['PAGE','28710',jdecode('Prestations'),jdecode(''),'/28710/index.html','true',[ 
		['PAGE','28737',jdecode('Th%C3%A9rapies'),jdecode(''),'/28710/28737.html','true',[],''],
		['PAGE','28764',jdecode('Pr%C3%A9paration+physique'),jdecode(''),'/28710/28764.html','true',[],''],
		['PAGE','28791',jdecode('Cours'),jdecode(''),'/28710/28791.html','true',[],'']
	],''],
	['PAGE','24871',jdecode('Tarifs'),jdecode(''),'/24871.html','true',[],''],
	['PAGE','9818',jdecode('Le+Team'),jdecode(''),'/9818.html','true',[],''],
	['PAGE','9845',jdecode('Nos+Locaux'),jdecode(''),'/9845.html','true',[],''],
	['PAGE','33262',jdecode('Comeback+en+images'),jdecode(''),'/33262.html','true',[],''],
	['PAGE','9899',jdecode('Liens'),jdecode(''),'/9899.html','true',[],''],
	['PAGE','9872',jdecode('Plan+d%26%23x27%3Bacc%C3%A8s'),jdecode(''),'/9872.html','true',[],''],
	['PAGE','9926',jdecode('Contact'),jdecode(''),'/9926.html','true',[],'']];
var siteelementCount=13;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='336699';
theSitetree.keyvisualId='1358';
theSitetree.keyvisualName='schwimmer.jpg';
theSitetree.fontsetId='235';
theSitetree.graphicsetId='284';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				name: 			'Startup',
				paletteFamily: 	'336699',
				keyvisualId: 	'1358',
				keyvisualName: 	'schwimmer.jpg',
				fontsetId: 		'235',
				graphicsetId: 	'284',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'336699',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4479',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9818',
internalId:  '',
customField: '20090208-213348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28710',
internalId:  '',
customField: '20070429-231658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4479',
internalId:  '',
customField: '20080103-210727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28791',
internalId:  '',
customField: '20090208-214122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9872',
internalId:  '',
customField: '20051211-220346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24609',
internalId:  '',
customField: '20090208-214749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28737',
internalId:  '',
customField: '20070917-224649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28764',
internalId:  '',
customField: '20080621-171059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24871',
internalId:  '',
customField: '20070502-000532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9845',
internalId:  '',
customField: '20070502-000638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33262',
internalId:  '',
customField: '20070430-004958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9899',
internalId:  '',
customField: '20070430-084139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9926',
internalId:  '',
customField: '20070502-000718'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXFE3';
var companyName   = '';
var htmlTitle	  = 'Comeback+Physioth%C3%A9rapie%2FPr%C3%A9paration+Physique';
var metaKeywords  = 'Comeback%2Fcome+back%2Fphysio%2Fla+tour%2FPhysioth%C3%A9rapie%2FPr%C3%A9paration+physique%2FEntrainement%2FLa+Tour-de-Peilz%2FVevey%2FSchmutz%2FWalter%2Fcomeback.ch%2Fcome-back.ch';
var metaContents  = 'Comeback%2Fcome+back%2Fphysio%2Fla+tour%2FPhysioth%C3%A9rapie%2FPr%C3%A9paration+physique%2FEntrainement%2FLa+Tour-de-Peilz%2FVevey%2FSchmutz%2FWalter%2Fcomeback.ch%2Fcome-back.ch';
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();
};
