/* [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','501',jdecode('Home'),jdecode(''), jdecode('%2F501.html'), 'true',[],'',''],
	['PAGE','37401',jdecode('Activities'),jdecode(''), jdecode('%2F37401.html'), 'true',[],'',''],
	['PAGE','23401',jdecode('Shortly+%26+Quickly'),jdecode(''), jdecode('%2F23401.html'), 'true',[],'',''],
	['PAGE','38901',jdecode('Exhibitions'),jdecode(''), jdecode('%2F38901.html'), 'true',[],'',''],
	['PAGE','56101',jdecode('CARS+McQueen'),jdecode(''), jdecode('%2F56101.html'), 'true',[],'',''],
	['PAGE','54701',jdecode('LEONARDO+Da+Vinci'),jdecode(''), jdecode('%2F54701.html'), 'true',[],'',''],
	['PAGE','66501',jdecode('Technologia+Romana'),jdecode(''), jdecode('%2F66501.html'), 'true',[],'',''],
	['PAGE','51401',jdecode('Minigolf+Parc'),jdecode(''), jdecode('%2F51401.html'), 'true',[],'',''],
	['PAGE','36501',jdecode('Animation+MY+PONY'),jdecode(''), jdecode('%2F36501.html'), 'true',[],'',''],
	['PAGE','74601',jdecode('Mini+Cinema'),jdecode(''), jdecode('%2F74601.html'), 'true',[],'',''],
	['PAGE','39501',jdecode('Devil%26%23x27%3Bs+Bycicle+Animation'),jdecode(''), jdecode('%2F39501.html'), 'true',[],'',''],
	['PAGE','15701',jdecode('Table+Football'),jdecode(''), jdecode('%2F15701.html'), 'true',[],'',''],
	['PAGE','21812',jdecode('Fussball+ZDF-Torwand'),jdecode(''), jdecode('%2F21812.html'), 'true',[],'',''],
	['PAGE','45901',jdecode('Street+Soccer+Arena'),jdecode(''), jdecode('%2F45901.html'), 'true',[],'',''],
	['PAGE','22801',jdecode('Fussball+Speed+Contest'),jdecode(''), jdecode('%2F22801.html'), 'true',[],'',''],
	['PAGE','50601',jdecode('Jumping+castles'),jdecode(''), jdecode('%2F50601.html'), 'true',[],'',''],
	['PAGE','13901',jdecode('Moto+Grand+Prix+Simulator'),jdecode(''), jdecode('%2F13901.html'), 'true',[],'',''],
	['PAGE','41501',jdecode('Pocket+Bike+Simulator'),jdecode(''), jdecode('%2F41501.html'), 'true',[],'',''],
	['PAGE','41522',jdecode('Motocross+Simulator'),jdecode(''), jdecode('%2F41522.html'), 'true',[],'',''],
	['PAGE','25701',jdecode('Moto+Sidecar+Simulator'),jdecode(''), jdecode('%2F25701.html'), 'true',[],'',''],
	['PAGE','34501',jdecode('Velo+Race+Simulator'),jdecode(''), jdecode('%2F34501.html'), 'true',[],'',''],
	['PAGE','41101',jdecode('Raceseat+Driving'),jdecode(''), jdecode('%2F41101.html'), 'true',[],'',''],
	['PAGE','56801',jdecode('Cockpit+Formula'),jdecode(''), jdecode('%2F56801.html'), 'true',[],'',''],
	['PAGE','12801',jdecode('Formel+1+Boxenstopp'),jdecode(''), jdecode('%2F12801.html'), 'true',[],'',''],
	['PAGE','13301',jdecode('Formel+1+Simulatoren'),jdecode(''), jdecode('%2F13301.html'), 'true',[],'',''],
	['PAGE','32501',jdecode('Snowmobile+Rennsimulator'),jdecode(''), jdecode('%2F32501.html'), 'true',[],'',''],
	['PAGE','75301',jdecode('Hockey+Animation'),jdecode(''), jdecode('%2F75301.html'), 'true',[],'',''],
	['PAGE','7001',jdecode('Team+Spirit'),jdecode(''), jdecode('%2F7001.html'), 'true',[],'',''],
	['PAGE','19701',jdecode('Slot+Car+Track'),jdecode(''), jdecode('%2F19701.html'), 'true',[],'',''],
	['PAGE','50301',jdecode('Tockey+Table+Hockey'),jdecode(''), jdecode('%2F50301.html'), 'true',[],'',''],
	['PAGE','72401',jdecode('MEGA+4+in+Line'),jdecode(''), jdecode('%2F72401.html'), 'true',[],'',''],
	['PAGE','30101',jdecode('Venezia'),jdecode(''), jdecode('%2F30101.html'), 'true',[],'',''],
	['PAGE','24401',jdecode('Soccer+World+Cup+Posters'),jdecode(''), jdecode('%2F24401.html'), 'true',[],'',''],
	['PAGE','51201',jdecode('Contact'),jdecode(''), jdecode('%2F51201.html'), 'true',[],'','']];
var siteelementCount=34;
theSitetree.topTemplateName='Transluszent';
theSitetree.paletteFamily='000099';
theSitetree.keyvisualId='9239';
theSitetree.keyvisualName='kv1.swf';
theSitetree.fontsetId='17360';
theSitetree.graphicsetId='12755';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MX'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Transluszent',
				paletteFamily: 	'000099',
				keyvisualId: 	'9239',
				keyvisualName: 	'kv1.swf',
				fontsetId: 		'17360',
				graphicsetId: 	'12755',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50301',
internalId:  '',
customField: '20090507-230135'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45901',
internalId:  '',
customField: '20090605-214907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20110830-154746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41101',
internalId:  '',
customField: '20090318-183743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23401',
internalId:  '',
customField: '20100121-215027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36501',
internalId:  '',
customField: '20090227-184512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39501',
internalId:  '',
customField: '20090507-225611'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20080126-151917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20110108-155929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21812',
internalId:  '',
customField: '20080126-151950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20080126-152005'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24401',
internalId:  '',
customField: '20091028-231848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20090227-184949'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25701',
internalId:  '',
customField: '20080228-124648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34501',
internalId:  '',
customField: '20090227-190316'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41501',
internalId:  '',
customField: '20090227-185705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12801',
internalId:  '',
customField: '20080106-173838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20080109-220621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32501',
internalId:  '',
customField: '20090506-221309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19701',
internalId:  '',
customField: '20090411-184210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38901',
internalId:  '',
customField: '20100121-215747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37401',
internalId:  '',
customField: '20111031-165445'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51201',
internalId:  '',
customField: '20100907-063538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51401',
internalId:  '',
customField: '20101026-112912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30101',
internalId:  '',
customField: '20080317-224757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41522',
internalId:  '',
customField: '20090227-190128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '72401',
internalId:  '',
customField: '20110802-163948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54701',
internalId:  '',
customField: '20110105-173620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50601',
internalId:  '',
customField: '20090605-214628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56101',
internalId:  '',
customField: '20111123-204813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56801',
internalId:  '',
customField: '20100506-171728'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66501',
internalId:  '',
customField: '20110202-200336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74601',
internalId:  '',
customField: '20111031-171229'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '75301',
internalId:  '-',
customField: '20111123-203637'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2M34';
var companyName   = 'swissSpirit.org+...every+day+a+new+idea%21';
var htmlTitle	  = 'SwissSpirit+Events+Animationen+Ausstellungen';
var metaKeywords  = 'Events+Ausstellungen+Expositions+Animationen+Animations';
var metaContents  = 'Swiss+Spirit';
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();
};

