/* [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','12601',jdecode('Home'),jdecode(''),'/12601.html','true',[],'',''],
	['PAGE','501',jdecode('Produkte%2C+Leistungen'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','67501',jdecode('Neuheiten+2010'),jdecode(''),'/67501.html','true',[],'',''],
	['PAGE','191601',jdecode('Meerih%C3%A4user+'),jdecode(''),'/191601/index.html','true',[ 
		['PAGE','191901',jdecode('Spitzdachh%C3%A4user'),jdecode(''),'/191601/191901.html','true',[],'',''],
		['PAGE','193401',jdecode('Flachdachh%C3%A4user'),jdecode(''),'/191601/193401.html','true',[],'',''],
		['PAGE','194101',jdecode('Eckh%C3%A4user'),jdecode(''),'/191601/194101.html','true',[],'',''],
		['PAGE','194301',jdecode('Terrassenh%C3%A4user'),jdecode(''),'/191601/194301.html','true',[],'',''],
		['PAGE','195901',jdecode('Sondermodelle'),jdecode(''),'/191601/195901.html','true',[],'',''],
		['PAGE','198101',jdecode('Tipis'),jdecode(''),'/191601/198101.html','true',[],'','']
	],'',''],
	['PAGE','188222',jdecode('Meerih%C3%A4user+mit+Wanne'),jdecode(''),'/188222/index.html','true',[ 
		['PAGE','188401',jdecode('Fachwerk'),jdecode(''),'/188222/188401.html','true',[],'',''],
		['PAGE','190301',jdecode('Schweden'),jdecode(''),'/188222/190301.html','true',[],'',''],
		['PAGE','191001',jdecode('Western'),jdecode(''),'/188222/191001.html','true',[],'',''],
		['PAGE','199501',jdecode('Sondermodelle'),jdecode(''),'/188222/199501.html','true',[],'','']
	],'',''],
	['PAGE','573',jdecode('Zwergkaninchen-H%C3%A4user'),jdecode(''),'/573/index.html','true',[ 
		['PAGE','96601',jdecode('Indoor-H%C3%A4user'),jdecode(''),'/573/96601.html','true',[],'',''],
		['PAGE','96622',jdecode('Outdoor-Fachwerkh%C3%A4user'),jdecode(''),'/573/96622.html','true',[],'',''],
		['PAGE','120864',jdecode('Outdoor-Westernh%C3%A4user'),jdecode(''),'/573/120864.html','true',[],'',''],
		['PAGE','134122',jdecode('Outdoor-Schwedenh%C3%A4user'),jdecode(''),'/573/134122.html','true',[],'','']
	],'',''],
	['PAGE','160401',jdecode('H%C3%A4ngematten'),jdecode(''),'/160401/index.html','true',[ 
		['PAGE','175401',jdecode('H%C3%A4ngemattenh%C3%A4user'),jdecode(''),'/160401/175401.html','true',[],'',''],
		['PAGE','175422',jdecode('H%C3%A4ngematten+f%C3%BCr+Haus'),jdecode(''),'/160401/175422.html','true',[],'',''],
		['PAGE','175443',jdecode('H%C3%A4ngematten+f%C3%BCr+K%C3%A4fig'),jdecode(''),'/160401/175443.html','true',[],'',''],
		['PAGE','175464',jdecode('Zubeh%C3%B6r'),jdecode(''),'/160401/175464.html','true',[],'','']
	],'',''],
	['PAGE','139801',jdecode('Hamsterh%C3%A4user'),jdecode(''),'/139801.html','true',[],'',''],
	['PAGE','15101',jdecode('Katzen-Hundehaus'),jdecode(''),'/15101.html','true',[],'',''],
	['PAGE','117101',jdecode('Vogel-u.Wachtelh%C3%A4user'),jdecode(''),'/117101.html','true',[],'',''],
	['PAGE','64001',jdecode('Bestellformular'),jdecode(''),'/64001.html','true',[],'',''],
	['PAGE','594',jdecode('Kontakt'),jdecode(''),'/594.html','true',[],'',''],
	['PAGE','17901',jdecode('Kundengalerie'),jdecode(''),'/17901.html','true',[],'',''],
	['PAGE','615',jdecode('Links+%2F+LinksHitList'),jdecode(''),'/615.html','true',[],'',''],
	['PAGE','56601',jdecode('Ausstellungen+07'),jdecode(''),'/56601.html','true',[],'',''],
	['PAGE','47901',jdecode('Unser+Team'),jdecode(''),'/47901.html','true',[],'',''],
	['PAGE','55306',jdecode('G%C3%A4stebuch'),jdecode(''),'/55306/index.html','true',[ 
		['PAGE','55301',jdecode('Eintr%C3%A4ge'),jdecode(''),'/55306/55301.html','false',[],'','']
	],'',''],
	['PAGE','69201',jdecode('Verkaufshinweise'),jdecode(''),'/69201.html','true',[],'',''],
	['PAGE','110301',jdecode('Ihr+Weg+zu+uns'),jdecode(''),'/110301.html','true',[],'',''],
	['PAGE','110401',jdecode('Anfahrt'),jdecode(''),'/110401.html','true',[],'','']];
var siteelementCount=39;
theSitetree.topTemplateName='Logg';
theSitetree.paletteFamily='3D4B78';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='423';
theSitetree.graphicsetId='467';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3D4B78';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Logg',
				paletteFamily: 	'3D4B78',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'423',
				graphicsetId: 	'467',
				contentColor: 	'FFFFFF',
				contentBGColor: '3D4B78',
				a_color: 		'3D4B78',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20071020-201558'
};
webappMappings['1002']=webappMappings['1002-55306abw0x0in20mx']={
webappId:    '1002',
documentId:  '55306',
internalId:  '55306abw0x0in20mx',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-1168']={
webappId:    '7008',
documentId:  '64001',
internalId:  '1168',
customField: 'language:de;country:CH;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '110301',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '110401',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20080131-082819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '199501',
internalId:  '',
customField: '20100823-190933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20080808-172030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96601',
internalId:  '',
customField: '20100211-080412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96622',
internalId:  '',
customField: '20100817-174810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '120864',
internalId:  '',
customField: '20081209-161803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15101',
internalId:  '',
customField: '20100211-080014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117101',
internalId:  '',
customField: '20090116-093545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67501',
internalId:  '',
customField: '20100817-135326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64001',
internalId:  '',
customField: '20071216-081902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20090520-213530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47901',
internalId:  '',
customField: '20081230-090848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20100825-181951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56601',
internalId:  '',
customField: '20071128-073951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20100825-175607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55306',
internalId:  '',
customField: '20071020-200859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55301',
internalId:  '',
customField: '20071020-201059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69201',
internalId:  '',
customField: '20080119-091620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110301',
internalId:  '',
customField: '20080807-151235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110401',
internalId:  '',
customField: '20080807-151440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134122',
internalId:  '',
customField: '20100817-180000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '139801',
internalId:  '',
customField: '20100823-194505'
};
webappMappings['1501']=webappMappings['1501-17629429']={
webappId:    '1501',
documentId:  '12601',
internalId:  '17629429',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160401',
internalId:  '',
customField: '20100823-191200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '175401',
internalId:  '',
customField: '20100823-191533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '175422',
internalId:  '',
customField: '20100823-192950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '175443',
internalId:  '',
customField: '20100826-181835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '175464',
internalId:  '',
customField: '20100823-194140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '190301',
internalId:  '',
customField: '20100817-180353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191001',
internalId:  '',
customField: '20100813-200659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '188401',
internalId:  '',
customField: '20100813-194950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '188222',
internalId:  '',
customField: '20100823-190859'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191601',
internalId:  '',
customField: '20100823-191010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191901',
internalId:  '',
customField: '20100817-124806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193401',
internalId:  '',
customField: '20100815-183614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '194301',
internalId:  '',
customField: '20100816-173341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '194101',
internalId:  '',
customField: '20100815-192055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '195901',
internalId:  '',
customField: '20100817-174228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198101',
internalId:  '',
customField: '20100817-134818'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN20MX';
var companyName   = 'Nager-Immobilien';
var htmlTitle	  = 'Nager+Immobilien+Horw';
var metaKeywords  = 'Nager%2C+Nagerh%C3%A4uschen%2C+Kleintier%2C+Kleintierh%C3%A4uschen%2C+Meerschweinchen%2C+Zwerghasen%2C+Immobilien%2C+Katzen%2C+Katzenhaus%2C+Katzenh%C3%A4uschen%2C+Kleinhundehaus%2C+Hundeh%C3%BCtte%2C+Horw%2C+Kleintierhaus%2C+Schlafh%C3%A4uschen%2CUnterschlupf%2CNagetiere%2CSchweiz%2CHandarbeit%2CHandmade%2CKunsthandwerk%2CGarten%2CAuslauf%2CK%C3%A4fig%2CTiere%2CSelbstbau%2CFachwerkh%C3%A4user%2CFachwerk%2CWestern%2CWesternh%C3%A4user%2CWilderwesten%2CSaloon%2CSheriff%2CDrugstore%2CBank%2CCoop%2CLandi%2CMigro%2CGasthaus%2CHotel';
var metaContents  = 'Liebevolle%2C+zweckm%C3%A4ssig+gebaute+Nager-H%C3%A4uschen+im+Fachwerk-oder+Westernstil+f%C3%BCr+Meerschweinchen+und+Zwergkaninchen.+Die+Nagerh%C3%A4user+sind+grossz%C3%BCgig+und+praktisch+f%C3%BCr+die+Bed%C3%BCrfnisse+der+Tiere+konzipiert+und+sind+die+ideale+Schlafstelle+oder+Unterschlupf+f%C3%BCr+den+Garten+oder+Balkon.';
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();
};
