/* [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','501',jdecode('Bienvenue'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','97012',jdecode('Offre+de+No%C3%ABl+2011'),jdecode(''), jdecode('%2F97012.html'), 'true',[],'',''],
	['PAGE','98012',jdecode('Portes+Ouvertes+10.12'),jdecode(''), jdecode('%2F98012.html'), 'true',[],'',''],
	['PAGE','14101',jdecode('Nos+produits'),jdecode(''), jdecode('%2F14101%2Findex.html'), 'true',[ 
		['PAGE','14122',jdecode('Saumon+fum%C3%A9+%C3%A0+chaud'),jdecode(''), jdecode('%2F14101%2F14122.html'), 'true',[],'',''],
		['PAGE','14143',jdecode('Saumon+fum%C3%A9+trad.'),jdecode(''), jdecode('%2F14101%2F14143.html'), 'true',[],'',''],
		['PAGE','40601',jdecode('Saumon+marin%C3%A9'),jdecode(''), jdecode('%2F14101%2F40601.html'), 'true',[],'',''],
		['PAGE','14164',jdecode('Anguille+fum%C3%A9e'),jdecode(''), jdecode('%2F14101%2F14164.html'), 'true',[],'',''],
		['PAGE','40901',jdecode('%C5%92ufs+de+cor%C3%A9gone+'),jdecode(''), jdecode('%2F14101%2F40901.html'), 'true',[],'',''],
		['PAGE','96412',jdecode('Les+Harengs+marin%C3%A9s'),jdecode(''), jdecode('%2F14101%2F96412.html'), 'true',[],'',''],
		['PAGE','96433',jdecode('Saucisse+d%26%23x27%3B%C3%A9lan'),jdecode(''), jdecode('%2F14101%2F96433.html'), 'true',[],'',''],
		['PAGE','96454',jdecode('Pains+croustillants'),jdecode(''), jdecode('%2F14101%2F96454.html'), 'true',[],'',''],
		['PAGE','107212',jdecode('Epices+pour+le+Gl%C3%B6gg'),jdecode(''), jdecode('%2F14101%2F107212.html'), 'true',[],'',''],
		['PAGE','96612',jdecode('Les+herbes'),jdecode(''), jdecode('%2F14101%2F96612.html'), 'true',[],'','']
	],'',''],
	['PAGE','106512',jdecode('Ko-Ko-No+-+les+bijoux'),jdecode(''), jdecode('%2F106512%2Findex.html'), 'true',[ 
		['PAGE','107712',jdecode('LES+COLLIERS'),jdecode(''), jdecode('%2F106512%2F107712.html'), 'true',[],'',''],
		['PAGE','108712',jdecode('+++++Arty+Chain'),jdecode(''), jdecode('%2F106512%2F108712.html'), 'true',[],'',''],
		['PAGE','109412',jdecode('+++++Awesome+Chain'),jdecode(''), jdecode('%2F106512%2F109412.html'), 'true',[],'',''],
		['PAGE','109512',jdecode('+++++Classic+Chain'),jdecode(''), jdecode('%2F106512%2F109512.html'), 'true',[],'',''],
		['PAGE','109712',jdecode('+++++Outgoing+Chain'),jdecode(''), jdecode('%2F106512%2F109712.html'), 'true',[],'',''],
		['PAGE','110512',jdecode('+++++Multiplicity+chain'),jdecode(''), jdecode('%2F106512%2F110512.html'), 'true',[],'',''],
		['PAGE','109733',jdecode('+++++Shimmering+Chain'),jdecode(''), jdecode('%2F106512%2F109733.html'), 'true',[],'',''],
		['PAGE','109754',jdecode('+++++Snake+Chain'),jdecode(''), jdecode('%2F106512%2F109754.html'), 'true',[],'',''],
		['PAGE','110912',jdecode('BRACELETS'),jdecode(''), jdecode('%2F106512%2F110912.html'), 'true',[],'',''],
		['PAGE','113112',jdecode('+++++Awesome'),jdecode(''), jdecode('%2F106512%2F113112.html'), 'true',[],'',''],
		['PAGE','113133',jdecode('+++++Dragon+Bangle'),jdecode(''), jdecode('%2F106512%2F113133.html'), 'true',[],'',''],
		['PAGE','113154',jdecode('+++++Classic+3-rings'),jdecode(''), jdecode('%2F106512%2F113154.html'), 'true',[],'',''],
		['PAGE','113175',jdecode('+++++Elegance+Crystal'),jdecode(''), jdecode('%2F106512%2F113175.html'), 'true',[],'',''],
		['PAGE','113196',jdecode('+++++Multiplicity'),jdecode(''), jdecode('%2F106512%2F113196.html'), 'true',[],'',''],
		['PAGE','113217',jdecode('+++++Oceanic'),jdecode(''), jdecode('%2F106512%2F113217.html'), 'true',[],'',''],
		['PAGE','113238',jdecode('+++++Outgoing+6x+Octan+Crystals'),jdecode(''), jdecode('%2F106512%2F113238.html'), 'true',[],'',''],
		['PAGE','113259',jdecode('+++++Shimmering+Bracelets'),jdecode(''), jdecode('%2F106512%2F113259.html'), 'true',[],'',''],
		['PAGE','113322',jdecode('+++++Summer+Blues'),jdecode(''), jdecode('%2F106512%2F113322.html'), 'true',[],'',''],
		['PAGE','115512',jdecode('MALA+COLLECTION'),jdecode(''), jdecode('%2F106512%2F115512.html'), 'true',[],'',''],
		['PAGE','116512',jdecode('+++MALA+Colliers'),jdecode(''), jdecode('%2F106512%2F116512.html'), 'true',[],'',''],
		['PAGE','115533',jdecode('++++++++Black+Onyx'),jdecode(''), jdecode('%2F106512%2F115533.html'), 'true',[],'',''],
		['PAGE','116712',jdecode('+++++Darker+Red'),jdecode(''), jdecode('%2F106512%2F116712.html'), 'true',[],'',''],
		['PAGE','116912',jdecode('+++++Howlite+Dyed+Lapis'),jdecode(''), jdecode('%2F106512%2F116912.html'), 'true',[],'',''],
		['PAGE','116933',jdecode('+++++Silver+Leaf'),jdecode(''), jdecode('%2F106512%2F116933.html'), 'true',[],'',''],
		['PAGE','115912',jdecode('+++++Snowflake'),jdecode(''), jdecode('%2F106512%2F115912.html'), 'true',[],'','']
	],'',''],
	['PAGE','106533',jdecode('H%C3%A4stens+-+le+lit'),jdecode(''), jdecode('%2F106533.html'), 'false',[],'',''],
	['PAGE','12922',jdecode('Commande'),jdecode(''), jdecode('%2F12922.html'), 'true',[],'',''],
	['PAGE','61801',jdecode('Calendrier'),jdecode(''), jdecode('%2F61801.html'), 'false',[],'',''],
	['PAGE','552',jdecode('O%C3%B9+nous+trouver'),jdecode(''), jdecode('%2F552%2Findex.html'), 'true',[ 
		['PAGE','103112',jdecode('Directions'),jdecode(''), jdecode('%2F552%2F103112.html'), 'true',[],'','']
	],'',''],
	['PAGE','40922',jdecode('Distributeurs'),jdecode(''), jdecode('%2F40922.html'), 'false',[],'',''],
	['PAGE','68701',jdecode('Partenaires'),jdecode(''), jdecode('%2F68701.html'), 'false',[],'',''],
	['PAGE','28501',jdecode('Recettes'),jdecode(''), jdecode('%2F28501%2Findex.html'), 'true',[ 
		['PAGE','98033',jdecode('Comment+pr%C3%A9parer+le+saumon+fum%C3%A9+%C3%A0+chaud'),jdecode(''), jdecode('%2F28501%2F98033.html'), 'true',[],'','']
	],'',''],
	['PAGE','89501',jdecode('Pal%C3%A9o+2009'),jdecode(''), jdecode('%2F89501.html'), 'false',[],'','']];
var siteelementCount=50;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='003399';
theSitetree.keyvisualId='1248';
theSitetree.keyvisualName='weinglaeser.jpg';
theSitetree.fontsetId='191';
theSitetree.graphicsetId='228';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Profile',
				paletteFamily: 	'003399',
				keyvisualId: 	'1248',
				keyvisualName: 	'weinglaeser.jpg',
				fontsetId: 		'191',
				graphicsetId: 	'228',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'003399',
				b_color: 		'000066',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96454',
internalId:  '',
customField: '20111103-231610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96612',
internalId:  '',
customField: '20101108-162738'
};
webappMappings['7008']=webappMappings['7008-2758']={
webappId:    '7008',
documentId:  '12922',
internalId:  '2758',
customField: 'language:fr;country:FR;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20101108-163757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97012',
internalId:  '',
customField: '20111104-101951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14101',
internalId:  '',
customField: '20101108-161103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14122',
internalId:  '',
customField: '20101108-161310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14143',
internalId:  '',
customField: '20101108-112148'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40601',
internalId:  '',
customField: '20101108-161359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14164',
internalId:  '',
customField: '20101108-161449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40901',
internalId:  '',
customField: '20111103-231409'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '106533',
internalId:  '-',
customField: '20111103-224605'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '106512',
internalId:  '-',
customField: '20111203-201158'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '103112',
internalId:  'routing',
customField: 'fr_FR'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89501',
internalId:  '',
customField: '20090730-104209'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12922',
internalId:  '',
customField: '20111103-231151'
};
webappMappings['1501']=webappMappings['1501-28028159']={
webappId:    '1501',
documentId:  '501',
internalId:  '28028159',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61801',
internalId:  '',
customField: '20101116-093518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20091129-231119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40922',
internalId:  '',
customField: '20100226-172919'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68701',
internalId:  '',
customField: '20101108-163316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28501',
internalId:  '',
customField: '20070903-165131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96412',
internalId:  '',
customField: '20111103-231430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96433',
internalId:  '',
customField: '20111103-231454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98012',
internalId:  '',
customField: '20111204-213031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98033',
internalId:  '',
customField: '20091105-111653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103112',
internalId:  '',
customField: '20111103-231304'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '107212',
internalId:  '-',
customField: '20111103-231733'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '107712',
internalId:  '-',
customField: '20111203-200114'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '108712',
internalId:  '-',
customField: '20111104-152229'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '109512',
internalId:  '-',
customField: '20111104-195403'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '109733',
internalId:  '-',
customField: '20111104-195219'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '109712',
internalId:  '-',
customField: '20111104-195550'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '109412',
internalId:  '-',
customField: '20111104-152302'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '110512',
internalId:  '-',
customField: '20111104-195716'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '109754',
internalId:  '-',
customField: '20111104-195032'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '110912',
internalId:  '-',
customField: '20111203-200742'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '113112',
internalId:  '-',
customField: '20111203-202046'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '113133',
internalId:  '-',
customField: '20111203-202241'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '113154',
internalId:  '-',
customField: '20111203-202338'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '113175',
internalId:  '-',
customField: '20111203-202555'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '113196',
internalId:  '-',
customField: '20111203-202652'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '113217',
internalId:  '-',
customField: '20111203-202751'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '113238',
internalId:  '-',
customField: '20111203-202900'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '113259',
internalId:  '-',
customField: '20111203-203655'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '115533',
internalId:  '-',
customField: '20111204-221744'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '115512',
internalId:  '-',
customField: '20111204-221013'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '113322',
internalId:  '-',
customField: '20111203-203715'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '115912',
internalId:  '-',
customField: '20111204-211402'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '116512',
internalId:  '-',
customField: '20111204-222049'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '116712',
internalId:  '-',
customField: '20111204-221913'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '116912',
internalId:  '-',
customField: '20111204-222144'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '116933',
internalId:  '-',
customField: '20111204-222310'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN27EK';
var companyName   = 'Saveurs+du+Nord+-+C.+Huguenin';
var htmlTitle	  = 'Saveurs+du+Nord';
var metaKeywords  = 'Les+meilleures+saveurs+du+nord%2C+saumon+fum%C3%A9+%C3%A0+chaud%2C+saumon+fum%C3%A9%2C+anguille+fum%C3%A9e%2C+oeufs+de+cor%C3%A9gone+blanc%2C+saumon+marin%C3%A9+%C3%A0+laneth%2C+service+traiteurs.+Hotsmoked+salmon%2C+cold+smoked+salmon%2C+smoked+eel%2C+bleak+roe%2C+dill+marinted+salmon%2C+traiteur.+';
var metaContents  = 'Les+meilleures+saveurs+du+nord%2C+saumon+fum%C3%A9+%C3%A0+chaud%2C+saumon+fum%C3%A9%2C+anguille+fum%C3%A9e%2C+saumon+marin%C3%A9+%C3%A0+laneth%2C+service+traiteur%2C+hot+smoked+salmon%2C+cold+smoked+salmon%2C+smoked+eel%2C+dill+marinated+salmon%2C+traiteur.';
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();
};

