/* [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','4498',jdecode('Aktuell'),jdecode(''), jdecode('%2F4498.html'), 'true',[],'',''],
	['PAGE','4555',jdecode('Company'),jdecode(''), jdecode('%2F4555.html'), 'true',[],'',''],
	['PAGE','4582',jdecode('++++Team'),jdecode(''), jdecode('%2F4582.html'), 'true',[],'',''],
	['PAGE','4609',jdecode('Kollektion'),jdecode(''), jdecode('%2F4609%2Findex.html'), 'true',[ 
		['PAGE','43801',jdecode('Stretchcol'),jdecode(''), jdecode('%2F4609%2F43801.html'), 'true',[],'',''],
		['PAGE','13103',jdecode('Smellproof'),jdecode(''), jdecode('%2F4609%2F13103.html'), 'true',[],'',''],
		['PAGE','30001',jdecode('Smellproof+plus'),jdecode(''), jdecode('%2F4609%2F30001.html'), 'true',[],'',''],
		['PAGE','22303',jdecode('Folklore'),jdecode(''), jdecode('%2F4609%2F22303.html'), 'true',[],'',''],
		['PAGE','21630',jdecode('Dressy-System'),jdecode(''), jdecode('%2F4609%2F21630.html'), 'true',[],'',''],
		['PAGE','61612',jdecode('Poloshirts'),jdecode(''), jdecode('%2F4609%2F61612.html'), 'true',[],'','']
	],'',''],
	['PAGE','4636',jdecode('Corporate'),jdecode(''), jdecode('%2F4636.html'), 'true',[],'',''],
	['PAGE','18403',jdecode('Handel'),jdecode(''), jdecode('%2F18403%2Findex.html'), 'true',[ 
		['PAGE','39501',jdecode('Stretchcol-H%C3%A4ndler'),jdecode(''), jdecode('%2F18403%2F39501.html'), 'true',[],'','']
	],'',''],
	['PAGE','4690',jdecode('Partner'),jdecode(''), jdecode('%2F4690.html'), 'true',[],'',''],
	['PAGE','15902',jdecode('Anfahrt'),jdecode(''), jdecode('%2F15902%2Findex.html'), 'true',[ 
		['PAGE','16002',jdecode('So+finden+Sie+uns'),jdecode(''), jdecode('%2F15902%2F16002.html'), 'true',[],'',''],
		['PAGE','17703',jdecode('Fabrikladen'),jdecode(''), jdecode('%2F15902%2F17703.html'), 'true',[],'','']
	],'',''],
	['PAGE','4663',jdecode('Kontakt'),jdecode(''), jdecode('%2F4663%2Findex.html'), 'true',[ 
		['PAGE','9102',jdecode('6.+Kontakt+%28Folgeseite%29'),jdecode(''), jdecode('%2F4663%2F9102.html'), 'false',[],'','']
	],'',''],
	['PAGE','16032',jdecode('G%C3%A4stebuch'),jdecode(''), jdecode('%2F16032%2Findex.html'), 'true',[ 
		['PAGE','16033',jdecode('Eintr%C3%A4ge'),jdecode(''), jdecode('%2F16032%2F16033.html'), 'false',[],'','']
	],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Steps';
theSitetree.paletteFamily='726C60';
theSitetree.keyvisualId='2287';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='367';
theSitetree.graphicsetId='421';
theSitetree.contentColor='D9D7D2';
theSitetree.contentBGColor='726C60';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'hostpoint',
  product: 'WSCSYSSSSLYTC21F'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Steps',
				paletteFamily: 	'726C60',
				keyvisualId: 	'2287',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'367',
				graphicsetId: 	'421',
				contentColor: 	'D9D7D2',
				contentBGColor: '726C60',
				a_color: 		'726C60',
				b_color: 		'888173',
				c_color: 		'3366CC',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4555',
internalId:  '',
customField: '20091127-131659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4498',
internalId:  '',
customField: '20110331-075453'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4498',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4582',
internalId:  '',
customField: '20110909-073232'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '15902',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '16002',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['1002']=webappMappings['1002-16032ahp010inecku']={
webappId:    '1002',
documentId:  '16032',
internalId:  '16032ahp010inecku',
customField: 'icq=false'
};
webappMappings['7008']=webappMappings['7008-827']={
webappId:    '7008',
documentId:  '4663',
internalId:  '827',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4609',
internalId:  '',
customField: '20120203-152835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43801',
internalId:  '',
customField: '20110114-131932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13103',
internalId:  '',
customField: '20070512-143243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20070512-143553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22303',
internalId:  '',
customField: '20070512-143933'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21630',
internalId:  '',
customField: '20070512-144332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4636',
internalId:  '',
customField: '20070512-144434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18403',
internalId:  '',
customField: '20110816-080601'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39501',
internalId:  '',
customField: '20091127-131356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4690',
internalId:  '',
customField: '20070823-165538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15902',
internalId:  '',
customField: '20070326-082343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16002',
internalId:  '',
customField: '20070512-144817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17703',
internalId:  '',
customField: '20091127-131912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4663',
internalId:  '',
customField: '20070326-082440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9102',
internalId:  '',
customField: '20050708-202800'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16032',
internalId:  '',
customField: '20070326-082517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16033',
internalId:  '',
customField: '20070326-082537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61612',
internalId:  '',
customField: '20110331-074723'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'Ahp010INECKU';
var companyName   = 'metzler+SWITZERLAND';
var htmlTitle	  = 'metzler+shirts+and+blouses+-+switzerland';
var metaKeywords  = 'hemden+hemd+shirt+shirts+metzler+switzerland+schweiz+stretchcol+priesterhemden+folklore+mass+masshemden+einzelanfertigung+marc+thombard+balgach+mastro+heidi+tino+qualit%EF%BF%BDt+reissverschlusshemden+design-hemden+TMC+corporate+identity+fashion+smellproof+blouses+krawatten+polizei-hemden+spezial-hemden+herrenhemden+individuell';
var metaContents  = 'wir+sind+seit+1911+hemden+und+blusen+spezialist+in+der+schweiz.+die+kollektionen+bewegen+sich+zwischen+top+modisch+bis+vornehm+klassisch.+massanfertigung+geh%EF%BF%BDren+ebenso+zu+unserer+kompetenz+wie+einzelanfertigungen+und+massenanfertigungen+f%EF%BF%BDr+firmen+und+beh%EF%BF%BDrden+mit+deren+logo.+erfahrung+kann+mann+kaufen+ist+nicht+nur+ein+aussagekr%EF%BF%BDftiger+werbesolgan%2C+sondern+f%EF%BF%BDr+uns+eine+verpflichtung.+';
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();
};

