/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','436',jdecode('Coiffeur'),jdecode(''),'/436/index.html','true',[ 
		['PAGE','2085',jdecode('%C3%9Cber+uns'),jdecode(''),'/436/2085.html','true',[],'',''],
		['PAGE','2169',jdecode('Preisliste'),jdecode(''),'/436/2169.html','true',[],'','']
	],'',''],
	['PAGE','352',jdecode('Bar+Leon'),jdecode(''),'/352/index.html','true',[ 
		['PAGE','2001',jdecode('%C3%9Cber+uns'),jdecode(''),'/352/2001.html','true',[],'',''],
		['PAGE','2043',jdecode('Tapas'),jdecode(''),'/352/2043.html','true',[],'',''],
		['PAGE','27601',jdecode('Emotionen+Bar+Leon'),jdecode(''),'/352/27601.html','true',[],'',''],
		['PAGE','61801',jdecode('Raul+Royal+Fan+Club'),jdecode(''),'/352/61801.html','true',[],'','']
	],'',''],
	['PAGE','56101',jdecode('THE+UNICAT+WINE'),jdecode(''),'/56101.html','true',[],'',''],
	['PAGE','478',jdecode('Vinos+de+Espa%C3%B1a'),jdecode(''),'/478/index.html','true',[ 
		['PAGE','44301',jdecode('Almansa'),jdecode(''),'/478/44301.html','true',[],'',''],
		['PAGE','44322',jdecode('Bierzo'),jdecode(''),'/478/44322.html','true',[],'',''],
		['PAGE','44343',jdecode('Calatayud'),jdecode(''),'/478/44343.html','true',[],'',''],
		['PAGE','44364',jdecode('Castilla+y+Leon'),jdecode(''),'/478/44364.html','true',[],'',''],
		['PAGE','44385',jdecode('Cigales'),jdecode(''),'/478/44385.html','true',[],'',''],
		['PAGE','44406',jdecode('Madrid'),jdecode(''),'/478/44406.html','true',[],'',''],
		['PAGE','44427',jdecode('Montsant'),jdecode(''),'/478/44427.html','true',[],'',''],
		['PAGE','44448',jdecode('Navarra'),jdecode(''),'/478/44448.html','true',[],'',''],
		['PAGE','44469',jdecode('Penedes'),jdecode(''),'/478/44469.html','true',[],'',''],
		['PAGE','44490',jdecode('Priorat'),jdecode(''),'/478/44490.html','true',[],'',''],
		['PAGE','44511',jdecode('Rias+Baixas'),jdecode(''),'/478/44511.html','true',[],'',''],
		['PAGE','44532',jdecode('Ribera+del+Duero'),jdecode(''),'/478/44532.html','true',[],'',''],
		['PAGE','44553',jdecode('Rioja'),jdecode(''),'/478/44553.html','true',[],'',''],
		['PAGE','44574',jdecode('Somontano'),jdecode(''),'/478/44574.html','true',[],'',''],
		['PAGE','44595',jdecode('Toro'),jdecode(''),'/478/44595.html','true',[],'',''],
		['PAGE','44616',jdecode('Valdeorras'),jdecode(''),'/478/44616.html','true',[],'',''],
		['PAGE','44637',jdecode('Valdepusa'),jdecode(''),'/478/44637.html','true',[],'',''],
		['PAGE','52501',jdecode('AGB'),jdecode(''),'/478/52501.html','true',[],'','']
	],'',''],
	['PAGE','44658',jdecode('Diverse+Weine'),jdecode(''),'/44658/index.html','true',[ 
		['PAGE','44679',jdecode('Chile'),jdecode(''),'/44658/44679.html','true',[],'',''],
		['PAGE','44700',jdecode('Italien'),jdecode(''),'/44658/44700.html','true',[],'',''],
		['PAGE','44721',jdecode('Rarit%C3%A4ten'),jdecode(''),'/44658/44721.html','true',[],'','']
	],'',''],
	['PAGE','373',jdecode('Tossals-Club'),jdecode(''),'/373.html','true',[],'',''],
	['PAGE','457',jdecode('Handel'),jdecode(''),'/457/index.html','true',[ 
		['PAGE','2358',jdecode('Button'),jdecode(''),'/457/2358.html','true',[],'',''],
		['PAGE','44742',jdecode('Wein+Accessoires'),jdecode(''),'/457/44742.html','true',[],'',''],
		['PAGE','2316',jdecode('Pins'),jdecode(''),'/457/2316.html','true',[],'',''],
		['PAGE','2337',jdecode('Textildruck'),jdecode(''),'/457/2337.html','true',[],'','']
	],'',''],
	['PAGE','394',jdecode('Mundial'),jdecode(''),'/394.html','true',[],'',''],
	['PAGE','9001',jdecode('Links'),jdecode(''),'/9001.html','true',[],'',''],
	['PAGE','2379',jdecode('Kontakt'),jdecode(''),'/2379.html','true',[],'','']];
