/* [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(''), jdecode('%2F4529.html'), 'true',[],'',''],
	['PAGE','4721',jdecode('Pr%C3%BCfungsordnung'),jdecode(''), jdecode('%2F4721%2Findex.html'), 'true',[ 
		['PAGE','4748',jdecode('Unterordnung'),jdecode(''), jdecode('%2F4721%2F4748.html'), 'true',[],'',''],
		['PAGE','4775',jdecode('F%C3%A4hrten'),jdecode(''), jdecode('%2F4721%2F4775.html'), 'true',[],'',''],
		['PAGE','4802',jdecode('Sachenrevier%2FWegrandsuche'),jdecode(''), jdecode('%2F4721%2F4802.html'), 'true',[],'',''],
		['PAGE','4829',jdecode('Geb%C3%A4udedurchsuchung'),jdecode(''), jdecode('%2F4721%2F4829.html'), 'true',[],'',''],
		['PAGE','4856',jdecode('Personenrevier'),jdecode(''), jdecode('%2F4721%2F4856.html'), 'true',[],'',''],
		['PAGE','4883',jdecode('Schutzdienst'),jdecode(''), jdecode('%2F4721%2F4883.html'), 'true',[],'',''],
		['PAGE','18301',jdecode('Pr%C3%BCfungen%2FEvents'),jdecode(''), jdecode('%2F4721%2F18301.html'), 'true',[],'','']
	],'',''],
	['PAGE','4667',jdecode('Club-H%C3%BCtten'),jdecode(''), jdecode('%2F4667.html'), 'true',[],'',''],
	['PAGE','4640',jdecode('Galerie'),jdecode(''), jdecode('%2F4640%2Findex.html'), 'true',[ 
		['PAGE','5910',jdecode('Fotos+1'),jdecode(''), jdecode('%2F4640%2F5910.html'), 'true',[],'',''],
		['PAGE','4694',jdecode('Fotos+2'),jdecode(''), jdecode('%2F4640%2F4694.html'), 'true',[],'',''],
		['PAGE','12402',jdecode('Fotos+3'),jdecode(''), jdecode('%2F4640%2F12402.html'), 'true',[],'',''],
		['PAGE','33701',jdecode('Fotos+4'),jdecode(''), jdecode('%2F4640%2F33701.html'), 'true',[],'',''],
		['PAGE','38727',jdecode('Film+1'),jdecode(''), jdecode('%2F4640%2F38727.html'), 'true',[],'','']
	],'',''],
	['PAGE','4937',jdecode('Kontakt'),jdecode(''), jdecode('%2F4937.html'), 'true',[],'',''],
	['PAGE','6011',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F6011%2Findex.html'), 'true',[ 
		['PAGE','6012',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F6011%2F6012.html'), 'true',[],'','']
	],'',''],
	['PAGE','39727',jdecode('Schweizermeisterschaft+2007'),jdecode(''), jdecode('%2F39727.html'), 'true',[],'',''],
	['PAGE','42024',jdecode('Spurencup+2012'),jdecode(''), jdecode('%2F42024.html'), 'true',[],'',''],
	['PAGE','46501',jdecode('Fr%C3%BChlingspr%C3%BCfung+2011'),jdecode(''), jdecode('%2F46501.html'), 'true',[],'',''],
	['PAGE','49701',jdecode('Herbstpr%C3%BCfungen+2011'),jdecode(''), jdecode('%2F49701.html'), 'true',[],'',''],
	['PAGE','41664',jdecode('Sachkundenachweis'),jdecode(''), jdecode('%2F41664.html'), 'true',[],'',''],
	['PAGE','25901',jdecode('NEWS+und+%C3%9Cbungsplan'),jdecode(''), jdecode('%2F25901.html'), 'true',[],'',''],
	['PAGE','43701',jdecode('SCHUTZDIENST-Training'),jdecode(''), jdecode('%2F43701.html'), 'true',[],'',''],
	['PAGE','40644',jdecode('Das+Aktuelle+VIDEO'),jdecode(''), jdecode('%2F40644.html'), 'true',[],'',''],
	['PAGE','4910',jdecode('Links'),jdecode(''), jdecode('%2F4910.html'), 'true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Basic';
theSitetree.paletteFamily='2E681F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10829';
theSitetree.graphicsetId='11286';
theSitetree.contentColor='2E681F';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Basic',
				paletteFamily: 	'2E681F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10829',
				graphicsetId: 	'11286',
				contentColor: 	'2E681F',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4529',
internalId:  '',
customField: '20100224-110138'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25901',
internalId:  '',
customField: '20120207-185544'
};
webappMappings['1501']=webappMappings['1501-2433077']={
webappId:    '1501',
documentId:  '4529',
internalId:  '2433077',
customField: '1501'
};
webappMappings['1002']=webappMappings['1002-6011ABW0X0INXLBC']={
webappId:    '1002',
documentId:  '6011',
internalId:  '6011ABW0X0INXLBC',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39727',
internalId:  '',
customField: '20071112-211603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4721',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4748',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4775',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4802',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4829',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4856',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4883',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18301',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4667',
internalId:  '',
customField: '20110517-180620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4640',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5910',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4694',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12402',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33701',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38727',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4937',
internalId:  '',
customField: '20100128-083244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6011',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6012',
internalId:  '',
customField: '20070113-090113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4910',
internalId:  '',
customField: '20101129-164245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40644',
internalId:  '',
customField: '20120130-115415'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '49701',
internalId:  '-',
customField: '20111107-092608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46501',
internalId:  '',
customField: '20110616-183036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41664',
internalId:  '',
customField: '20101129-185836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42024',
internalId:  '',
customField: '20120207-183201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43701',
internalId:  '',
customField: '20110918-134855'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXLBC';
var companyName   = 'Diensthunde-Besitzer+Verein+Bern';
var htmlTitle	  = '';
var metaKeywords  = 'Diensthunde+Diensthundebesitzer+Polizeihund+Polizeihundef%C3%BChrer+Diensthundeausbildung+Hundesport+Hundeausbildung+Unterordnung+F%C3%A4hrten+Schutzdienst+Deutscher+Sch%C3%A4ferhund+Malinois+Rottweiler+Riesenschnautzer+Boxer+Belgischer+Sch%C3%A4ferhund+Vollschutzanzug+Waldrevier+Personenrevier+Geb%C3%A4udedurchsuchung+Sicherheitsdienst+Bewachung+%C3%9Cberwachung+Begleithund+Familienhund+Riggisberg+Wichtrach+Worb+Verein+++';
var metaContents  = 'Homepage+des+Diensthundebesitzer-Vereins+Bern%2C+der+Verein+f%C3%BCr+die+Diensthundeausbildung';
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();
};

