/* [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','4607',jdecode('Accueil'),jdecode(''),'/4607.html','true',[],'',''],
	['PAGE','9154',jdecode('Soci%C3%A9t%C3%A9'),jdecode(''),'/9154.html','true',[],'',''],
	['PAGE','464412',jdecode('Prestations'),jdecode(''),'/464412.html','true',[],'',''],
	['PAGE','127212',jdecode('Photos'),jdecode(''),'/127212.html','true',[],'',''],
	['PAGE','506212',jdecode('Emploi'),jdecode(''),'/506212.html','true',[],'',''],
	['PAGE','387912',jdecode('Liens'),jdecode(''),'/387912.html','true',[],'',''],
	['PAGE','766412',jdecode('Actualit%C3%A9'),jdecode(''),'/766412.html','true',[],'',''],
	['PAGE','9181',jdecode('Contact'),jdecode(''),'/9181/index.html','true',[ 
		['PAGE','452112',jdecode('Contact%28follow+up+page%29'),jdecode(''),'/9181/452112.html','false',[],'','']
	],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Blast';
theSitetree.paletteFamily='FFF476';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33266';
theSitetree.graphicsetId='14144';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blast',
				paletteFamily: 	'FFF476',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33266',
				graphicsetId: 	'14144',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'D29D0D',
				b_color: 		'F5F36A',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4607',
internalId:  '',
customField: '20100531-210248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9154',
internalId:  '',
customField: '20100621-211427'
};
webappMappings['7008']=webappMappings['7008-8181']={
webappId:    '7008',
documentId:  '9181',
internalId:  '8181',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '464412',
internalId:  '',
customField: '20100525-210047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9181',
internalId:  '',
customField: '20100525-204328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '387912',
internalId:  '',
customField: '20100406-234217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '506212',
internalId:  '',
customField: '20100618-205636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127212',
internalId:  '',
customField: '20100406-234156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452112',
internalId:  '',
customField: '20080109-235309'
};
webappMappings['7050']=webappMappings['7050-48']={
webappId:    '7050',
documentId:  '766412',
internalId:  '48',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '766412',
internalId:  '',
customField: '20100406-234228'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INXX74';
var companyName   = '++GIORDANO+PEINTURE';
var htmlTitle	  = 'Giordano+Peinture+Suisse%3Aqualite%2C+prix+competitifs%2C+adaptabilite';
var metaKeywords  = 'meta+name%3Dkeywords+content%3Dpeinture%2Centreprise%2Cqualite%2Cbeau%2Cprix%2Ctechnique%2Cmur%2Cplafond%2Cfenetre%2Csol%2Cgiordano%2Csuisse%2Ccompetitifs%2Cadaptabilite%2Cdynamique%2Couverte%2Ctechnologies%2Cnouvelles%2Canciennes%2Cobjectifs%2Cprioritaires%2Ctravail%2Crecherche%2Cconjoncture%2Csavoir%2Cmaitre%2Cmaitrise%2Cmot%2Cetat%2Cactivite%2Cadaptabilite%2Cans%2Ccherche%2Cajuster%2Cdemande%2Cdiversifiee%2Caire%2Cgeographique%2Cetendue%2Cjeune%2Cgeree%2Cdirecteur%2Cepaulee%2Cequipe%2Cmotivee%2Cdesireuse%2Couvrir%2Chorizon%2Cetranger%2C1346%2Cbioux%2Cbas%2Ccedric%2Cvaud%2Cvallee%2Cjoux%2Cformation%2Cromande%2Cmaison%2Cimmeuble%2Cvilla%2Cappartement%2Clogement%2Cstudio%2Cdecoration%2Camenagement%2Crefection%2Crafraichissement%2Crepeindre%2Cpeindre%2Centretenir%2Cdecoration%2Cart%2Credecorer%2Cmoulure%2Clinteau%2Cporte%2Cfenetre%2Cvolet%2Cpalissade%2Cmur%2Chaut%2Cpleinte%2Ccuisine%2Cchambre%2Cmanger%2Ccoucher%2Csalon%2Cwc%2Csalle%2Cbain%2Ceau%2Cetanche%2Cetancheite%2Cvernis%2Cemail%2Cchaux%2Cpapier%2Cpeint%2Ccrepi%2Cisolation%2Cventilee%2Cnaturelle%2Cacryle%2Cacrylique%2Cdispersion%2Crefaire%2Cfaire%2Cnettoyer%2Crafraichir%2Cdevis%2Cdeplacement%2Cmotivation%2Cdiscount%2Cbon%2Cmarche%2Cmarcher%2Ctres%2Cmeuble%2Cmobilier%2Cimmobilier%2Cgerance%2Cetat%2Clieux%2Creparer%2Cbail%2Cfin%2Cdebut%2Cagence%2Clausanne%2Cgeneve%2Cyverdon%2Corbes%2Cnyon%2Cvallorbe%2Cpays%2Cvaudoise%2Cch';
var metaContents  = 'meta+name%3Ddescription+content%3DGiordano+Peinture+vall%C3%A9e+de+joux%2C+Suisse.+Jeune+entreprise+dynamique+ouverte+aux+technologies+nouvelles+et+anciennes.+objectifs+prioritaires+%3A+qualite+du+travail%2C+recherche+du+beau+et+prix+competitifsmeta+name%3Dabstract+content%3DGiordano+Peinture+les+Bioux%2C+Suisse.+Jeune+entreprise+dynamique+ouverte+aux+technologies+nouvelles+et+anciennes.+objectifs+prioritaires+%3A+qualite+du+travail%2C+recherche+du+beau+et+prix+competitifsmeta+name%3DAuthor+content%3DGiordano+Peinturemeta+name%3Dgenerator+content%3DNote+Pademeta+name%3Dpublisher+content%3DCedric+Giordanometa+name%3Dreply-to+content%3Dgiordano.c%40bluewin.chmeta+name%3Dcontactcity+content%3Dles+Biouxmeta+name%3Dcontactzipcode+content%3D01346meta+name%3Dcontactstate+content%3DSuissemeta+name%3Didentifier-url+content%3Dwww.giordano-peinture.chmeta+http-equiv%3Dcontent-language+content%3Dfrmeta+name%3Dcopyright+content%3DGiordano+Peinturemeta+name%3Drevisit-after+content%3D30daysmeta+name%3Dcategory+content%3DReal+Estate%2FServicesmeta+name%3Ddistribution+content%3Dglobalmeta+name%3Drating+content%3Dgeneralmeta+name%3Drobot+content%3DIndex%2CFollowmeta+name%3Ddate-creation-yyyymmdd+content%3D20050101+META+NAME%3Daudience+CONTENT%3Da11+META+NAME%3Dpage-topic+CONTENT%3Dgeneral+META+NAME%3Dpage-type+CONTENT%3DReal+Estate+META+HTTP-EQUIV%3Dimagetoolbar+CONTENT%3Dno+META+HTTP-EQUIV%3DPragma+CONTENT%3Dno-cacheMETA+NAME%3DROBOTS+CONTENT%3DNOARCHIVE+%21-+-+-+Code+%C3%A0+ins%C3%A9rer+RechercheWeb+%3A+calcul+daudience+-+-+-table+border%3D0+cellpadding%3D0+cellspacing%3D0trtdscript+language%3DJavaScript+src%3Dhttp%3A%2F%2Fstat.webyse.com%2Faudience.php%3Fid%3D2854+%2Fscript%2Ftd%2Ftrtrtdp+align%3Dcenter+a+href%3Dhttp%3A%2F%2Frechercheweb.webyse.comfont+size%3D1+color%3D%23000080+face%3DArialRechercheWeb%2Ffont%2Fa%2Fp+%2Ftd%2Ftr%2Ftable%21-+-+-+fin+du+Code+%C3%A0+ins%C3%A9rer+++';
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();
};
