/* [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','4556',jdecode('Home'),jdecode(''), jdecode('%2F4556.html'), 'true',[],'',''],
	['PAGE','4613',jdecode('Qui+sommes-nous%3F'),jdecode(''), jdecode('%2F4613.html'), 'true',[],'',''],
	['PAGE','4640',jdecode('Produits'),jdecode(''), jdecode('%2F4640%2Findex.html'), 'true',[ 
		['PAGE','4667',jdecode('Piscines+polyester'),jdecode(''), jdecode('%2F4640%2F4667.html'), 'true',[],'',''],
		['PAGE','4694',jdecode('Piscines+panneaux+inox'),jdecode(''), jdecode('%2F4640%2F4694.html'), 'true',[],'',''],
		['PAGE','4721',jdecode('Piscines+en+bois'),jdecode(''), jdecode('%2F4640%2F4721.html'), 'true',[],'',''],
		['PAGE','4748',jdecode('Piscines+b%C3%A9ton'),jdecode(''), jdecode('%2F4640%2F4748.html'), 'true',[],'',''],
		['PAGE','24857',jdecode('Abris'),jdecode(''), jdecode('%2F4640%2F24857.html'), 'true',[],'',''],
		['PAGE','14147',jdecode('Couvertures'),jdecode(''), jdecode('%2F4640%2F14147.html'), 'true',[],'',''],
		['PAGE','4802',jdecode('Jacuzzis'),jdecode(''), jdecode('%2F4640%2F4802.html'), 'true',[],'',''],
		['PAGE','4829',jdecode('Saunas-hammam'),jdecode(''), jdecode('%2F4640%2F4829.html'), 'true',[],'',''],
		['PAGE','9842',jdecode('S%C3%A9curit%C3%A9'),jdecode(''), jdecode('%2F4640%2F9842.html'), 'true',[],'',''],
		['PAGE','4856',jdecode('R%C3%A9novations'),jdecode(''), jdecode('%2F4640%2F4856.html'), 'true',[],'',''],
		['PAGE','4883',jdecode('Traitement+d%26%23x27%3Beau+'),jdecode(''), jdecode('%2F4640%2F4883.html'), 'true',[],'',''],
		['PAGE','9547',jdecode('Accessoires'),jdecode(''), jdecode('%2F4640%2F9547.html'), 'true',[],'',''],
		['PAGE','18904',jdecode('Jeux'),jdecode(''), jdecode('%2F4640%2F18904.html'), 'true',[],'',''],
		['PAGE','19404',jdecode('Pool+house'),jdecode(''), jdecode('%2F4640%2F19404.html'), 'true',[],'',''],
		['PAGE','21204',jdecode('Occasions'),jdecode(''), jdecode('%2F4640%2F21204.html'), 'true',[],'','']
	],'',''],
	['PAGE','4910',jdecode('News'),jdecode(''), jdecode('%2F4910%2Findex.html'), 'true',[ 
		['PAGE','4937',jdecode('Offres+sp%C3%A9ciales'),jdecode(''), jdecode('%2F4910%2F4937.html'), 'true',[],'',''],
		['PAGE','4964',jdecode('Nouveaut%C3%A9s'),jdecode(''), jdecode('%2F4910%2F4964.html'), 'true',[],'','']
	],'',''],
	['PAGE','4991',jdecode('R%C3%A9f%C3%A9rences'),jdecode(''), jdecode('%2F4991.html'), 'true',[],'',''],
	['PAGE','5018',jdecode('Contact'),jdecode(''), jdecode('%2F5018.html'), 'true',[],'',''],
	['PAGE','5801',jdecode('Liens'),jdecode(''), jdecode('%2F5801.html'), 'true',[],'',''],
	['PAGE','24866',jdecode('Financement'),jdecode(''), jdecode('%2F24866.html'), 'true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Orbit';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='172';
theSitetree.graphicsetId='202';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='003366';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Orbit',
				paletteFamily: 	'003366',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'172',
				graphicsetId: 	'202',
				contentColor: 	'FFFFFF',
				contentBGColor: '003366',
				a_color: 		'003366',
				b_color: 		'336699',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1348981']={
webappId:    '1501',
documentId:  '4556',
internalId:  '1348981',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4556',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4556',
internalId:  '',
customField: '20110215-164555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4613',
internalId:  '',
customField: '20100104-165705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4640',
internalId:  '',
customField: '20090620-125441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4667',
internalId:  '',
customField: '20100209-140949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4694',
internalId:  '',
customField: '20060415-112856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4721',
internalId:  '',
customField: '20110419-201316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4748',
internalId:  '',
customField: '20081006-134029'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24857',
internalId:  '',
customField: '20091218-112003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14147',
internalId:  '',
customField: '20060411-141759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4802',
internalId:  '',
customField: '20081006-133540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4829',
internalId:  '',
customField: '20060411-142109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9842',
internalId:  '',
customField: '20090413-114232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4856',
internalId:  '',
customField: '20060404-110039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4883',
internalId:  '',
customField: '20100209-140453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9547',
internalId:  '',
customField: '20100209-140339'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18904',
internalId:  '',
customField: '20060412-144849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19404',
internalId:  '',
customField: '20060412-165353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21204',
internalId:  '',
customField: '20111120-104817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4910',
internalId:  '',
customField: '20111120-104644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4937',
internalId:  '',
customField: '20110419-201837'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4964',
internalId:  '',
customField: '20110419-200839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4991',
internalId:  '',
customField: '20081018-173247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5018',
internalId:  '',
customField: '20060412-083442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20111120-104913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24866',
internalId:  '',
customField: '20070122-112214'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXEKP';
var companyName   = 'LITTORAL+Piscines++';
var htmlTitle	  = '';
var metaKeywords  = 'alliance+piscines+aquinox+woodline+arctic+hydra+coyote+riviera+vitalo';
var metaContents  = 'Littoral+piscines+spa+jacuzzis+saunas+hammam+polyester+aquinox+ozone+diacell+chlore+r%C3%A9novations+alliance+piscines+b%C3%A9ton+piscines+bois+nage+%C3%A0+contre+courant+massage+baln%C3%A9o+spa+jacuzzi+chlore+oxyg%C3%A8ne+actif';
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();
};