var siteelementCount=42;
theSitetree.topTemplateName='Fellow';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10637';
theSitetree.graphicsetId='10695';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Fellow',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10637',
				graphicsetId: 	'10695',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-561']={
webappId:    '7008',
documentId:  '2379',
internalId:  '561',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44322',
internalId:  '',
customField: '20100506-153119'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100203-115234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20110104-151922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2001',
internalId:  '',
customField: '20100506-141322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '436',
internalId:  '',
customField: '20100203-121842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2085',
internalId:  '',
customField: '20100317-092903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2043',
internalId:  '',
customField: '20100121-142223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56101',
internalId:  '',
customField: '20100506-141431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27601',
internalId:  '',
customField: '20090712-155951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52501',
internalId:  '',
customField: '20090715-133059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '478',
internalId:  '',
customField: '20100506-153028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44343',
internalId:  '',
customField: '20090721-063338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44364',
internalId:  '',
customField: '20090715-134441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44385',
internalId:  '',
customField: '20090715-134615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44406',
internalId:  '',
customField: '20090715-134946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44427',
internalId:  '',
customField: '20090715-135300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44301',
internalId:  '',
customField: '20100506-153057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2169',
internalId:  '',
customField: '20090105-164942'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '457',
internalId:  '',
customField: '20081005-170009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2358',
internalId:  '',
customField: '20081005-165845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2316',
internalId:  '',
customField: '20081005-165930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2337',
internalId:  '',
customField: '20081005-170153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '373',
internalId:  '',
customField: '20100506-152656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61801',
internalId:  '',
customField: '20110512-122244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '394',
internalId:  '',
customField: '20110401-150039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9001',
internalId:  '',
customField: '20110512-122515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2379',
internalId:  '',
customField: '20080323-125703'
};
webappMappings['1501']=webappMappings['1501-21727916']={
webappId:    '1501',
documentId:  '301',
internalId:  '21727916',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44448',
internalId:  '',
customField: '20090715-135929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44469',
internalId:  '',
customField: '20100506-153238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44490',
internalId:  '',
customField: '20090715-140727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44511',
internalId:  '',
customField: '20090715-140850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44532',
internalId:  '',
customField: '20090715-151246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44553',
internalId:  '',
customField: '20090715-144759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44574',
internalId:  '',
customField: '20090715-151314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44595',
internalId:  '',
customField: '20090715-151233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44616',
internalId:  '',
customField: '20090715-151221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44637',
internalId:  '',
customField: '20100506-154041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44658',
internalId:  '',
customField: '20100506-153016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44679',
internalId:  '',
customField: '20100506-142044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44700',
internalId:  '',
customField: '20100506-141622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44721',
internalId:  '',
customField: '20090715-151854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44742',
internalId:  '',
customField: '20090712-120900'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW1X0INEWHC';
var companyName   = 'B+A+I+L+L+O+';
var htmlTitle	  = 'Baillo+Luzern';
var metaKeywords  = 'Bar+Leon%2C+Weinhandel%2C+Coiffeur%2C+Mundial%2C+Luzern%2C+Weine%2C+Spanien%2C+Schwarzkopf%2C+t-shirt+druck%2C+stickerei%2C+Fasnacht%2C+Pin%2C+Button%2C+Bar%2C+Bahnhof%2C+Rarit%C3%A4ten%2C+Apero%2C+Tapas%2C+Leon%2C+';
var metaContents  = 'Bar+Leon%2C+Vino+de+Espana%2C+Coiffeur%2C+Handel%2C+Tossals-Club%2C+Mundial';
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();
};

