/* [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(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','591212',jdecode('Pr%C3%A9sentation'),jdecode(''), jdecode('%2F591212.html'), 'true',[],'',''],
	['PAGE','625012',jdecode('M%C3%A2le+devon+rex'),jdecode(''), jdecode('%2F625012.html'), 'true',[],'',''],
	['PAGE','17801',jdecode('Femelles+devon+rex'),jdecode(''), jdecode('%2F17801.html'), 'true',[],'',''],
	['PAGE','341943',jdecode('Chatons+devon+rex'),jdecode(''), jdecode('%2F341943.html'), 'true',[],'',''],
	['PAGE','658623',jdecode('Origine+devon+rex'),jdecode(''), jdecode('%2F658623.html'), 'true',[],'',''],
	['PAGE','719434',jdecode('M%C3%A2le+sphynx'),jdecode(''), jdecode('%2F719434.html'), 'true',[],'',''],
	['PAGE','706034',jdecode('Femelles+sphynx'),jdecode(''), jdecode('%2F706034.html'), 'true',[],'',''],
	['PAGE','759634',jdecode('Chatons+sphynx'),jdecode(''), jdecode('%2F759634.html'), 'true',[],'',''],
	['PAGE','732534',jdecode('Soins+a+son+sphynx'),jdecode(''), jdecode('%2F732534.html'), 'true',[],'',''],
	['PAGE','732734',jdecode('Origine+sphynx'),jdecode(''), jdecode('%2F732734.html'), 'true',[],'',''],
	['PAGE','704734',jdecode('M%C3%A2le+exotic'),jdecode(''), jdecode('%2F704734.html'), 'true',[],'',''],
	['PAGE','343101',jdecode('Femelles+persanes'),jdecode(''), jdecode('%2F343101.html'), 'true',[],'',''],
	['PAGE','759655',jdecode('Chatons+persan%2Fexotic'),jdecode(''), jdecode('%2F759655.html'), 'true',[],'',''],
	['PAGE','654623',jdecode('Contrat+de+vente'),jdecode(''), jdecode('%2F654623.html'), 'true',[],'',''],
	['PAGE','106606',jdecode('Livre+d%26%23x27%3Bor'),jdecode(''), jdecode('%2F106606%2Findex.html'), 'true',[ 
		['PAGE','106601',jdecode('Entr%C3%A9es'),jdecode(''), jdecode('%2F106606%2F106601.html'), 'false',[],'','']
	],'',''],
	['PAGE','643212',jdecode('Contact'),jdecode(''), jdecode('%2F643212.html'), 'true',[],'',''],
	['PAGE','342401',jdecode('Liens'),jdecode(''), jdecode('%2F342401.html'), 'true',[],'',''],
	['PAGE','704755',jdecode('Souvenirs'),jdecode(''), jdecode('%2F704755.html'), 'true',[],'',''],
	['PAGE','341985',jdecode('Au+quotidien'),jdecode(''), jdecode('%2F341985.html'), 'true',[],'',''],
	['PAGE','13164',jdecode('Nos+chiens'),jdecode(''), jdecode('%2F13164.html'), 'true',[],'',''],
	['PAGE','597612',jdecode('Nous+trouver'),jdecode(''), jdecode('%2F597612.html'), 'true',[],'',''],
	['PAGE','598012',jdecode('Itin%C3%A9raire'),jdecode(''), jdecode('%2F598012.html'), 'true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Verve';
theSitetree.paletteFamily='4FA9F4';
theSitetree.keyvisualId='8400';
theSitetree.keyvisualName='kv_8400.jpg';
theSitetree.fontsetId='17069';
theSitetree.graphicsetId='12442';
theSitetree.contentColor='4FA9F4';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Verve',
				paletteFamily: 	'4FA9F4',
				keyvisualId: 	'8400',
				keyvisualName: 	'kv_8400.jpg',
				fontsetId: 		'17069',
				graphicsetId: 	'12442',
				contentColor: 	'4FA9F4',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20120128-232440'
};
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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13164',
internalId:  '',
customField: '20110304-144420'
};
webappMappings['7008']=webappMappings['7008-10833']={
webappId:    '7008',
documentId:  '643212',
internalId:  '10833',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17801',
internalId:  '',
customField: '20111129-132435'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '759634',
internalId:  '-',
customField: '20120101-165344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '591212',
internalId:  '',
customField: '20120119-231322'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '759655',
internalId:  '-',
customField: '20120101-165415'
};
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: '20120125-143158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '342401',
internalId:  '',
customField: '20111114-203433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '658623',
internalId:  '',
customField: '20110712-053025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '341985',
internalId:  '',
customField: '20110626-225449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '343101',
internalId:  '',
customField: '20110825-083632'
};
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:  '654623',
internalId:  '',
customField: '20120124-091841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '704755',
internalId:  '',
customField: '20110825-083756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '732534',
internalId:  '',
customField: '20110828-102519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '706034',
internalId:  '',
customField: '20111203-205025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '719434',
internalId:  '',
customField: '20111203-205054'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '732734',
internalId:  '',
customField: '20110828-103358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '625012',
internalId:  '',
customField: '20120122-233342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '704734',
internalId:  '',
customField: '20110626-164854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '643212',
internalId:  '',
customField: '20120101-233137'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INE0IO';
var companyName   = 'Dream+Nepthys%27+Cats';
var htmlTitle	  = 'Elevage+de+chats+devon+rex%2C+sphynx+%2Cpersan+et+exotic%2C+van+arlequin+%2C+bicolore%2C+yeux+bleu%2C+mackerel%2C+blotched%2C+silver';
var metaKeywords  = 'devon+rex+-+persan+exotic+van+bicolore+arlequin+mackerel+tabby+blotched+tabby+';
var metaContents  = 'la+chatterie+a+vu+le+jour+en+1992%2C+sous+l%27affixe+de+kerouzere%2C+par+la+suite+nous+avons+chang%C3%A9+d%27affixe%2C+nous+utilisons+actuellement+l%27affixe++dream+nepthys%27cats%2C+nous+%C3%A9levons+le+devon+rex';
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();
};

