/* [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','1246',jdecode('Baureinigung+CH++++%28Home%29'),jdecode(''),'/1246.html','true',[],'',''],
	['PAGE','13301',jdecode('Offertstellung+f%C3%BCr+Baureinigung'),jdecode(''),'/13301.html','true',[],'',''],
	['PAGE','2801',jdecode('Baubegleitende+Reinigungen'),jdecode(''),'/2801.html','true',[],'',''],
	['PAGE','3001',jdecode('Baugrobreinigung+CH'),jdecode(''),'/3001.html','true',[],'',''],
	['PAGE','3301',jdecode('Baufeinreinigung+CH'),jdecode(''),'/3301.html','true',[],'',''],
	['PAGE','3901',jdecode('Bauschlussreinigung+CH'),jdecode(''),'/3901.html','true',[],'',''],
	['PAGE','14101',jdecode('%C3%96kologische+Baureinigung+CH'),jdecode(''),'/14101.html','true',[],'',''],
	['PAGE','4501',jdecode('Leistungen+f%C3%BCr+Baureinigung'),jdecode(''),'/4501.html','true',[],'',''],
	['PAGE','5301',jdecode('Innenabriss%2C+Abbruch%2C+Entkernung'),jdecode(''),'/5301.html','true',[],'',''],
	['PAGE','11801',jdecode('Unsere+Einsatzgebiete'),jdecode(''),'/11801.html','true',[],'',''],
	['PAGE','17301',jdecode('Unsere+weitere+Webseiten'),jdecode(''),'/17301.html','true',[],'',''],
	['PAGE','1341',jdecode('So+kontaktieren+Sie+uns'),jdecode(''),'/1341.html','true',[],'','']];
var siteelementCount=12;
theSitetree.topTemplateName='Pastel';
theSitetree.paletteFamily='D3F9AA';
theSitetree.keyvisualId='11250';
theSitetree.keyvisualName='kv_11250.jpg';
theSitetree.fontsetId='32128';
theSitetree.graphicsetId='13921';
theSitetree.contentColor='403f3f';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Pastel',
				paletteFamily: 	'D3F9AA',
				keyvisualId: 	'11250',
				keyvisualName: 	'kv_11250.jpg',
				fontsetId: 		'32128',
				graphicsetId: 	'13921',
				contentColor: 	'403f3f',
				contentBGColor: 'FFFFFF',
				a_color: 		'D3F9AA',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1246',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20100723-073658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3301',
internalId:  '',
customField: '20100723-072918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3901',
internalId:  '',
customField: '20100723-073018'
};
webappMappings['7008']=webappMappings['7008-5227']={
webappId:    '7008',
documentId:  '1341',
internalId:  '5227',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1246',
internalId:  '',
customField: '20100723-072522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4501',
internalId:  '',
customField: '20100723-073606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20100723-072737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20100723-072822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1341',
internalId:  '',
customField: '20100723-074447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20100723-073938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20100723-072655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14101',
internalId:  '',
customField: '20100723-073424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17301',
internalId:  '',
customField: '20100723-074150'
};
var canonHostname = 'wsc01.webland.ch';
var accountId     = 'AWB010IN250A';
var companyName   = 'www.Neubaureinigung-Umbaureinigung-in-Zuerich-und-Aargau.ch++++++044+%2F+810+32+20++++atax.suisse%40gmail.com';
var htmlTitle	  = 'Baureinigung%2C+Neubaureinigung%2C+Umbaureinigung%2C+Baugrobreinigung%2C+Baufeinreinigung+in+ZH%2C+ZG%2C++AG%2C+BS%2C+BL%2C+SO%2C+BE%2C+LU%2C+SZ%2C+SG%2C+TG%2C+SH';
var metaKeywords  = 'Baureinigung+Neubaureinigung+Umbaureinigung+Baugrobreinigung+Baufeinreinigung+Bauschlussreinigung+Bauendreinigung++Deutschschweiz+Z%C3%BCrich+Aargau+Aarau+Baden+Pf%C3%A4ffikon+Cham+baar+Wetzikon+Hinwil+Uster+Dielsdorf+Kloten+B%C3%BClach+K%C3%BCsnacht+Horgen+W%C3%A4denswil+Thalwil+Thurgau+Basel-Stadt+Baselland+Solothurn%2C+Bern+Luzern+Schwyz+St.Gallen+Appenzell+Schaffhausen+Reinigungsfirma+Reinigungsfirmen+Reinigungsunternehmen+Reinigungsinstitut+Reinigung+Bauherr+Architekt+Bauunternehmen+Baufirma+Neubau+Umbau+Renovation+Abrissarbeiten+Abbrucharbeiten+Entkernungen+R%C3%BCckbauarbeiten+Bau+Bauarbeiten+ZH+AG+TG+ZG+SH+SZ+SG+BL+BS+BE+SO+GR+GL+';
var metaContents  = 'ATAX+bietet+Baureinigung%2C+Neubaureinigung%2C+Umbaureinigung%2C+Baugrobreinigung%2C+Baufeinreinigung+in+der+ganzen+Deutschschweiz%2C+kostenguenstig%2C+termingerecht+und+zuverl%C3%A4ssig.+Wir+bieten+Baureinigung+in+Kantonen+Z%C3%BCrich%2C+Aargau%2C+Thurgau%2C+Basel-Stadt%2C+Baselland%2C+Solothurn%2C+Bern%2C+Luzern%2C+Schwyz%2C+St.Gallen%2C+Appenzell%2C+Schaffhausen+Aarau+Winterthur++ZH+AG+TG+ZG+SH+SZ+SG+BL+BS+BE+SO+GR+GL+';
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();
};
