/* [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 theSitetree=[ 
	['PAGE','1501',jdecode('Home'),jdecode(''),'/1501.html','true',[],''],
	['PAGE','2201',jdecode('Angebot'),jdecode(''),'/2201.html','true',[],''],
	['PAGE','2101',jdecode('Willi+Wyss'),jdecode(''),'/2101.html','true',[],''],
	['PAGE','2222',jdecode('SHOP'),jdecode(''),'/2222.html','true',[],''],
	['PAGE','2243',jdecode('Kundenfeedback'),jdecode(''),'/2243.html','true',[],''],
	['PAGE','6901',jdecode('G%C3%A4stebuch'),jdecode(''),'/6901.html','true',[],''],
	['PAGE','2901',jdecode('Referenzen'),jdecode(''),'/2901.html','true',[],''],
	['PAGE','2285',jdecode('Links'),jdecode(''),'/2285.html','true',[],''],
	['PAGE','4401',jdecode('Aktuelles'),jdecode(''),'/4401.html','true',[],''],
	['PAGE','3501',jdecode('Kontakt'),jdecode(''),'/3501.html','true',[],'']];
var siteelementCount=10;
theSitetree.topTemplateName='Holiday';
theSitetree.paletteFamily='557ECA';
theSitetree.keyvisualId='6097';
theSitetree.keyvisualName='kv_6097.jpg';
theSitetree.fontsetId='11129';
theSitetree.graphicsetId='11925';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='7DA3E8';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				name: 			'Holiday',
				paletteFamily: 	'557ECA',
				keyvisualId: 	'6097',
				keyvisualName: 	'kv_6097.jpg',
				fontsetId: 		'11129',
				graphicsetId: 	'11925',
				contentColor: 	'FFFFFF',
				contentBGColor: '7DA3E8',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1501',
internalId:  '',
customField: '20091102-155011'
};
webappMappings['4001']=webappMappings['4001-1465208']={
webappId:    '4001',
documentId:  '2222',
internalId:  '1465208',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20090508-114032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20090508-120117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3501',
internalId:  '',
customField: '20091031-155551'
};
webappMappings['7008']=webappMappings['7008-1589']={
webappId:    '7008',
documentId:  '3501',
internalId:  '1589',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2222',
internalId:  '',
customField: '20090625-223346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2243',
internalId:  '',
customField: '20090508-112609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20090508-112811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2285',
internalId:  '',
customField: '20090508-112853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4401',
internalId:  '',
customField: '20090508-115947'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1002']=webappMappings['1002-6901awb010inxv88']={
webappId:    '1002',
documentId:  '6901',
internalId:  '6901awb010inxv88',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20090610-112812'
};
webappMappings['1501']=webappMappings['1501-1974927']={
webappId:    '1501',
documentId:  '1501',
internalId:  '1974927',
customField: '1501'
};
var canonHostname = 'wsc02.webland.ch';
var accountId     = 'AWB010INXV88';
var companyName   = 'ORTHOP%C3%84DIE-TECHNIK++++++++++WILLI++WYSS++++++++++++++Olten';
var htmlTitle	  = 'Orthop%C3%A4die-Technik+Wyss%2C+Olten+-+Massgefertigte+Schuheinlagen+%26+hochwertige+Ballenpolster%2C+Schuhe';
var metaKeywords  = 'Orthop%C3%A4dietechnik%2C+Schuheinlagen%2C+Schuhe%2C+Pumps%2C+Higheels%2C+F%C3%BCsse%2C+Spitzensportler%2C+Bernhard+Russi%2C+Markus+Riffel%2C+Meta+Antennen%2C+Wyss+super+comfort%2C+Massanfertigung%2C+Ganganalyse%2C+Bewegungsanalyse+per+Computer%2C+kompetente+Beratung%2C+Beratung%2C+individuell%2C+Orthop%C3%A4die%2C+Lisa+Maito%2C+Aelo%2C+Blue+Woman%2C+Leistungssportler%2C+Kundenbetreuung%2C+handgefertigte+Herstellung%2C+massgefertigte+Schuheinlagen%2C+Schuheinlagen%2C+Leistungssportler%2C+Statik+des+Fusses%2C+Olten%2C+Schweiz%2C+Willi+Wyss%2C+Ballenpolster%2C+Fotomodelle%2C+Mannequins%2C+Models%2C+Tangot%C3%A4nzerinnen%2C+T%C3%A4nzerinnen%2C+modebewusste+Damen%2C+Statik+des+Fusses%2C+Absatzschuhe%2C+verbesserte+Lebensqualit%C3%A4t%2C+Lebensqualit%C3%A4t%2C+Tango%2C+Anima%2C+Christian+Englert';
var metaContents  = 'Orthop%C3%A4dietechnik%2C+Schuheinlagen%2C+Massanfertigung+durch+Gang-+und+Bewegungsanalyse+per+Computer%2C+individuelle+und+kompetente+Beratung.+Intensive+Kundenbetreuung+und+pers%C3%B6nliche%2C+handgefertigte+Herstellung+von+massgefertigten+Schuheinlagen+und+Ballenpolster.+Mit+meinen+Schuheinlagen+ver%C3%A4ndere+ich+nicht+nur+die+Statik+des+Fusses+sondern%2C+wenn+n%C3%B6tig%2C+das+ganze+Skelett+um+Millimeter%2C+was+bei+Kn%C3%B6chel%2C+Knie%2C+H%C3%BCftprobleme+einen+grossen+Erfolg+mit+sich+bringt.+Sie+werden+in+den+Genuss+einer+verbesserten+Lebensqualit%C3%A4t+kommen%21+Zu+meinen+Kunden+geh%C3%B6ren+Leistungssportler%2C+Privatpersonen%2C+Models%2C+Fotomodelle%2C+Mannequins%2C+T%C3%A4nzerinnen%2C+Tangot%C3%A4nzerinnen%2C+modebewusste+Damen%2C+Bernhard+Russi%2C+Meta+Antennen%2C+Markus+Riffel%2C+Lisa+maito%2C+Aelo%2C+Blue+Woman%2C+Anima%2C+Christian+Englert';
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();
};
