/* [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','14701',jdecode('Home'),jdecode(''), jdecode('%2F14701.html'), 'true',[],'',''],
	['PAGE','14752',jdecode('Hundephysiotherapie'),jdecode(''), jdecode('%2F14752.html'), 'true',[],'',''],
	['PAGE','14773',jdecode('Anwendungen'),jdecode(''), jdecode('%2F14773.html'), 'true',[],'',''],
	['PAGE','14794',jdecode('Indikationen+%2B+Ziele'),jdecode(''), jdecode('%2F14794.html'), 'true',[],'',''],
	['PAGE','14815',jdecode('Therapieablauf'),jdecode(''), jdecode('%2F14815.html'), 'true',[],'',''],
	['PAGE','14836',jdecode('%C3%9Cber+mich'),jdecode(''), jdecode('%2F14836.html'), 'true',[],'',''],
	['PAGE','14857',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F14857.html'), 'true',[],'',''],
	['PAGE','14878',jdecode('Kontakt+%2B+Links'),jdecode(''), jdecode('%2F14878.html'), 'true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Handout';
theSitetree.paletteFamily='8AAB35';
theSitetree.keyvisualId='11651';
theSitetree.keyvisualName='kv_11651.jpg';
theSitetree.fontsetId='32956';
theSitetree.graphicsetId='13990';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='8AAB35';
var localeDef={
  language: 'de',
  country: 'DE'
};
var prodDef={
  wl_name: 'alfahosting',
  product: 'WSCSYSSSSLY0XNIF'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Handout',
				paletteFamily: 	'8AAB35',
				keyvisualId: 	'11651',
				keyvisualName: 	'kv_11651.jpg',
				fontsetId: 		'32956',
				graphicsetId: 	'13990',
				contentColor: 	'FFFFFF',
				contentBGColor: '8AAB35',
				a_color: 		'FFFFFF',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7002']=webappMappings['7002-3733']={
webappId:    '7002',
documentId:  '14857',
internalId:  '3733',
customField: 'language:de;country:DE;'
};
webappMappings['7008']=webappMappings['7008-5134']={
webappId:    '7008',
documentId:  '14878',
internalId:  '5134',
customField: 'language:de;country:DE;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20110320-174930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14752',
internalId:  '',
customField: '20100613-182705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14773',
internalId:  '',
customField: '20110210-185337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14794',
internalId:  '',
customField: '20110210-185106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14815',
internalId:  '',
customField: '20110920-181829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14836',
internalId:  '',
customField: '20100613-182453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14857',
internalId:  '',
customField: '20100512-202600'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14878',
internalId:  '',
customField: '20110920-180913'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '14701',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'cgi-wsc.alfahosting.de:80';
var canonHostname = 'wsc.alfahosting.de';
var accountId     = 'AAHS10IN2DRE';
var companyName   = 'Hundephysiotherapie+in+Tirol%2F+Innsbruck';
var htmlTitle	  = 'Hundephysiotherapie+Innsbruck+Tirol+Reha+Physio+Therapiebegleitung+f%C3%BCr+Hunde';
var metaKeywords  = 'Hundephysiotherapie%2C+Innsbruck%2C+Tirol%2C+Reha%2C+Hunde+Physiotherapie%2C+Hundephysiotherapeut%2C+Physio%2C+Hund%2C+Reha%2C+Rehabilitation%2C+Innsbruck%2C+Tirol%2C+%C3%96sterreich%2C+Massage%2C+Bewegungstherapie%2C+Krankengymnastik%2C+Tier%2C+Therapie%2C+Tierarzt%2C+Claudia%2C+mobil%2C+Training%2C+Ern%C3%A4hrung%2C+fit%2C+Physiotherapeut%2C+Hundephysiotherapie%2C+Operation%2C+Unfall%2C+HD%2C+dogs';
var metaContents  = 'Hundephysiotherapie+Innsbruck+Tirol+mobile+Physiotherapie+Hundephysio+Hunde+Katzen+Innsbruck+Hundephysiotherapeut+Tirol+Rehabilitation';
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();
};

