/* [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','501',jdecode('Portrait+%2F+Ethik'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','477712',jdecode('Welpen+%2F+Spiele'),jdecode(''), jdecode('%2F477712.html'), 'true',[],'',''],
	['PAGE','247301',jdecode('Wurfplanung+'),jdecode(''), jdecode('%2F247301.html'), 'true',[],'',''],
	['PAGE','529433',jdecode('Aktuell+-+News'),jdecode(''), jdecode('%2F529433.html'), 'true',[],'',''],
	['PAGE','455512',jdecode('Meine+Hunde'),jdecode(''), jdecode('%2F455512%2Findex.html'), 'true',[ 
		['PAGE','615',jdecode('Cher'),jdecode(''), jdecode('%2F455512%2F615.html'), 'true',[],'',''],
		['PAGE','453312',jdecode('Debby'),jdecode(''), jdecode('%2F455512%2F453312.html'), 'true',[],'',''],
		['PAGE','453333',jdecode('Kaj'),jdecode(''), jdecode('%2F455512%2F453333.html'), 'true',[],'',''],
		['PAGE','453354',jdecode('Ulana'),jdecode(''), jdecode('%2F455512%2F453354.html'), 'true',[],'',''],
		['PAGE','453375',jdecode('Br%C3%BCnggi'),jdecode(''), jdecode('%2F455512%2F453375.html'), 'true',[],'',''],
		['PAGE','453396',jdecode('Arija'),jdecode(''), jdecode('%2F455512%2F453396.html'), 'true',[],'',''],
		['PAGE','455112',jdecode('Brava'),jdecode(''), jdecode('%2F455512%2F455112.html'), 'true',[],'',''],
		['PAGE','453417',jdecode('S%C3%A4nti'),jdecode(''), jdecode('%2F455512%2F453417.html'), 'true',[],'','']
	],'',''],
	['PAGE','212501',jdecode('K%C3%A4uferfotos'),jdecode(''), jdecode('%2F212501%2Findex.html'), 'true',[ 
		['PAGE','544612',jdecode('K%C3%A4ufer+X-Wurf'),jdecode(''), jdecode('%2F212501%2F544612.html'), 'true',[],'',''],
		['PAGE','565212',jdecode('K%C3%A4ufer+Y-Wurf'),jdecode(''), jdecode('%2F212501%2F565212.html'), 'true',[],'','']
	],'',''],
	['PAGE','473912',jdecode('Appenz.Varianten'),jdecode(''), jdecode('%2F473912%2Findex.html'), 'true',[ 
		['PAGE','594',jdecode('Havannas'),jdecode(''), jdecode('%2F473912%2F594.html'), 'true',[],'',''],
		['PAGE','473833',jdecode('Schilt+oder+Plattenhund'),jdecode(''), jdecode('%2F473912%2F473833.html'), 'true',[],'','']
	],'',''],
	['PAGE','30901',jdecode('Fotoalbum'),jdecode(''), jdecode('%2F30901%2Findex.html'), 'true',[ 
		['PAGE','213801',jdecode('Br%C3%BCnggi'),jdecode(''), jdecode('%2F30901%2F213801.html'), 'true',[],'',''],
		['PAGE','295301',jdecode('Arija+%2F+Brava'),jdecode(''), jdecode('%2F30901%2F295301.html'), 'true',[],'',''],
		['PAGE','435301',jdecode('S%C3%A4nti+'),jdecode(''), jdecode('%2F30901%2F435301.html'), 'true',[],'',''],
		['PAGE','463412',jdecode('Fotos+vom+Grossrudel+08'),jdecode(''), jdecode('%2F30901%2F463412.html'), 'true',[],'',''],
		['PAGE','28301',jdecode('Veteranen'),jdecode(''), jdecode('%2F30901%2F28301.html'), 'true',[],'',''],
		['PAGE','67801',jdecode('X-Wurf+%2F+Fotos+'),jdecode(''), jdecode('%2F30901%2F67801.html'), 'true',[],'',''],
		['PAGE','527312',jdecode('Y-Wurf+%2F+Fotos'),jdecode(''), jdecode('%2F30901%2F527312.html'), 'true',[],'','']
	],'',''],
	['PAGE','573',jdecode('Gesichtsausdr%C3%BCcke'),jdecode(''), jdecode('%2F573.html'), 'true',[],'',''],
	['PAGE','460312',jdecode('Blindenhunde'),jdecode(''), jdecode('%2F460312%2Findex.html'), 'true',[ 
		['PAGE','464112',jdecode('Junghundtrainerin'),jdecode(''), jdecode('%2F460312%2F464112.html'), 'true',[],'',''],
		['PAGE','242201',jdecode('Walko+'),jdecode(''), jdecode('%2F460312%2F242201.html'), 'true',[],'',''],
		['PAGE','460612',jdecode('IV-Abnahmen'),jdecode(''), jdecode('%2F460312%2F460612.html'), 'true',[],'',''],
		['PAGE','460812',jdecode('Spaziergang+mit+Farso'),jdecode(''), jdecode('%2F460312%2F460812.html'), 'true',[],'',''],
		['PAGE','460112',jdecode('Auf+F%C3%BChrhunde+ist+Verlass'),jdecode(''), jdecode('%2F460312%2F460112.html'), 'true',[],'','']
	],'',''],
	['PAGE','529412',jdecode('Welpenanalyse'),jdecode(''), jdecode('%2F529412.html'), 'true',[],'',''],
	['PAGE','515312',jdecode('Swiss+Mantrailing'),jdecode(''), jdecode('%2F515312.html'), 'true',[],'',''],
	['PAGE','427101',jdecode('%C3%84ltere+Br%C3%BCnggberghunde'),jdecode(''), jdecode('%2F427101.html'), 'true',[],'',''],
	['PAGE','450301',jdecode('Andenken'),jdecode(''), jdecode('%2F450301.html'), 'true',[],'',''],
	['PAGE','427801',jdecode('Mein+erster+Appenzeller'),jdecode(''), jdecode('%2F427801.html'), 'true',[],'',''],
	['PAGE','8401',jdecode('Kontakt+'),jdecode(''), jdecode('%2F8401.html'), 'true',[],'',''],
	['PAGE','212522',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F212522.html'), 'true',[],'',''],
	['PAGE','249801',jdecode('Links+%2F+Literatur'),jdecode(''), jdecode('%2F249801.html'), 'true',[],'','']];
var siteelementCount=42;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='4A587F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10344';
theSitetree.graphicsetId='10449';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='4A587F';
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: 			'Akropolis',
				paletteFamily: 	'4A587F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10344',
				graphicsetId: 	'10449',
				contentColor: 	'FFFFFF',
				contentBGColor: '4A587F',
				a_color: 		'4A587F',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20120124-135744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67801',
internalId:  '',
customField: '20120130-145504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '615',
internalId:  '',
customField: '20111122-123159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20110724-104930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28301',
internalId:  '',
customField: '20120118-162911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30901',
internalId:  '',
customField: '20120203-172513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20110815-182346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20110616-123731'
};
webappMappings['1002']=webappMappings['1002-212522abw0x0in2vv0']={
webappId:    '1002',
documentId:  '212522',
internalId:  '212522abw0x0in2vv0',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212522',
internalId:  '',
customField: '20100817-200653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212501',
internalId:  '',
customField: '20120203-164454'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '213801',
internalId:  '',
customField: '20120125-184127'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '242201',
internalId:  '',
customField: '20120131-143536'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '247301',
internalId:  '',
customField: '20111231-165725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '249801',
internalId:  '',
customField: '20120125-160721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '295301',
internalId:  '',
customField: '20120102-170519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '427101',
internalId:  '',
customField: '20110511-150021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '427801',
internalId:  '',
customField: '20110219-170651'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '435301',
internalId:  '',
customField: '20120124-184814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '450301',
internalId:  '',
customField: '20110524-142013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '453312',
internalId:  '',
customField: '20111122-123237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '453333',
internalId:  '',
customField: '20111122-123314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '453354',
internalId:  '',
customField: '20111122-123348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '453375',
internalId:  '',
customField: '20111122-123422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '453396',
internalId:  '',
customField: '20111122-123456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '453417',
internalId:  '',
customField: '20111122-123542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '455112',
internalId:  '',
customField: '20111202-133647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '455512',
internalId:  '',
customField: '20120106-101728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460312',
internalId:  '',
customField: '20120129-182400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460112',
internalId:  '',
customField: '20110622-164034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460612',
internalId:  '',
customField: '20110720-173903'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '460812',
internalId:  '',
customField: '20110720-174412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '463412',
internalId:  '',
customField: '20120131-110404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '464112',
internalId:  '',
customField: '20110720-173759'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473912',
internalId:  '',
customField: '20110820-185316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473833',
internalId:  '',
customField: '20111101-160852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '477712',
internalId:  '',
customField: '20120205-110210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '529412',
internalId:  '',
customField: '20111025-135134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515312',
internalId:  '',
customField: '20120126-184053'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '544612',
internalId:  '-',
customField: '20120202-153457'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '527312',
internalId:  '',
customField: '20120108-145230'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '529433',
internalId:  '',
customField: '20120205-105712'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '565212',
internalId:  '-',
customField: '20120202-131821'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2VV0';
var companyName   = 'Br%C3%BCnggberghunde';
var htmlTitle	  = 'Appenzeller+Welpen%2C+Familien-+und+Sporthunde.+Der+Allrounder+f%C3%BCr+die+Familie.';
var metaKeywords  = 'Welpen%2C+Appenzeller-Welpen%2C+Appenzeller+Sennenhunde%2C+Sennenhunde%2C+Hunde%2C+Zuchtplanung%2C+dogs%2C+puppies%2C+Arbeitshunde%2C++Familienhunde%2C+Appenzellerfotos%2C+Foto%2C+havannabraun%2C+Allrounder%2C+Sporthunde%2C+Certodog%2C+Zuchtst%C3%A4tte%2C+Zucht%2C+Hundezucht%2C+Z%C3%BCchter%2C+Br%C3%BCnggberg%2C+Br%C3%BCnggberghunde%2C+Kyburg%2C+Winterthur%2C+Weisslingen%2C+Topdogs%2C+Tophunde%2C+dreifarbig%2C+schwarz-braun-weiss%2C+havannabraun-braun-weiss%2C+Blindenhunde%2C+Doris+Meier%2C+Meier+Doris%2C+Blindenf%C3%BChrhunde%2C+F%C3%BChrhunde%2C';
var metaContents  = 'Doris+Meier+informiert+%C3%BCber+Appenzeller+Sennenhunde.+Der+temperamentvolle+Allrounder+f%C3%BCr+Sport-+und+Familien.+Top+aktuelle+Welpen-Infos+und+viele+Fotos.+';
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();
};

