/* [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','4598',jdecode('Home'),jdecode(''),'/4598.html','true',[],'',''],
	['PAGE','185416',jdecode('Willkommen'),jdecode(''),'/185416/index.html','true',[ 
		['PAGE','6003',jdecode('Wir+%C3%BCber+uns'),jdecode(''),'/185416/6003.html','true',[],'',''],
		['PAGE','6030',jdecode('STUTZ-Team'),jdecode(''),'/185416/6030.html','true',[],'','']
	],'',''],
	['PAGE','293390',jdecode('Ausstellung'),jdecode(''),'/293390.html','true',[],'',''],
	['PAGE','239972',jdecode('Neuheiten'),jdecode(''),'/239972/index.html','true',[ 
		['PAGE','297421',jdecode('REICO+-+Vital'),jdecode(''),'/239972/297421.html','true',[],'','']
	],'',''],
	['PAGE','244572',jdecode('AKTIONEN'),jdecode(''),'/244572.html','true',[],'',''],
	['PAGE','171216',jdecode('Shop'),jdecode(''),'/171216.html','true',[],'',''],
	['PAGE','4790',jdecode('Hundefutter'),jdecode(''),'/4790.html','true',[],'',''],
	['PAGE','246172',jdecode('Erg%C3%A4nzungsfutter'),jdecode(''),'/246172.html','true',[],'',''],
	['PAGE','241772',jdecode('Delikatessen'),jdecode(''),'/241772.html','true',[],'',''],
	['PAGE','4817',jdecode('Katzenfutter'),jdecode(''),'/4817.html','true',[],'',''],
	['PAGE','221918',jdecode('Kratzb%C3%A4ume'),jdecode(''),'/221918.html','true',[],'',''],
	['PAGE','55377',jdecode('K%26%23x27%3BArtikel+u.+Sand'),jdecode(''),'/55377.html','true',[],'',''],
	['PAGE','4844',jdecode('Gebrauchsartikel'),jdecode(''),'/4844.html','true',[],'',''],
	['PAGE','15209',jdecode('Pflegeartikel'),jdecode(''),'/15209.html','true',[],'',''],
	['PAGE','12331',jdecode('Nagerecke'),jdecode(''),'/12331.html','true',[],'',''],
	['PAGE','105111',jdecode('Sch%26%23x27%3BKr%C3%B6tli-Fisch-V%C3%B6gel'),jdecode(''),'/105111.html','true',[],'',''],
	['PAGE','193316',jdecode('Erfolge'),jdecode(''),'/193316/index.html','true',[ 
		['PAGE','187564',jdecode('GABI-f%C3%BCrHundebesitzer'),jdecode(''),'/193316/187564.html','true',[],'',''],
		['PAGE','165393',jdecode('Schmunzelecke'),jdecode(''),'/193316/165393.html','true',[],'','']
	],'',''],
	['PAGE','4952',jdecode('Bobtail'),jdecode(''),'/4952.html','true',[],'',''],
	['PAGE','51608',jdecode('Links'),jdecode(''),'/51608.html','true',[],'',''],
	['PAGE','5033',jdecode('Kontakt'),jdecode(''),'/5033/index.html','true',[ 
		['PAGE','50605',jdecode('Kontakt+%28Folgeseite%29'),jdecode(''),'/5033/50605.html','false',[],'',''],
		['PAGE','5060',jdecode('Adresse%2C+Telefon'),jdecode(''),'/5033/5060.html','true',[],'','']
	],'',''],
	['PAGE','50564',jdecode('Anfahrt'),jdecode(''),'/50564.html','true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Profile';
theSitetree.paletteFamily='333333';
theSitetree.keyvisualId='1280';
theSitetree.keyvisualName='feder.jpg';
theSitetree.fontsetId='192';
theSitetree.graphicsetId='226';
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: 			'Profile',
				paletteFamily: 	'333333',
				keyvisualId: 	'1280',
				keyvisualName: 	'feder.jpg',
				fontsetId: 		'192',
				graphicsetId: 	'226',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'333333',
				b_color: 		'999999',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-473670']={
webappId:    '1501',
documentId:  '4598',
internalId:  '473670',
customField: '1501'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4598',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '50564',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '297421',
internalId:  '',
customField: '20091010-054805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20100815-090518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '185416',
internalId:  '',
customField: '20100601-032333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6003',
internalId:  '',
customField: '20080319-130014'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6030',
internalId:  '',
customField: '20100722-061549'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '293390',
internalId:  '',
customField: '20081020-145150'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '239972',
internalId:  '',
customField: '20100531-101338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '244572',
internalId:  '',
customField: '20100727-085545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '171216',
internalId:  '',
customField: '20080319-130321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4790',
internalId:  '',
customField: '20090209-152425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '246172',
internalId:  '',
customField: '20090505-090112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '241772',
internalId:  '',
customField: '20070318-155841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4817',
internalId:  '',
customField: '20080702-142247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '221918',
internalId:  '',
customField: '20060811-160423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55377',
internalId:  '',
customField: '20060811-160551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4844',
internalId:  '',
customField: '20070318-161619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15209',
internalId:  '',
customField: '20100529-073522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12331',
internalId:  '',
customField: '20080421-154755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105111',
internalId:  '',
customField: '20070318-161934'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193316',
internalId:  '',
customField: '20060811-161853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '187564',
internalId:  '',
customField: '20060812-140500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '165393',
internalId:  '',
customField: '20100305-181648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4952',
internalId:  '',
customField: '20100727-093135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51608',
internalId:  '',
customField: '20100727-092808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5033',
internalId:  '',
customField: '20060811-162849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50605',
internalId:  '',
customField: '20031203-123423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5060',
internalId:  '',
customField: '20060811-163024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50564',
internalId:  '',
customField: '20060809-133702'
};
webappMappings['7008']=webappMappings['7008-4387']={
webappId:    '7008',
documentId:  '5033',
internalId:  '4387',
customField: 'language:de;country:CH;'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXX0J';
var companyName   = 'Hunde-+und+Katzenshop+Stutz';
var htmlTitle	  = 'Hunde-+und+Katzenshop+Stutz';
var metaKeywords  = 'Hundefutter%2C+Magnusson%2C+Robur%2C+Beneful%2C+Eukanuba%2C+Hills%2C+Biomill.+Royal+Canin%2C+Isodog%2C+ProNature%2C+Proplan%2C+Pedigree%2C+Perfectfit%2C+Lecky%2C+Schweizer%2C+Technical%2C+Katzenfutter%2C+Katzensand%2C+Kratzb%EF%BF%BDume%2C+Animonda%2C+Hills%2C+RoyalCanin%2C+Isocat%2C+Bozita-Katzen%2C+++Animalia%2C+Bobtail';
var metaContents  = 'Hundefutter+%2CMagnusson%2C++Robur%2Cbeneful%2C++Eukanuba%2C+Hills%2C+Biomill.+Royal+Canin%2C+Isodog%2C+ProNature%2C+Proplan%2C+Pedigree%2C+Perfectfit%2C+Lecky%2C+Schweizer%2C+Technical%2C+Katzenfutter%2C+Katzensand%2C+Kratzb%EF%BF%BDume%2C+Animonda%2C+Hills%2C+RoyalCanin%2C+Isocat%2C+Bozita-Katzen%2C+++Animalia%2C+Bobtail';
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();
};
