/* [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','4529',jdecode('Home'),jdecode(''),'/4529.html','true',[],'',''],
	['PAGE','6901',jdecode('Aktuelles'),jdecode(''),'/6901.html','true',[],'',''],
	['PAGE','4829',jdecode('Brennbares'),jdecode(''),'/4829/index.html','true',[ 
		['PAGE','7708',jdecode('Impressionen'),jdecode(''),'/4829/7708.html','true',[],'',''],
		['PAGE','12736',jdecode('B%C3%BCro'),jdecode(''),'/4829/12736.html','true',[],'',''],
		['PAGE','83801',jdecode('Lampenkeller'),jdecode(''),'/4829/83801.html','true',[],'',''],
		['PAGE','6982',jdecode('Tipps+%26+Tricks'),jdecode(''),'/4829/6982.html','true',[],'',''],
		['PAGE','4856',jdecode('Dochtlampen'),jdecode(''),'/4829/4856.html','true',[],'',''],
		['PAGE','49101',jdecode('Wandlampen'),jdecode(''),'/4829/49101.html','true',[],'',''],
		['PAGE','11164',jdecode('Tischlampen'),jdecode(''),'/4829/11164.html','true',[],'',''],
		['PAGE','11191',jdecode('H%C3%A4ngelampen'),jdecode(''),'/4829/11191.html','true',[],'',''],
		['PAGE','11218',jdecode('Gl%C3%BChlichter'),jdecode(''),'/4829/11218.html','true',[],'',''],
		['PAGE','54322',jdecode('Sturmlaternen'),jdecode(''),'/4829/54322.html','true',[],'',''],
		['PAGE','56601',jdecode('Brenner+%26+Flammen'),jdecode(''),'/4829/56601.html','true',[],'',''],
		['PAGE','4883',jdecode('Vergaserlampen'),jdecode(''),'/4829/4883.html','true',[],'',''],
		['PAGE','49901',jdecode('Coleman'),jdecode(''),'/4829/49901.html','true',[],'',''],
		['PAGE','10725',jdecode('Ditmar'),jdecode(''),'/4829/10725.html','true',[],'',''],
		['PAGE','49922',jdecode('Egret'),jdecode(''),'/4829/49922.html','true',[],'',''],
		['PAGE','10752',jdecode('Focus'),jdecode(''),'/4829/10752.html','true',[],'',''],
		['PAGE','12601',jdecode('Geniol'),jdecode(''),'/4829/12601.html','true',[],'',''],
		['PAGE','10463',jdecode('Hasag'),jdecode(''),'/4829/10463.html','true',[],'',''],
		['PAGE','19796',jdecode('Hipolito'),jdecode(''),'/4829/19796.html','true',[],'',''],
		['PAGE','10779',jdecode('Optimus'),jdecode(''),'/4829/10779.html','true',[],'',''],
		['PAGE','10806',jdecode('Petromax'),jdecode(''),'/4829/10806.html','true',[],'',''],
		['PAGE','12628',jdecode('Phoebus'),jdecode(''),'/4829/12628.html','true',[],'',''],
		['PAGE','10833',jdecode('Primus'),jdecode(''),'/4829/10833.html','true',[],'',''],
		['PAGE','10490',jdecode('Standard'),jdecode(''),'/4829/10490.html','true',[],'',''],
		['PAGE','10860',jdecode('Tilley'),jdecode(''),'/4829/10860.html','true',[],'',''],
		['PAGE','41001',jdecode('Sonstige'),jdecode(''),'/4829/41001.html','true',[],'',''],
		['PAGE','4910',jdecode('Kocher+%26+Heizer'),jdecode(''),'/4829/4910.html','true',[],'',''],
		['PAGE','12655',jdecode('Petroleum'),jdecode(''),'/4829/12655.html','true',[],'',''],
		['PAGE','14501',jdecode('Benzin'),jdecode(''),'/4829/14501.html','true',[],'',''],
		['PAGE','12682',jdecode('Spiritus'),jdecode(''),'/4829/12682.html','true',[],'','']
	],'',''],
	['PAGE','54301',jdecode('Lampenshop'),jdecode(''),'/54301.html','true',[],'',''],
	['PAGE','7026',jdecode('G%C3%A4stebuch'),jdecode(''),'/7026/index.html','true',[ 
		['PAGE','7027',jdecode('Eintr%C3%A4ge'),jdecode(''),'/7026/7027.html','false',[],'','']
	],'',''],
	['PAGE','8519',jdecode('Links'),jdecode(''),'/8519.html','true',[],'','']];
var siteelementCount=37;
theSitetree.topTemplateName='Circulation';
theSitetree.paletteFamily='B1942D';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10587';
theSitetree.graphicsetId='10563';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Circulation',
				paletteFamily: 	'B1942D',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10587',
				graphicsetId: 	'10563',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4529',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-7026ABW0X0INXSTI']={
webappId:    '1002',
documentId:  '7026',
internalId:  '7026ABW0X0INXSTI',
customField: 'icq=false'
};
webappMappings['1501']=webappMappings['1501-96520']={
webappId:    '1501',
documentId:  '4529',
internalId:  '96520',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4529',
internalId:  '',
customField: '20090125-125609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20090125-125838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4829',
internalId:  '',
customField: '20070713-213300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7708',
internalId:  '',
customField: '20060906-165237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12736',
internalId:  '',
customField: '20090125-135621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83801',
internalId:  '',
customField: '20070715-131828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6982',
internalId:  '',
customField: '20060915-081701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4856',
internalId:  '',
customField: '20060626-142630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49101',
internalId:  '',
customField: '20060912-193207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11164',
internalId:  '',
customField: '20070716-143305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11191',
internalId:  '',
customField: '20070715-140154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11218',
internalId:  '',
customField: '20061027-143450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54322',
internalId:  '',
customField: '20060913-195500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56601',
internalId:  '',
customField: '20061030-091818'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4883',
internalId:  '',
customField: '20070704-235721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49901',
internalId:  '',
customField: '20060905-220454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10725',
internalId:  '',
customField: '20070705-222355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49922',
internalId:  '',
customField: '20060905-215117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10752',
internalId:  '',
customField: '20060628-111214'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20070706-222030'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10463',
internalId:  '',
customField: '20070706-222338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19796',
internalId:  '',
customField: '20060702-141117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10779',
internalId:  '',
customField: '20060629-075352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10806',
internalId:  '',
customField: '20070706-221729'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12628',
internalId:  '',
customField: '20060628-170347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10833',
internalId:  '',
customField: '20060628-170922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10490',
internalId:  '',
customField: '20061015-124552'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10860',
internalId:  '',
customField: '20070706-222204'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41001',
internalId:  '',
customField: '20070706-221612'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4910',
internalId:  '',
customField: '20060626-151852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12655',
internalId:  '',
customField: '20070706-223220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14501',
internalId:  '',
customField: '20060628-173312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12682',
internalId:  '',
customField: '20060628-173343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54301',
internalId:  '',
customField: '20080706-230728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7026',
internalId:  '',
customField: '20060626-124308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7027',
internalId:  '',
customField: '20060626-124308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8519',
internalId:  '',
customField: '20070719-165955'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXSTI';
var companyName   = 'h+r+u+p+.+o+r+g';
var htmlTitle	  = 'Die+Familie+Hrup';
var metaKeywords  = 'Petroleumlampen+Hrup+petrol+katzen';
var metaContents  = 'Familie+Hrup+Petroleumlampen+petromax+petrollampe+shop';
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();
};

