/* [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','1714',jdecode('Home'),jdecode(''), jdecode('%2F1714%2Findex.html'), 'true',[ 
		['PAGE','3101',jdecode('%C3%9Cber+uns'),jdecode(''), jdecode('%2F1714%2F3101.html'), 'true',[],'','']
	],'',''],
	['PAGE','2101',jdecode('Textilreinigung'),jdecode(''), jdecode('%2F2101%2Findex.html'), 'true',[ 
		['PAGE','21901',jdecode('Chemisch+reinigen%2FDry+cleaning'),jdecode(''), jdecode('%2F2101%2F21901.html'), 'true',[],'',''],
		['PAGE','21922',jdecode('Waschen+%2F+Laundry'),jdecode(''), jdecode('%2F2101%2F21922.html'), 'true',[],'',''],
		['PAGE','13901',jdecode('Hemden+%2F+Shirts'),jdecode(''), jdecode('%2F2101%2F13901.html'), 'true',[],'',''],
		['PAGE','13922',jdecode('Blusenservice'),jdecode(''), jdecode('%2F2101%2F13922.html'), 'true',[],'',''],
		['PAGE','13943',jdecode('Anzugservice'),jdecode(''), jdecode('%2F2101%2F13943.html'), 'true',[],'',''],
		['PAGE','2801',jdecode('Vorhang+%2F+Gardinen+Reinigung'),jdecode(''), jdecode('%2F2101%2F2801.html'), 'true',[],'',''],
		['PAGE','8801',jdecode('Einige+Preise+%2F+Abo%26%23x27%3Bs'),jdecode(''), jdecode('%2F2101%2F8801.html'), 'true',[],'',''],
		['PAGE','13201',jdecode('%C3%96ffnungszeiten+Seebach'),jdecode(''), jdecode('%2F2101%2F13201.html'), 'true',[],'',''],
		['PAGE','3401',jdecode('Firmenangebote'),jdecode(''), jdecode('%2F2101%2F3401.html'), 'true',[],'',''],
		['PAGE','20022',jdecode('Annahmestellen'),jdecode(''), jdecode('%2F2101%2F20022.html'), 'true',[],'',''],
		['PAGE','23001',jdecode('Einige+Bilder'),jdecode(''), jdecode('%2F2101%2F23001.html'), 'true',[],'','']
	],'',''],
	['PAGE','33901',jdecode('Onlineshop'),jdecode(''), jdecode('%2F33901.html'), 'true',[],'',''],
	['PAGE','24401',jdecode('Schneiderei'),jdecode(''), jdecode('%2F24401%2Findex.html'), 'true',[ 
		['PAGE','24701',jdecode('Einige+Preise'),jdecode(''), jdecode('%2F24401%2F24701.html'), 'true',[],'','']
	],'',''],
	['PAGE','2164',jdecode('Soziales+Engagement'),jdecode(''), jdecode('%2F2164.html'), 'true',[],'',''],
	['PAGE','2501',jdecode('Kontakt'),jdecode(''), jdecode('%2F2501%2Findex.html'), 'true',[ 
		['PAGE','2185',jdecode('Lageplan'),jdecode(''), jdecode('%2F2501%2F2185.html'), 'true',[],'','']
	],'',''],
	['PAGE','2206',jdecode('Impressum'),jdecode(''), jdecode('%2F2206.html'), 'true',[],'',''],
	['PAGE','30001',jdecode('Suche'),jdecode(''), jdecode('%2F30001.html'), 'true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Easylife';
theSitetree.paletteFamily='2962B0';
theSitetree.keyvisualId='5824';
theSitetree.keyvisualName='kv_5824.jpg';
theSitetree.fontsetId='11095';
theSitetree.graphicsetId='11871';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Easylife',
				paletteFamily: 	'2962B0',
				keyvisualId: 	'5824',
				keyvisualName: 	'kv_5824.jpg',
				fontsetId: 		'11095',
				graphicsetId: 	'11871',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1714',
internalId:  '',
customField: '20120110-150930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20022',
internalId:  '',
customField: '20111119-182413'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '2185',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2185',
internalId:  '',
customField: '20090902-230224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2164',
internalId:  '',
customField: '20111226-103711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20120120-154536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2206',
internalId:  '',
customField: '20111119-183035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2501',
internalId:  '',
customField: '20111226-102655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20110128-164738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20111119-175220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20110811-215538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3101',
internalId:  '',
customField: '20110811-220357'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20110823-213754'
};
webappMappings['7008']=webappMappings['7008-5310']={
webappId:    '7008',
documentId:  '2501',
internalId:  '5310',
customField: 'language:de;country:CH;'
};
webappMappings['4001']=webappMappings['4001-25966961']={
webappId:    '4001',
documentId:  '33901',
internalId:  '25966961',
customField: 'language:de;country:CH;'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '30001',
internalId:  'search',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20111004-164226'
};
webappMappings['1501']=webappMappings['1501-22118986']={
webappId:    '1501',
documentId:  '1714',
internalId:  '22118986',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20110823-213503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20100829-195551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13922',
internalId:  '',
customField: '20100829-195807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13943',
internalId:  '',
customField: '20110823-213351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21901',
internalId:  '',
customField: '20110823-213249'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21922',
internalId:  '',
customField: '20110101-111041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20110823-214208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20111119-191002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24401',
internalId:  '',
customField: '20110128-162025'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat01.hostpoint.ch';
var accountId     = 'AHP340INV599';
var companyName   = 'C%2BE+ReinigungsService';
var htmlTitle	  = 'Ihr+Partner+f%C3%BCr+die+Textilreinigung+und+Vorhangreinigung%2C+wir+reinigen+mit+beiden+Verfahren%2C+chemisch+reinigen+und+waschen';
var metaKeywords  = '';
var metaContents  = '';
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();
};

