/* [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','4596',jdecode('Home'),jdecode(''),'/4596.html','true',[],'',''],
	['PAGE','147501',jdecode('News+2010'),jdecode(''),'/147501/index.html','true',[ 
		['PAGE','123101',jdecode('News+2009'),jdecode(''),'/147501/123101.html','true',[],'','']
	],'',''],
	['PAGE','4653',jdecode('Appalachian%26%23x27%3Bs'),jdecode(''),'/4653.html','true',[],'',''],
	['PAGE','4680',jdecode('Weilenleute'),jdecode(''),'/4680.html','true',[],'',''],
	['PAGE','136201',jdecode('Unser+Rudel'),jdecode(''),'/136201/index.html','true',[ 
		['PAGE','4707',jdecode('MIN+'),jdecode(''),'/136201/4707.html','true',[],'',''],
		['PAGE','115101',jdecode('Anarya'),jdecode(''),'/136201/115101.html','true',[],'',''],
		['PAGE','75864',jdecode('Biiwana+'),jdecode(''),'/136201/75864.html','true',[],'',''],
		['PAGE','136222',jdecode('Dasha'),jdecode(''),'/136201/136222.html','true',[],'',''],
		['PAGE','66138',jdecode('Onyx+'),jdecode(''),'/136201/66138.html','true',[],'',''],
		['PAGE','118201',jdecode('Onyx+Nachkommen'),jdecode(''),'/136201/118201.html','true',[],'','']
	],'',''],
	['PAGE','4734',jdecode('Unsere+W%C3%BCrfe'),jdecode(''),'/4734/index.html','true',[ 
		['PAGE','66165',jdecode('B-Wurf'),jdecode(''),'/4734/66165.html','true',[],'',''],
		['PAGE','66192',jdecode('C-Wurf'),jdecode(''),'/4734/66192.html','true',[],'',''],
		['PAGE','56438',jdecode('D-Wurf'),jdecode(''),'/4734/56438.html','true',[],'',''],
		['PAGE','72393',jdecode('E-Wurf'),jdecode(''),'/4734/72393.html','true',[],'',''],
		['PAGE','118222',jdecode('F-Wurf'),jdecode(''),'/4734/118222.html','true',[],'',''],
		['PAGE','140201',jdecode('G-Wurf'),jdecode(''),'/4734/140201.html','true',[],'','']
	],'',''],
	['PAGE','76214',jdecode('In+Memoria+-+Chima'),jdecode(''),'/76214.html','true',[],'',''],
	['PAGE','4761',jdecode('rund+um+den+Toller'),jdecode(''),'/4761.html','true',[],'',''],
	['PAGE','135301',jdecode('Familienhund+Toller%3F'),jdecode(''),'/135301.html','true',[],'',''],
	['PAGE','118243',jdecode('Fotos'),jdecode(''),'/118243.html','true',[],'',''],
	['PAGE','66219',jdecode('Links+Kontakte'),jdecode(''),'/66219.html','true',[],'','']];
var siteelementCount=24;
theSitetree.topTemplateName='Fellow';
theSitetree.paletteFamily='FF9600';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10637';
theSitetree.graphicsetId='10694';
theSitetree.contentColor='666666';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Fellow',
				paletteFamily: 	'FF9600',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10637',
				graphicsetId: 	'10694',
				contentColor: 	'666666',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4596',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4596',
internalId:  '',
customField: '20100211-134846'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '115101',
internalId:  '',
customField: '20100122-130905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4653',
internalId:  '',
customField: '20090209-020951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4680',
internalId:  '',
customField: '20091021-112724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76214',
internalId:  '',
customField: '20090209-021429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4707',
internalId:  '',
customField: '20080520-095600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66138',
internalId:  '',
customField: '20091021-115238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75864',
internalId:  '',
customField: '20090604-202606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4734',
internalId:  '',
customField: '20090925-220947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66165',
internalId:  '',
customField: '20080708-104611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66192',
internalId:  '',
customField: '20091123-170741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56438',
internalId:  '',
customField: '20081024-193701'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72393',
internalId:  '',
customField: '20091123-171123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4761',
internalId:  '',
customField: '20091226-190158'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66219',
internalId:  '',
customField: '20091024-140118'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118201',
internalId:  '',
customField: '20100122-124828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118222',
internalId:  '',
customField: '20100105-152825'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '118243',
internalId:  '',
customField: '20090416-164435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123101',
internalId:  '',
customField: '20100105-151038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135301',
internalId:  '',
customField: '20090604-204402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136201',
internalId:  '',
customField: '20090604-154152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136222',
internalId:  '',
customField: '20090626-153836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '140201',
internalId:  '',
customField: '20100211-150655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '147501',
internalId:  '',
customField: '20100122-124330'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INXX3H';
var companyName   = 'Appalachian%27s+Toller';
var htmlTitle	  = 'Appalachians+Nova+Scotia+Duck+Tolling+Retriever';
var metaKeywords  = 'Appalachians%2C+Nova+Scotia+Duck+Tolling+Retriever';
var metaContents  = 'Appalachians+Nova+Scotia+Duck+Tolling+Retriever%2C+famili%EF%BF%BDre+Toller+Zucht+in+der+Schweiz%2C+Unsere+Hunde%2C+Objibwas+Minwaa%2C++Tollartrollets+Onyx%2C+Casarrondo+Anarya%2C+Welpen%2C+Apportier-+und+Wasserhunde';
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();
};
