/* [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('Accueil'),jdecode(''),'/401.html','true',[],'',''],
	['PAGE','591212',jdecode('Pr%C3%A9sentation'),jdecode(''),'/591212.html','true',[],'',''],
	['PAGE','341964',jdecode('Sphynx'),jdecode(''),'/341964.html','true',[],'',''],
	['PAGE','341922',jdecode('Chatons+sphynx+disponibles'),jdecode(''),'/341922.html','true',[],'',''],
	['PAGE','606512',jdecode('Soins'),jdecode(''),'/606512.html','true',[],'',''],
	['PAGE','13185',jdecode('Galerie+chatons+sphynx'),jdecode(''),'/13185.html','true',[],'',''],
	['PAGE','17801',jdecode('Devons+rex'),jdecode(''),'/17801.html','true',[],'',''],
	['PAGE','341943',jdecode('Chatons+devon+rex+disponibles'),jdecode(''),'/341943.html','true',[],'',''],
	['PAGE','617612',jdecode('Galerie+chatons+devon+rex'),jdecode(''),'/617612.html','true',[],'',''],
	['PAGE','343101',jdecode('Persan+%26+Exotic'),jdecode(''),'/343101.html','true',[],'',''],
	['PAGE','613012',jdecode('Chatons+persan+%26+exotic+disponibles'),jdecode(''),'/613012.html','true',[],'',''],
	['PAGE','617633',jdecode('Galerie+chatons+persan+%26+exotic'),jdecode(''),'/617633.html','true',[],'',''],
	['PAGE','13164',jdecode('Nos+chiens'),jdecode(''),'/13164/index.html','true',[ 
		['PAGE','481401',jdecode('Contact'),jdecode(''),'/13164/481401.html','true',[],'','']
	],'',''],
	['PAGE','341985',jdecode('Au+quotidien'),jdecode(''),'/341985.html','true',[],'',''],
	['PAGE','106606',jdecode('Livre+d%26%23x27%3Bor'),jdecode(''),'/106606/index.html','true',[ 
		['PAGE','106601',jdecode('Entr%C3%A9es'),jdecode(''),'/106606/106601.html','false',[],'','']
	],'',''],
	['PAGE','342401',jdecode('Liens'),jdecode(''),'/342401.html','true',[],'',''],
	['PAGE','597612',jdecode('Situation+g%C3%A9ographique'),jdecode(''),'/597612.html','true',[],'',''],
	['PAGE','598012',jdecode('Itin%C3%A9raire'),jdecode(''),'/598012.html','true',[],'',''],
	['PAGE','617654',jdecode('News'),jdecode(''),'/617654.html','true',[],'',''],
	['PAGE','618812',jdecode('Nos+retrait%C3%A9s'),jdecode(''),'/618812.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Citadel';
theSitetree.paletteFamily='7C693A';
theSitetree.keyvisualId='8166';
theSitetree.keyvisualName='kv_8166.jpg';
theSitetree.fontsetId='17011';
theSitetree.graphicsetId='12399';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7C693A';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Citadel',
				paletteFamily: 	'7C693A',
				keyvisualId: 	'8166',
				keyvisualName: 	'kv_8166.jpg',
				fontsetId: 		'17011',
				graphicsetId: 	'12399',
				contentColor: 	'FFFFFF',
				contentBGColor: '7C693A',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100902-105537'
};
webappMappings['1002']=webappMappings['1002-106606abw0x0ine0io']={
webappId:    '1002',
documentId:  '106606',
internalId:  '106606abw0x0ine0io',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '401',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-6984']={
webappId:    '7008',
documentId:  '481401',
internalId:  '6984',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13164',
internalId:  '',
customField: '20100622-214021'
};
webappMappings['1501']=webappMappings['1501-31732922']={
webappId:    '1501',
documentId:  '401',
internalId:  '31732922',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13185',
internalId:  '',
customField: '20100807-092146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20100807-091533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '613012',
internalId:  '',
customField: '20100729-155406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '591212',
internalId:  '',
customField: '20100806-230208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '481401',
internalId:  '',
customField: '20100627-165321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106606',
internalId:  '',
customField: '20100428-214122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106601',
internalId:  '',
customField: '20080512-151310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '341943',
internalId:  '',
customField: '20100729-155307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '341964',
internalId:  '',
customField: '20100615-114621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '342401',
internalId:  '',
customField: '20100721-205139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '341922',
internalId:  '',
customField: '20100729-153945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '341985',
internalId:  '',
customField: '20100725-211441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '343101',
internalId:  '',
customField: '20100902-110406'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '597612',
internalId:  'location',
customField: 'language:fr;country:FR;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '597612',
internalId:  '',
customField: '20100718-223325'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '598012',
internalId:  'routing',
customField: 'fr_FR'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '598012',
internalId:  '',
customField: '20100718-223400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '606512',
internalId:  '',
customField: '20100719-142559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '617654',
internalId:  '',
customField: '20100831-222511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '617633',
internalId:  '',
customField: '20100807-090759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '617612',
internalId:  '',
customField: '20100807-091331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '618812',
internalId:  '',
customField: '20100809-220246'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INE0IO';
var companyName   = 'Cattery+Dream+Nepthys%27Cats';
var htmlTitle	  = '';
var metaKeywords  = 'Sphynx-+devon+rex-persan-exotic+shorthair-+van+-bicolre+-+silver-+tabby-+blotched+-';
var metaContents  = 'depuis+1992%2C+je+suis+eleveuse+de+chats+par+passion%2C+vistez+mon+site+pour+y+decouvrir+mes+4+pattes.';
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();
};
