/* [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','144412',jdecode('Startseite'),jdecode(''), jdecode('%2F144412.html'), 'true',[],'',''],
	['PAGE','118812',jdecode('Welpeninfos'),jdecode(''), jdecode('%2F118812.html'), 'true',[],'',''],
	['PAGE','123712',jdecode('Welpenkauf'),jdecode(''), jdecode('%2F123712.html'), 'true',[],'',''],
	['PAGE','105512',jdecode('+Welpenfotos'),jdecode(''), jdecode('%2F105512.html'), 'true',[],'',''],
	['PAGE','117312',jdecode('Ausbildung'),jdecode(''), jdecode('%2F117312.html'), 'true',[],'',''],
	['PAGE','104112',jdecode('Weiterbildung'),jdecode(''), jdecode('%2F104112.html'), 'true',[],'',''],
	['PAGE','71312',jdecode('Wissenswerte+Infos'),jdecode(''), jdecode('%2F71312.html'), 'true',[],'',''],
	['PAGE','129712',jdecode('Nachkommen'),jdecode(''), jdecode('%2F129712.html'), 'true',[],'',''],
	['PAGE','105912',jdecode('Fotos+von+Z%C3%B6glingen'),jdecode(''), jdecode('%2F105912.html'), 'true',[],'',''],
	['PAGE','95412',jdecode('Welpenpr%C3%A4gung'),jdecode(''), jdecode('%2F95412.html'), 'true',[],'',''],
	['PAGE','5001',jdecode('Geschichte'),jdecode(''), jdecode('%2F5001.html'), 'true',[],'',''],
	['PAGE','4718',jdecode('Bilder'),jdecode(''), jdecode('%2F4718.html'), 'true',[],'',''],
	['PAGE','22701',jdecode('Infos+SKN+Kurs'),jdecode(''), jdecode('%2F22701.html'), 'true',[],'',''],
	['PAGE','4691',jdecode('Pflegetipps'),jdecode(''), jdecode('%2F4691.html'), 'true',[],'',''],
	['PAGE','4745',jdecode('unsere+Zuchtst%C3%A4tte'),jdecode(''), jdecode('%2F4745.html'), 'true',[],'',''],
	['PAGE','63812',jdecode('Zuchtr%C3%BCden'),jdecode(''), jdecode('%2F63812.html'), 'true',[],'',''],
	['PAGE','27922',jdecode('Ausstellungen'),jdecode(''), jdecode('%2F27922.html'), 'true',[],'',''],
	['PAGE','10552',jdecode('Kontakt'),jdecode(''), jdecode('%2F10552.html'), 'true',[],'',''],
	['PAGE','46012',jdecode('neues+G%C3%A4stebuch'),jdecode(''), jdecode('%2F46012.html'), 'true',[],'',''],
	['PAGE','124112',jdecode('+10+Hundew%C3%BCnsche'),jdecode(''), jdecode('%2F124112.html'), 'true',[],'',''],
	['PAGE','58012',jdecode('Regenbogenbr%C3%BCcke'),jdecode(''), jdecode('%2F58012.html'), 'true',[],'',''],
	['PAGE','22785',jdecode('Links++++'),jdecode(''), jdecode('%2F22785.html'), 'true',[],'',''],
	['PAGE','133612',jdecode('Der+Z%C3%BCchter'),jdecode(''), jdecode('%2F133612.html'), 'true',[],'',''],
	['PAGE','96812',jdecode('Hundegedichte'),jdecode(''), jdecode('%2F96812.html'), 'true',[],'',''],
	['PAGE','10501',jdecode(''),jdecode(''), jdecode('%2F10501.html'), 'true',[],'',''],
	['PAGE','144012',jdecode(''),jdecode(''), jdecode('%2F144012.html'), 'true',[],'',''],
	['PAGE','144063',jdecode(''),jdecode(''), jdecode('%2F144063.html'), 'true',[],'',''],
	['PAGE','143512',jdecode(''),jdecode(''), jdecode('%2F143512%2Findex.html'), 'true',[ 
		['PAGE','146412',jdecode('%C3%BCber+mich'),jdecode(''), jdecode('%2F143512%2F146412.html'), 'true',[],'','']
	],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Vegas';
theSitetree.paletteFamily='782D81';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='16925';
theSitetree.graphicsetId='12331';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='782D81';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'true',
				name: 			'Vegas',
				paletteFamily: 	'782D81',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'16925',
				graphicsetId: 	'12331',
				contentColor: 	'FFFFFF',
				contentBGColor: '782D81',
				a_color: 		'782D81',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22785',
internalId:  '',
customField: '20111115-191016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10501',
internalId:  '',
customField: '20111105-212122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96812',
internalId:  '',
customField: '20111105-212720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71312',
internalId:  '',
customField: '20111104-114418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20111112-000848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4718',
internalId:  '',
customField: '20110416-095940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4745',
internalId:  '',
customField: '20101210-115542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22701',
internalId:  '',
customField: '20111104-110641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27922',
internalId:  '',
customField: '20101118-183137'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4691',
internalId:  '',
customField: '20111105-211604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10552',
internalId:  '',
customField: '20110920-152559'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46012',
internalId:  '',
customField: '20120104-205213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95412',
internalId:  '',
customField: '20111020-122328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58012',
internalId:  '',
customField: '20110911-204435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63812',
internalId:  '',
customField: '20111105-212632'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '144012',
internalId:  '-',
customField: '20120104-205954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104112',
internalId:  '',
customField: '20111113-195113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117312',
internalId:  '',
customField: '20120125-204835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105512',
internalId:  '',
customField: '20111104-105753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105912',
internalId:  '',
customField: '20110914-110445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118812',
internalId:  '',
customField: '20120125-203902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123712',
internalId:  '',
customField: '20120113-093733'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124112',
internalId:  '',
customField: '20110526-203928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129712',
internalId:  '',
customField: '20111026-162313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '133612',
internalId:  '',
customField: '20111026-163018'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '144412',
internalId:  '-',
customField: '20120125-203736'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '143512',
internalId:  '-',
customField: '20120104-191904'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '144063',
internalId:  '-',
customField: '20120104-205954'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '144412',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2KAD';
var companyName   = 'Havaneser-Zucht+vom+Burgweiher';
var htmlTitle	  = 'Die+Havaneser+Zucht+vom+Burgweiher+Schweiz';
var metaKeywords  = 'havaneser+havaneserzucht+zwerghunde+herkunft+pflege+bolonka+bichon+havanais+welpen+havaneserwelpen+stammbaum+hundesalon+groomer+havaneserclub+silk+dog+zucht+fellpflege+hundeschule+welpenspielgruppe+joya+verein+havaneserz%C3%BCchter+gesundheit+pflege+skn+kurse+cuba+Info+weiterbildung+havaneserwelpen+welpenspiele+aufzucht+hundepflege+havaneser+club+inserate+herkunft+silkdog+welpen+gute+z%C3%BCchter+tierpfleger+z%C3%BCchterseminar+schweiz+tierpfleger+tierschutz+langhaarhunde+tierheim+havana+zucht+welpenaufzucht+gl%C3%BCckliche+havaneserwelpen+eduqua+zertifiziert+ausbildung+sc-akademie+intro+%C3%BCberspringen+havaneserhunde+anfahrt+st.gallen';
var metaContents  = 'havaneser+zwerghunde+hunde+bichon+havanais+pflege+havaneserzucht+havaneserclub+langhaarhunde+havaneserwelpen+stammbaum+verein+hundesalon+groomer+silk+dog+zucht+fellpflege+hundeschule+welpenspielgruppe+joya+havaneserz%C3%BCchter+verein+skn+kurse+havaneserwelpen+welpenspiele+aufzucht+havaneser+club+inserate+herkunft+silkdog+welpen+gute+z%C3%BCchter+tierpfleger+z%C3%BCchterseminar+schweiz+tierpfleger+tierschutz+langhaarhunde+tierheim+havana+zucht+welpenaufzucht+gl%C3%BCckliche+havaneserwelpen+eduqua+zertificat+ausbildung+sc-ausbildung++hundez%C3%BCchter+intro+%C3%BCberspringen+havaneserhunde+anfahrt+st.gallen';
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();
};

