/* [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','402806',jdecode('ACCUEIL'),jdecode(''), jdecode('%2F402806.html'), 'true',[],'',''],
	['PAGE','415086',jdecode('PRESENTATION'),jdecode(''), jdecode('%2F415086.html'), 'true',[],'',''],
	['PAGE','916854',jdecode('HORAIRES'),jdecode(''), jdecode('%2F916854.html'), 'true',[],'',''],
	['PAGE','302697',jdecode('NOUS+CONTACTER'),jdecode(''), jdecode('%2F302697.html'), 'true',[],'',''],
	['PAGE','986954',jdecode('PLAN+D%26%23x27%3BACCES'),jdecode(''), jdecode('%2F986954.html'), 'true',[],'',''],
	['PAGE','986354',jdecode('PENSION'),jdecode(''), jdecode('%2F986354.html'), 'true',[],'',''],
	['PAGE','411591',jdecode('A+ADOPTER'),jdecode(''), jdecode('%2F411591.html'), 'true',[],'',''],
	['PAGE','4706',jdecode('PARRAINAGE'),jdecode(''), jdecode('%2F4706.html'), 'true',[],'',''],
	['PAGE','386753',jdecode('FAIRE+UN+DON'),jdecode(''), jdecode('%2F386753.html'), 'true',[],'',''],
	['PAGE','408672',jdecode('MEDIAS+ET+NOUS'),jdecode(''), jdecode('%2F408672.html'), 'true',[],'',''],
	['PAGE','63255',jdecode('SOS+SUISSE'),jdecode(''), jdecode('%2F63255.html'), 'true',[],'',''],
	['PAGE','4760',jdecode('SOS+FRANCE'),jdecode(''), jdecode('%2F4760.html'), 'true',[],'',''],
	['PAGE','402205',jdecode('SOS+ITALIA'),jdecode(''), jdecode('%2F402205.html'), 'true',[],'',''],
	['PAGE','272345',jdecode('NOS+ADOPTES'),jdecode(''), jdecode('%2F272345.html'), 'true',[],'',''],
	['PAGE','243382',jdecode('IN+MEMORIA'),jdecode(''), jdecode('%2F243382.html'), 'true',[],'',''],
	['PAGE','406807',jdecode('LIVRE+D%26%23x27%3BOR'),jdecode(''), jdecode('%2F406807%2Findex.html'), 'true',[ 
		['PAGE','406806',jdecode('MESSAGES+DEPOSES'),jdecode(''), jdecode('%2F406807%2F406806.html'), 'false',[],'','']
	],'',''],
	['PAGE','12955',jdecode('LIENS'),jdecode(''), jdecode('%2F12955.html'), 'true',[],'',''],
	['PAGE','4679',jdecode('NOS+STATUTS'),jdecode(''), jdecode('%2F4679.html'), 'true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Seasons_fall';
theSitetree.paletteFamily='DA3C87';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='21083';
theSitetree.graphicsetId='13181';
theSitetree.contentColor='2E2E2E';
theSitetree.contentBGColor='DA3C87';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MH'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Seasons_fall',
				paletteFamily: 	'DA3C87',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'21083',
				graphicsetId: 	'13181',
				contentColor: 	'2E2E2E',
				contentBGColor: 'DA3C87',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '402806',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4706',
internalId:  '',
customField: '20110601-175630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '411591',
internalId:  '',
customField: '20110703-115147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '402806',
internalId:  '',
customField: '20111209-174819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '302697',
internalId:  '',
customField: '20110724-114609'
};
webappMappings['1002']=webappMappings['1002-406807abw0x0inxsp9']={
webappId:    '1002',
documentId:  '406807',
internalId:  '406807abw0x0inxsp9',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '386753',
internalId:  '',
customField: '20111030-145338'
};
webappMappings['7008']=webappMappings['7008-276']={
webappId:    '7008',
documentId:  '411591',
internalId:  '276',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '415086',
internalId:  '',
customField: '20110601-141138'
};
webappMappings['7008']=webappMappings['7008-277']={
webappId:    '7008',
documentId:  '302697',
internalId:  '277',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '408672',
internalId:  '',
customField: '20100417-230615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '272345',
internalId:  '',
customField: '20100221-141409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4760',
internalId:  '',
customField: '20110713-190042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63255',
internalId:  '',
customField: '20110713-190120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '402205',
internalId:  '',
customField: '20110713-190359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '243382',
internalId:  '',
customField: '20091213-113823'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12955',
internalId:  '',
customField: '20110808-181934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '406807',
internalId:  '',
customField: '20110506-152416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '406806',
internalId:  '',
customField: '20061021-101129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4679',
internalId:  '',
customField: '20070131-125224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '986954',
internalId:  '',
customField: '20110601-143143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '916854',
internalId:  '',
customField: '20110601-143046'
};
webappMappings['7060']=webappMappings['7060-32c1a27e66f5c625d47a1329330a4f9b']={
webappId:    '7060',
documentId:  '408672',
internalId:  '32c1a27e66f5c625d47a1329330a4f9b',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '986354',
internalId:  '',
customField: '20110601-143201'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXSP9';
var companyName   = 'OASIS+DES+VETERANS+-+OASI+DEI+VETERANI';
var htmlTitle	  = 'www.oasis-des-veterans.com';
var metaKeywords  = 'chiens+ag%C3%A9s+-+chiens+handicap%C3%A9s+-cani+anziani+-+cani+con+andicap';
var metaContents  = 'Banque+de+donn%C3%A9es+pour+chiens+ag%C3%A9s+et+handicap%C3%A9s+Maison+de+repos+pour+chiens+Banca+dati+per+cani+anziani+ed+con+andicap+casa+di+riposo+per+cani';
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();
};

