/* [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','901',jdecode('Home'),jdecode(''),'/901.html','true',[],'',''],
	['PAGE','952',jdecode('%C3%9Cber+mich'),jdecode(''),'/952.html','true',[],'',''],
	['PAGE','26201',jdecode('Reborns'),jdecode(''),'/26201/index.html','true',[ 
		['PAGE','26222',jdecode('News+%2F+Pl%C3%A4ne'),jdecode(''),'/26201/26222.html','true',[],'',''],
		['PAGE','973',jdecode('Verkaufte+Modelle'),jdecode(''),'/26201/973.html','true',[],'',''],
		['PAGE','63601',jdecode('Modelle+zum+Verkauf'),jdecode(''),'/26201/63601.html','true',[],'',''],
		['PAGE','95101',jdecode('Babies+nach+Vorlage'),jdecode(''),'/26201/95101.html','true',[],'','']
	],'',''],
	['PAGE','994',jdecode('Katzen'),jdecode(''),'/994/index.html','true',[ 
		['PAGE','24401',jdecode('News+%2F+Pl%C3%A4ne'),jdecode(''),'/994/24401.html','true',[],'',''],
		['PAGE','1036',jdecode('A-Wurf+%28Loona%29'),jdecode(''),'/994/1036.html','true',[],'',''],
		['PAGE','30901',jdecode('B-Wurf+%28Giulia%29'),jdecode(''),'/994/30901.html','true',[],'',''],
		['PAGE','61301',jdecode('C-Wurf+%28Gina%29'),jdecode(''),'/994/61301.html','true',[],'',''],
		['PAGE','72701',jdecode('D-Wurf+%28Shiva%29'),jdecode(''),'/994/72701.html','true',[],'',''],
		['PAGE','103001',jdecode('E-Wurf+%28Loona%29'),jdecode(''),'/994/103001.html','true',[],'',''],
		['PAGE','153301',jdecode('F-Wurf+%28Giulia%29'),jdecode(''),'/994/153301.html','true',[],'',''],
		['PAGE','86101',jdecode('Kleine+Kitten+ganz+gross'),jdecode(''),'/994/86101.html','true',[],'','']
	],'',''],
	['PAGE','1057',jdecode('Kontakt'),jdecode(''),'/1057.html','true',[],'',''],
	['PAGE','24306',jdecode('G%C3%A4stebuch'),jdecode(''),'/24306/index.html','true',[ 
		['PAGE','24301',jdecode('Eintr%C3%A4ge'),jdecode(''),'/24306/24301.html','false',[],'','']
	],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Draft';
theSitetree.paletteFamily='2D50A1';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10399';
theSitetree.graphicsetId='10611';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='2D50A1';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Draft',
				paletteFamily: 	'2D50A1',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10399',
				graphicsetId: 	'10611',
				contentColor: 	'FFFFFF',
				contentBGColor: '2D50A1',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D09868',
				e_color: 		'9E9E9F',
				f_color: 		'051E56',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '901',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-24306abw0x0ineac6']={
webappId:    '1002',
documentId:  '24306',
internalId:  '24306abw0x0ineac6',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20081123-130849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '994',
internalId:  '',
customField: '20100503-113133'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '952',
internalId:  '',
customField: '20100503-112719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26201',
internalId:  '',
customField: '20081209-235819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26222',
internalId:  '',
customField: '20100121-200414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '973',
internalId:  '',
customField: '20100316-090141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24401',
internalId:  '',
customField: '20100503-113621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1036',
internalId:  '',
customField: '20090427-202556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30901',
internalId:  '',
customField: '20100313-140216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61301',
internalId:  '',
customField: '20100313-140245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1057',
internalId:  '',
customField: '20100503-114324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24306',
internalId:  '',
customField: '20080917-190319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24301',
internalId:  '',
customField: '20080917-190354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63601',
internalId:  '',
customField: '20100316-085932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72701',
internalId:  '',
customField: '20090625-201710'
};
webappMappings['7008']=webappMappings['7008-3131']={
webappId:    '7008',
documentId:  '1057',
internalId:  '3131',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '86101',
internalId:  '',
customField: '20091002-143055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95101',
internalId:  '',
customField: '20090513-193651'
};
webappMappings['1501']=webappMappings['1501-26960531']={
webappId:    '1501',
documentId:  '901',
internalId:  '26960531',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103001',
internalId:  '',
customField: '20091029-083015'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153301',
internalId:  '',
customField: '20091228-205703'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INEAC6';
var companyName   = 'kuschelbabies';
var htmlTitle	  = 'reborn+-+kuschelbabies+-+britisch+kurzhaar+-+cocker+spaniel';
var metaKeywords  = 'BKH++Britisch+Kurzhaar++Hobbyzucht++Katzenzucht++Deckkater+BKH++Reborn++Babypuppen++Dolls++K%C3%BCnstlerpuppen++Franziska+Schneider+Kuschelbabies+Deckkater+z%C3%BCchten+Rebornbaby+Puppe+Kitten+Katzen+Dolls+Aufzucht+Spaniel+Cockerspaniel+Cocker+Spaniel+Hundezucht+Hunde+Xango+Xanstream+Mangostan+Network-Marketing+MLM+Nebenjob+Zusatzeinkommen+Englisch+Cockerspaniel+Welpen';
var metaContents  = 'Britisch+Kurzhaar++Reborn++Babypuppen++Franziska+Schneider++BKH++Hobbyzucht++Kuschelbabies+Katzenzucht+Deckkater+z%C3%BCchten+Rebornbaby+Puppe+Kitten+Katzen+Dolls+Aufzucht+Spaniel+Cockerspaniel+Cocker+Spaniel+Hundezucht+Hunde+xango+xanstream+mangostan+network-marketing+mlm+nebenjob+zusatzeinkommen+Englisch+Cockerspaniel+Welpen';
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();
};
