/* [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','201',jdecode('Home'),jdecode(''),'/201.html','true',[],'',''],
	['PAGE','6822',jdecode('Qualit%C3%A4tsmanagement'),jdecode(''),'/6822.html','true',[],'',''],
	['PAGE','5401',jdecode('B%C3%BCro%2FUnterhaltsreinigungen'),jdecode(''),'/5401.html','true',[],'',''],
	['PAGE','5422',jdecode('Industriereinigungen'),jdecode(''),'/5422.html','true',[],'',''],
	['PAGE','5443',jdecode('Baureinigungen'),jdecode(''),'/5443.html','true',[],'',''],
	['PAGE','16201',jdecode('Hauswartungen'),jdecode(''),'/16201.html','true',[],'',''],
	['PAGE','7201',jdecode('Putzfrauenservice'),jdecode(''),'/7201.html','true',[],'',''],
	['PAGE','252',jdecode('Kontakt'),jdecode(''),'/252/index.html','true',[ 
		['PAGE','11501',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/252/11501.html','false',[],'','']
	],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Reflectance';
theSitetree.paletteFamily='FD9F65';
theSitetree.keyvisualId='3602';
theSitetree.keyvisualName='kv_3602.jpg';
theSitetree.fontsetId='10739';
theSitetree.graphicsetId='10855';
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: 			'Reflectance',
				paletteFamily: 	'FD9F65',
				keyvisualId: 	'3602',
				keyvisualName: 	'kv_3602.jpg',
				fontsetId: 		'10739',
				graphicsetId: 	'10855',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FD9F65',
				e_color: 		'855435',
				f_color: 		'A09D9D',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6822',
internalId:  '',
customField: '20100322-020540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201',
internalId:  '',
customField: '20100322-020503'
};
webappMappings['7008']=webappMappings['7008-1675']={
webappId:    '7008',
documentId:  '252',
internalId:  '1675',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20100322-020620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5422',
internalId:  '',
customField: '20100322-020701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5443',
internalId:  '',
customField: '20100322-020740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16201',
internalId:  '',
customField: '20100322-020826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7201',
internalId:  '',
customField: '20100322-021159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '252',
internalId:  '',
customField: '20100322-021429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11501',
internalId:  '',
customField: '20081109-230244'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHOPT0IN3PC3';
var companyName   = 'atax.suisse%40gmail.com';
var htmlTitle	  = '';
var metaKeywords  = 'Gebauedereinigung+ZH+Unterhaltsreinigung++Bueroreinigung++Industriereinigung+Kanzleireinigung+ZH%2C+Ladenlokalreinigung++Ladenreinigung+Praxisreinigung++Treppenhausreinigung+Rolltreppenreinigung++Baureinigung++Bauschlussreinigung++Endreinigung+R%C3%BCckgabereinigug++Abgabereinigung++Wohnungsreinigung++Umzugsreinigung++Umzugsreinigung+mit+Abgabegarantie++Wohnungsreinigung+mit+Abgabegarantie++Glasreinigigung++Fensterreinigung++Gewerbereinigung++Reinraumreinigung++Hotelreinigung++Brandschadenreinigung++Fensterreinigung++Fassadenreinigung++L%C3%BCftungsreinigung++Klinikreinigung++Spitalreinigung++Umzugsreinigung+mit+Uebergabegarantie++Wohnungsreinigung+mit+Uebergabegarantie++Fr%C3%BChjahrreinigung+Fr%C3%BChlingsreinigung++Fr%C3%BChjahrputzete++Hausreinigung++Haushaltsreinigung++Jalousienreinigung++Arealreinigung++Reinigungsfirma++Reinigungsinstitut+Reiniungsunternehmen+Reinigungsservice+ZH%2C+Reinigungsdienst++Reinigungsequippe+Reinigungsteam+Reinigungstruppe+Putzkolonne+ZH%2C+Reinigungsgesch%C3%A4ft++Putzfirma+ZH+Z%C3%BCrich+Basel+Basel-Stadt+Luzern+Zug+Saint+Gallen+Thurgau+Schwyz+Schaffhausen+Solothurn+Bern+Aargau+Aarau+Brugg+Winterthur+Pf%C3%A4ffikon+Birmensdorf+Lenzburg+Bern+Baselland+Baden+AG+SG+ZG+TG+ZH+SH+SZ+LU+BE+SO+BL+BS+Uster+Wetzikon+Horgen+Meilen+B%C3%BClach+R%C3%BCmlang+Opfikon+Kloten+D%C3%BCbendorf+Muttenz+Pratteln+Liestal+Oerlikon+Rapperswil+Richterswil+Thalwil+R%C3%BCschlikon+Urdorf+Spreitenbach+D%C3%A4ttwil+';
var metaContents  = 'ATAX+Facility+und+Hygiene+Z%C3%BCrich%2C+besitzt+einen+modernen+Maschinenpark%2C+hat+ein+vorbildliches+Qualit%C3%A4tssicherungssystem%2C+umweltschonender+und+sparsamer+Umgang+mit+Reinigungsmitteln%2C+systematische+Nachwuchsf%C3%B6rderung+und+vor+allem+engagierte+und+gut+ausgebildete%2C+arbeitsfreudige+Mitarbeiter+sind+ein+Garant+f%C3%BCr+die+hohe+Kundenzufriedenheit+unserer+langj%C3%A4hrigen+Gesch%C3%A4ftspartner.++hohe+Kundenzufriedenheit+unserer+langj%C3%A4hrigen+Gesch%C3%A4ftspartner.';
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();
};
