/* [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','14106',jdecode('Hundem%C3%A4ntel'),jdecode(''),'/14106/index.html','true',[ 
		['PAGE','61822',jdecode('Winterm%C3%A4ntel'),jdecode(''),'/14106/61822.html','true',[],'',''],
		['PAGE','164001',jdecode('Regenm%C3%A4ntel'),jdecode(''),'/14106/164001.html','true',[],'',''],
		['PAGE','164022',jdecode('Diverse'),jdecode(''),'/14106/164022.html','true',[],'',''],
		['PAGE','61843',jdecode('Sportlinie'),jdecode(''),'/14106/61843.html','true',[],'',''],
		['PAGE','195101',jdecode('Masse+%2F+Anleitung'),jdecode(''),'/14106/195101.html','true',[],'','']
	],'',''],
	['PAGE','166401',jdecode('Hundeschlafsack'),jdecode(''),'/166401/index.html','true',[ 
		['PAGE','217612',jdecode('English+Style'),jdecode(''),'/166401/217612.html','true',[],'',''],
		['PAGE','234423',jdecode('Country+Style'),jdecode(''),'/166401/234423.html','true',[],'',''],
		['PAGE','217633',jdecode('Safari+Line'),jdecode(''),'/166401/217633.html','true',[],'',''],
		['PAGE','217675',jdecode('Auto%2FReisen'),jdecode(''),'/166401/217675.html','true',[],'','']
	],'',''],
	['PAGE','136401',jdecode('Schlafpl%C3%A4tze+'),jdecode(''),'/136401.html','true',[],'',''],
	['PAGE','193501',jdecode('Snood+'),jdecode(''),'/193501.html','true',[],'',''],
	['PAGE','236523',jdecode('Taschen+...'),jdecode(''),'/236523.html','true',[],'',''],
	['PAGE','191001',jdecode('Stoffe+'),jdecode(''),'/191001.html','true',[],'',''],
	['PAGE','272423',jdecode('Halsb%C3%A4nder'),jdecode(''),'/272423.html','true',[],'',''],
	['PAGE','209201',jdecode('Kundengalerie'),jdecode(''),'/209201/index.html','true',[ 
		['PAGE','230723',jdecode('Schlafs%C3%A4cke'),jdecode(''),'/209201/230723.html','true',[],'','']
	],'',''],
	['PAGE','256823',jdecode('AGB'),jdecode(''),'/256823.html','true',[],'',''],
	['PAGE','142001',jdecode('Kontakt'),jdecode(''),'/142001.html','true',[],'',''],
	['PAGE','14022',jdecode('Whippet+Neo'),jdecode(''),'/14022/index.html','true',[ 
		['PAGE','14043',jdecode('Resultate+und+Bilder'),jdecode(''),'/14022/14043.html','true',[],'',''],
		['PAGE','14085',jdecode('Kira'),jdecode(''),'/14022/14085.html','true',[],'',''],
		['PAGE','61906',jdecode('Luna'),jdecode(''),'/14022/61906.html','true',[],'','']
	],'',''],
	['PAGE','14127',jdecode('Links'),jdecode(''),'/14127.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='A4A4AC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10451';
theSitetree.contentColor='1d1d20';
theSitetree.contentBGColor='A4A4AC';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Akropolis',
				paletteFamily: 	'A4A4AC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10451',
				contentColor: 	'1d1d20',
				contentBGColor: 'A4A4AC',
				a_color: 		'A4A4AC',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
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: '20100831-003034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14106',
internalId:  '',
customField: '20100513-164728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61822',
internalId:  '',
customField: '20100513-171021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61843',
internalId:  '',
customField: '20100331-143424'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '136401',
internalId:  '',
customField: '20100611-000921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14022',
internalId:  '',
customField: '20100105-174814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14043',
internalId:  '',
customField: '20100510-235347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14085',
internalId:  '',
customField: '20090323-153611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61906',
internalId:  '',
customField: '20090214-192355'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '256823',
internalId:  '',
customField: '20100513-001001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14127',
internalId:  '',
customField: '20100512-000008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '272423',
internalId:  '',
customField: '20100817-235207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '142001',
internalId:  '',
customField: '20100105-233314'
};
webappMappings['7008']=webappMappings['7008-1660']={
webappId:    '7008',
documentId:  '142001',
internalId:  '1660',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '234423',
internalId:  '',
customField: '20100611-001346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217675',
internalId:  '',
customField: '20100616-150217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '195101',
internalId:  '',
customField: '20100106-154613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193501',
internalId:  '',
customField: '20100822-234007'
};
webappMappings['1501']=webappMappings['1501-1309558']={
webappId:    '1501',
documentId:  '4596',
internalId:  '1309558',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '209201',
internalId:  '',
customField: '20100719-145940'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217612',
internalId:  '',
customField: '20100719-143853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '191001',
internalId:  '',
customField: '20100831-001847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '230723',
internalId:  '',
customField: '20100719-145616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164022',
internalId:  '',
customField: '20100513-171745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '164001',
internalId:  '',
customField: '20100513-171353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217633',
internalId:  '',
customField: '20100518-172813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '166401',
internalId:  '',
customField: '20100608-235911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '236523',
internalId:  '',
customField: '20100831-002902'
};
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0INX2FC';
var companyName   = 'Yvolon+Design';
var htmlTitle	  = 'Yvolon+Design+%2F+Hundem%C3%A4ntel+und+Schlafs%C3%A4cke';
var metaKeywords  = 'Windhundmantel+%2C+Windhundmaentel%2C++Whippetmantel%2C++Whippetmaentel%2C++Hundemaentel%2C++Hundemantel%2C++Hundemantel+Fleece%2C++Fleece%2C+Softsehll%2C+Hundedecken%2C+Windhhunddecken%2C+Hundeschlafsack%2C+Whippetschlafsack%2C+windhundm%C3%A4ntel%2C+whippetm%C3%A4ntel%2C+whippet+m%C3%A4ntel%2C+whippet+mantel%2C+galgo+mantel%2C+galgomantel%2C+windhund+mantel%2C+windhund+m%C3%A4ntel';
var metaContents  = 'Ich+stelle+Windhundm%C3%A4ntel+%28Whippetm%C3%A4ntel%2C+Galgo-Greym%C3%A4ntel%29+und+Hundem%C3%A4ntel+f%C3%BCr+andere+Rassen+aus+hochwertigem+Soft+Shell+Stoff+%28Wind+und+Wasserdicht%29+oder+Fleece+her.+Auch+Hundeschlafs%C3%A4cke+vorallem+f%C3%BCr+Windhunde+und+Hunde+mit+kurzem+Fell%2C+werden+von+Hand+nach+Kundenwunsch+angefertigt.+';
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();
};
