/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','142201',jdecode('Hundesalon+Amira'),jdecode(''), jdecode('%2F142201.html'), 'true',[],'',''],
	['PAGE','66601',jdecode('Kontakt'),jdecode(''), jdecode('%2F66601.html'), 'true',[],'',''],
	['PAGE','124901',jdecode('Filme'),jdecode(''), jdecode('%2F124901.html'), 'true',[],'',''],
	['PAGE','72501',jdecode('H%C3%BCndinnen'),jdecode(''), jdecode('%2F72501.html'), 'true',[],'',''],
	['PAGE','124701',jdecode('R%C3%BCden'),jdecode(''), jdecode('%2F124701%2Findex.html'), 'true',[ 
		['PAGE','72522',jdecode('Ulysses+Mali+Zmaj'),jdecode(''), jdecode('%2F124701%2F72522.html'), 'true',[],'',''],
		['PAGE','124622',jdecode('Nicolas+Cage+vom+Awarenring'),jdecode(''), jdecode('%2F124701%2F124622.html'), 'true',[],'','']
	],'',''],
	['PAGE','473',jdecode('Zwergpinscher'),jdecode(''), jdecode('%2F473.html'), 'true',[],'',''],
	['PAGE','30101',jdecode('Zwerg-+und+Toypudel'),jdecode(''), jdecode('%2F30101.html'), 'true',[],'',''],
	['PAGE','57601',jdecode('W%C3%BCrfe'),jdecode(''), jdecode('%2F57601%2Findex.html'), 'true',[ 
		['PAGE','127701',jdecode('K+-+Zwergpinscher'),jdecode(''), jdecode('%2F57601%2F127701.html'), 'true',[],'',''],
		['PAGE','97001',jdecode('J+-+Zwergpinscher'),jdecode(''), jdecode('%2F57601%2F97001.html'), 'true',[],'',''],
		['PAGE','72543',jdecode('I+-+Toypudel'),jdecode(''), jdecode('%2F57601%2F72543.html'), 'true',[],'',''],
		['PAGE','42901',jdecode('H+-+Zwergpinscher'),jdecode(''), jdecode('%2F57601%2F42901.html'), 'true',[],'',''],
		['PAGE','33501',jdecode('G+-+Toypudel'),jdecode(''), jdecode('%2F57601%2F33501.html'), 'true',[],'',''],
		['PAGE','32501',jdecode('F+-+Zwergpudel'),jdecode(''), jdecode('%2F57601%2F32501.html'), 'true',[],'',''],
		['PAGE','126301',jdecode('E+-+Zwergpudel'),jdecode(''), jdecode('%2F57601%2F126301.html'), 'true',[],'',''],
		['PAGE','114701',jdecode('Sachkundenachweis'),jdecode(''), jdecode('%2F57601%2F114701.html'), 'true',[],'','']
	],'',''],
	['PAGE','494',jdecode('Meine+Rottweiler'),jdecode(''), jdecode('%2F494%2Findex.html'), 'true',[ 
		['PAGE','24701',jdecode('Fotos'),jdecode(''), jdecode('%2F494%2F24701.html'), 'true',[],'','']
	],'',''],
	['PAGE','74501',jdecode('Galerie'),jdecode(''), jdecode('%2F74501%2Findex.html'), 'true',[ 
		['PAGE','106001',jdecode('Erinnerungen'),jdecode(''), jdecode('%2F74501%2F106001.html'), 'true',[],'','']
	],'',''],
	['PAGE','557',jdecode('Links'),jdecode(''), jdecode('%2F557.html'), 'true',[],'',''],
	['PAGE','97022',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F97022.html'), 'true',[],'','']];
var siteelementCount=25;
theSitetree.topTemplateName='Speed';
theSitetree.paletteFamily='3F751D';
theSitetree.keyvisualId='2342';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='375';
theSitetree.graphicsetId='425';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3F751D';
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: 			'Speed',
				paletteFamily: 	'3F751D',
				keyvisualId: 	'2342',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'375',
				graphicsetId: 	'425',
				contentColor: 	'FFFFFF',
				contentBGColor: '3F751D',
				a_color: 		'3F751D',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20120203-121826'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20110425-164908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30101',
internalId:  '',
customField: '20100718-150112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57601',
internalId:  '',
customField: '20110918-193032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42901',
internalId:  '',
customField: '20100718-145637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33501',
internalId:  '',
customField: '20100306-161926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32501',
internalId:  '',
customField: '20110730-122000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20080207-062105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24701',
internalId:  '',
customField: '20110425-151231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66601',
internalId:  '',
customField: '20090104-113420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '557',
internalId:  '',
customField: '20081130-191922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72543',
internalId:  '',
customField: '20090906-185412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72501',
internalId:  '',
customField: '20110425-164308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72522',
internalId:  '',
customField: '20110730-113443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74501',
internalId:  '',
customField: '20110730-122336'
};
webappMappings['1002']=webappMappings['1002-97022abw1x0inekvd']={
webappId:    '1002',
documentId:  '97022',
internalId:  '97022abw1x0inekvd',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97001',
internalId:  '',
customField: '20110425-162430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '97022',
internalId:  '',
customField: '20100704-121009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106001',
internalId:  '',
customField: '20110425-142324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114701',
internalId:  '',
customField: '20100816-145202'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124701',
internalId:  '',
customField: '20110730-103516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124622',
internalId:  '',
customField: '20110730-112815'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '124901',
internalId:  '',
customField: '20110730-120008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126301',
internalId:  '',
customField: '20110730-121448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '127701',
internalId:  '',
customField: '20120203-122832'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '142201',
internalId:  '-',
customField: '20120127-135527'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW1X0INEKVD';
var companyName   = 'Ellwood%27s+Pudel+und+Zwergpinscher';
var htmlTitle	  = '';
var metaKeywords  = 'Zwergpinscher%0AZwergpudel%0AToypudel';
var metaContents  = 'Hundezucht';
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();
};

