/* [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','1101',jdecode('HOME'),jdecode(''), jdecode('%2F1101.html'), 'true',[],'',''],
	['PAGE','1152',jdecode('OCC.+MASCHINEN'),jdecode(''), jdecode('%2F1152%2Findex.html'), 'true',[ 
		['PAGE','27801',jdecode('ABSAUGANLAGE'),jdecode(''), jdecode('%2F1152%2F27801.html'), 'true',[],'',''],
		['PAGE','5701',jdecode('BOHRMASCHINEN'),jdecode(''), jdecode('%2F1152%2F5701.html'), 'true',[],'',''],
		['PAGE','23401',jdecode('DREHBAENKE'),jdecode(''), jdecode('%2F1152%2F23401.html'), 'true',[],'',''],
		['PAGE','63401',jdecode('ENTGRATMASCHINE'),jdecode(''), jdecode('%2F1152%2F63401.html'), 'true',[],'',''],
		['PAGE','13901',jdecode('FR%C3%84SMASCHINEN'),jdecode(''), jdecode('%2F1152%2F13901.html'), 'true',[],'',''],
		['PAGE','19801',jdecode('SCHLEIFMASCHINEN'),jdecode(''), jdecode('%2F1152%2F19801.html'), 'true',[],'','']
	],'',''],
	['PAGE','39201',jdecode('WERKZEUG'),jdecode(''), jdecode('%2F39201%2Findex.html'), 'true',[ 
		['PAGE','38401',jdecode('3-BACKENFUTTER'),jdecode(''), jdecode('%2F39201%2F38401.html'), 'true',[],'',''],
		['PAGE','35422',jdecode('ABRICHTGERAET'),jdecode(''), jdecode('%2F39201%2F35422.html'), 'true',[],'',''],
		['PAGE','80101',jdecode('AKTENSCHRANK'),jdecode(''), jdecode('%2F39201%2F80101.html'), 'true',[],'',''],
		['PAGE','45601',jdecode('BUEGELMESSSCHRAUBE'),jdecode(''), jdecode('%2F39201%2F45601.html'), 'true',[],'',''],
		['PAGE','50101',jdecode('DREHSTAHLHALTER'),jdecode(''), jdecode('%2F39201%2F50101.html'), 'true',[],'',''],
		['PAGE','81801',jdecode('ENDMASS'),jdecode(''), jdecode('%2F39201%2F81801.html'), 'true',[],'',''],
		['PAGE','43643',jdecode('ELEKTROMOTOR'),jdecode(''), jdecode('%2F39201%2F43643.html'), 'true',[],'',''],
		['PAGE','59001',jdecode('FILIEREN%2FGEWINDESCHNEID.'),jdecode(''), jdecode('%2F39201%2F59001.html'), 'true',[],'',''],
		['PAGE','87201',jdecode('GEWINDESCHNEIDKOPF'),jdecode(''), jdecode('%2F39201%2F87201.html'), 'true',[],'',''],
		['PAGE','58401',jdecode('GEWINDELEHRRING'),jdecode(''), jdecode('%2F39201%2F58401.html'), 'true',[],'',''],
		['PAGE','54901',jdecode('GRANITPLATTE'),jdecode(''), jdecode('%2F39201%2F54901.html'), 'true',[],'',''],
		['PAGE','92501',jdecode('HANDAUFLAGE'),jdecode(''), jdecode('%2F39201%2F92501.html'), 'true',[],'',''],
		['PAGE','33222',jdecode('H%C3%96HENMESSANREISS'),jdecode(''), jdecode('%2F39201%2F33222.html'), 'true',[],'',''],
		['PAGE','76301',jdecode('MESSAPPARAT'),jdecode(''), jdecode('%2F39201%2F76301.html'), 'true',[],'',''],
		['PAGE','46501',jdecode('MESSUHREN'),jdecode(''), jdecode('%2F39201%2F46501.html'), 'true',[],'',''],
		['PAGE','74001',jdecode('MORSEKEGEL+SPIRALBOHRER'),jdecode(''), jdecode('%2F39201%2F74001.html'), 'true',[],'',''],
		['PAGE','40101',jdecode('KUGELUMLAUFSPINDEL'),jdecode(''), jdecode('%2F39201%2F40101.html'), 'true',[],'',''],
		['PAGE','33201',jdecode('PLANFR%C3%84SERSET'),jdecode(''), jdecode('%2F39201%2F33201.html'), 'true',[],'',''],
		['PAGE','52501',jdecode('PR%C3%84ZISIONS-UNTERLAGEN'),jdecode(''), jdecode('%2F39201%2F52501.html'), 'true',[],'',''],
		['PAGE','55801',jdecode('REINIGUNGSBEH%C3%84LTER'),jdecode(''), jdecode('%2F39201%2F55801.html'), 'true',[],'',''],
		['PAGE','28801',jdecode('RUNDTISCH'),jdecode(''), jdecode('%2F39201%2F28801.html'), 'true',[],'',''],
		['PAGE','76422',jdecode('SPINDEL'),jdecode(''), jdecode('%2F39201%2F76422.html'), 'true',[],'',''],
		['PAGE','67101',jdecode('SCHEIBENAUFNAHME'),jdecode(''), jdecode('%2F39201%2F67101.html'), 'true',[],'',''],
		['PAGE','81201',jdecode('SCHLEIFSCHEIBEN'),jdecode(''), jdecode('%2F39201%2F81201.html'), 'true',[],'',''],
		['PAGE','94101',jdecode('SCHWENKL%C3%96FFEL'),jdecode(''), jdecode('%2F39201%2F94101.html'), 'true',[],'',''],
		['PAGE','32201',jdecode('SPANNZANGEN'),jdecode(''), jdecode('%2F39201%2F32201.html'), 'true',[],'',''],
		['PAGE','42301',jdecode('SCHRAUBSTOECKE'),jdecode(''), jdecode('%2F39201%2F42301.html'), 'true',[],'',''],
		['PAGE','27301',jdecode('SPAHNMULDE'),jdecode(''), jdecode('%2F39201%2F27301.html'), 'true',[],'',''],
		['PAGE','53701',jdecode('STECKDOSENVERTEILER'),jdecode(''), jdecode('%2F39201%2F53701.html'), 'true',[],'',''],
		['PAGE','40901',jdecode('TRAPETSGEWINDE'),jdecode(''), jdecode('%2F39201%2F40901.html'), 'true',[],'',''],
		['PAGE','57001',jdecode('UNIVERSALLEUCHTE'),jdecode(''), jdecode('%2F39201%2F57001.html'), 'true',[],'',''],
		['PAGE','51701',jdecode('VER.+REITSTOCK'),jdecode(''), jdecode('%2F39201%2F51701.html'), 'true',[],'',''],
		['PAGE','61501',jdecode('WERKSTATTWAGEN'),jdecode(''), jdecode('%2F39201%2F61501.html'), 'true',[],'',''],
		['PAGE','91001',jdecode('WERKZEUGHALTER'),jdecode(''), jdecode('%2F39201%2F91001.html'), 'true',[],'',''],
		['PAGE','43622',jdecode('ZANGENSET'),jdecode(''), jdecode('%2F39201%2F43622.html'), 'true',[],'','']
	],'',''],
	['PAGE','1173',jdecode('PRODUKTE'),jdecode(''), jdecode('%2F1173.html'), 'true',[],'',''],
	['PAGE','10001',jdecode('MASCHINENPARK'),jdecode(''), jdecode('%2F10001.html'), 'true',[],'',''],
	['PAGE','1194',jdecode('KONTAKT'),jdecode(''), jdecode('%2F1194%2Findex.html'), 'true',[ 
		['PAGE','1236',jdecode('IMPRESSUM'),jdecode(''), jdecode('%2F1194%2F1236.html'), 'true',[],'',''],
		['PAGE','13501',jdecode('KONTOINFORMATIONEN'),jdecode(''), jdecode('%2F1194%2F13501.html'), 'true',[],'','']
	],'',''],
	['PAGE','6901',jdecode('IHR+WEG+ZU+UNS'),jdecode(''), jdecode('%2F6901.html'), 'true',[],'','']];
var siteelementCount=50;
theSitetree.topTemplateName='Cuy';
theSitetree.paletteFamily='F7FDFD';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='385';
theSitetree.graphicsetId='438';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='F7FDFD';
var localeDef={
  language: 'fr',
  country: 'FR'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cuy',
				paletteFamily: 	'F7FDFD',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'385',
				graphicsetId: 	'438',
				contentColor: 	'000000',
				contentBGColor: 'F7FDFD',
				a_color: 		'F7FDFD',
				b_color: 		'E4E5C0',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '6901',
internalId:  'routing',
customField: 'de_CH'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1101',
internalId:  '',
customField: '20091021-095408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10001',
internalId:  '',
customField: '20080717-173712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1152',
internalId:  '',
customField: '20100526-104712'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20110818-091321'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20110112-083827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19801',
internalId:  '',
customField: '20110328-105547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23401',
internalId:  '',
customField: '20110818-091227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63401',
internalId:  '',
customField: '20100526-103253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27801',
internalId:  '',
customField: '20100526-102523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76301',
internalId:  '',
customField: '20090415-152429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74001',
internalId:  '',
customField: '20090406-114310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92501',
internalId:  '',
customField: '20091026-143630'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39201',
internalId:  '',
customField: '20100526-104741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28801',
internalId:  '',
customField: '20090112-091103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38401',
internalId:  '',
customField: '20100526-110236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32201',
internalId:  '',
customField: '20090428-095444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76422',
internalId:  '',
customField: '20090407-130731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67101',
internalId:  '',
customField: '20090126-143254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50101',
internalId:  '',
customField: '20081223-105828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58401',
internalId:  '',
customField: '20090113-100921'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59001',
internalId:  '',
customField: '20090113-101610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33201',
internalId:  '',
customField: '20081031-105655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40101',
internalId:  '',
customField: '20081114-111616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87201',
internalId:  '',
customField: '20091002-101924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40901',
internalId:  '',
customField: '20081114-115348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51701',
internalId:  '',
customField: '20081223-113516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42301',
internalId:  '',
customField: '20090428-100345'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91001',
internalId:  '',
customField: '20091026-135036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35422',
internalId:  '',
customField: '20081103-150122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33222',
internalId:  '',
customField: '20090428-101331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52501',
internalId:  '',
customField: '20090105-154312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43622',
internalId:  '',
customField: '20090428-101350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43643',
internalId:  '',
customField: '20081121-134238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53701',
internalId:  '',
customField: '20090109-130348'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57001',
internalId:  '',
customField: '20090112-133622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54901',
internalId:  '',
customField: '20090112-090415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46501',
internalId:  '',
customField: '20081127-090450'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45601',
internalId:  '',
customField: '20081223-110224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61501',
internalId:  '',
customField: '20090407-154459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55801',
internalId:  '',
customField: '20090112-102455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27301',
internalId:  '',
customField: '20090428-101512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1173',
internalId:  '',
customField: '20080725-112750'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1194',
internalId:  '',
customField: '20080717-173726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1236',
internalId:  '',
customField: '20080717-103947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20080717-143233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6901',
internalId:  '',
customField: '20080717-173740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80101',
internalId:  '',
customField: '20090408-103634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81201',
internalId:  '',
customField: '20090408-110110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '81801',
internalId:  '',
customField: '20090408-113910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '94101',
internalId:  '',
customField: '20091026-145210'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01a.bluewin.ch';
var accountId     = 'ABW0X0IN2MN0';
var companyName   = 'Musico+Pr%C3%A4zisionsmechanik';
var htmlTitle	  = 'Produktion%2C+Ankauf+und+Verkauf+von+%28Occasion%29+Maschinen';
var metaKeywords  = 'gebraucht+maschinen+occasion+occ.+werkzeug+werkstatt+aciera+flott+trennj%C3%A4gger+agiecut+moriseiki+mori+seiki+drehbank+fr%C3%A4smaschinen+poliermaschinen';
var metaContents  = 'lohnarbeit%2C+verkauf+von+gebraucht+occ.+maschinen.';
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();
};

