/* [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','60701',jdecode('Home'),jdecode(''), jdecode('%2F60701.html'), 'true',[],'',''],
	['PAGE','61143',jdecode('Dienstleistungen'),jdecode(''), jdecode('%2F61143%2Findex.html'), 'true',[ 
		['PAGE','75101',jdecode('Aktuell'),jdecode(''), jdecode('%2F61143%2F75101.html'), 'true',[],'','']
	],'',''],
	['PAGE','4595',jdecode('Services'),jdecode(''), jdecode('%2F4595%2Findex.html'), 'true',[ 
		['PAGE','34902',jdecode('News+and+projects'),jdecode(''), jdecode('%2F4595%2F34902.html'), 'false',[],'',''],
		['PAGE','15243',jdecode('About+us'),jdecode(''), jdecode('%2F4595%2F15243.html'), 'true',[],'',''],
		['PAGE','34929',jdecode('Network'),jdecode(''), jdecode('%2F4595%2F34929.html'), 'false',[],'',''],
		['PAGE','14202',jdecode('Clients'),jdecode(''), jdecode('%2F4595%2F14202.html'), 'true',[],'',''],
		['PAGE','28102',jdecode('References+on+5+continents'),jdecode(''), jdecode('%2F4595%2F28102.html'), 'true',[],'',''],
		['PAGE','25999',jdecode('EXPO+%2F+Universal+Expositions'),jdecode(''), jdecode('%2F4595%2F25999.html'), 'true',[],'',''],
		['PAGE','27767',jdecode('Other+projects+and+events'),jdecode(''), jdecode('%2F4595%2F27767.html'), 'true',[],'','']
	],'',''],
	['PAGE','60901',jdecode('Suchen+%2F+Search'),jdecode(''), jdecode('%2F60901.html'), 'true',[],'',''],
	['PAGE','63501',jdecode('Kontakt+%2F+Contact'),jdecode(''), jdecode('%2F63501.html'), 'true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Valiant';
theSitetree.paletteFamily='25882F';
theSitetree.keyvisualId='9813';
theSitetree.keyvisualName='kv_9813.jpg';
theSitetree.fontsetId='17626';
theSitetree.graphicsetId='13033';
theSitetree.contentColor='646464';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var prodDef={
  wl_name: 'bluewin',
  product: 'WSCBLUSSSLYTC2MS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Valiant',
				paletteFamily: 	'25882F',
				keyvisualId: 	'9813',
				keyvisualName: 	'kv_9813.jpg',
				fontsetId: 		'17626',
				graphicsetId: 	'13033',
				contentColor: 	'646464',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25999',
internalId:  '',
customField: '20110919-005208'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '60701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14202',
internalId:  '',
customField: '20110919-013810'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4595',
internalId:  '',
customField: '20110919-004418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34929',
internalId:  '',
customField: '20110919-011141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34902',
internalId:  '',
customField: '20110802-011136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15243',
internalId:  '',
customField: '20110919-011101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28102',
internalId:  '',
customField: '20110919-093418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27767',
internalId:  '',
customField: '20110919-003758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63501',
internalId:  '',
customField: '20110919-015657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60701',
internalId:  '',
customField: '20110919-010136'
};
webappMappings['8002']=webappMappings['8002-search']={
webappId:    '8002',
documentId:  '60901',
internalId:  'search',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60901',
internalId:  '',
customField: '20090712-143309'
};
webappMappings['7008']=webappMappings['7008-6565']={
webappId:    '7008',
documentId:  '63501',
internalId:  '6565',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61143',
internalId:  '',
customField: '20111014-204748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75101',
internalId:  '',
customField: '20111006-122210'
};
var webAppHostname = 'cgi.hpt001.bluewin.ch:80';
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0INX2FX';
var companyName   = '+We+go+long+ways+for+our+clients.';
var htmlTitle	  = 'SCHOCH+Marketing++-++Expo+and+Special+Event+Management++-++Marketing+and+Communications+Projects';
var metaKeywords  = 'exhibition%2C+project+management%2C+exposition%2C+seminar%2C+symposium%2C+conference%2C+congress%2C+international%2C+Switzerland%2C+Zurich%2C+universal+expositions%2C+world+expo%2C+expo%2C+theme+park%2C+sports+management%2C+cultural+management%2C+sponsoring%2C+merchandising%2C+licensing%2C+trade+promotion%2C+tourist+promotion%2C+fundraising%2C+product+launches%2C+amusement+parks%2C+ausstellungen%2C+veranstaltungen%2C+vermarktung%2C+sport%2C+kultur%2C+tourismus%2C+tourism%2C+culture%2C+sports+management%2C+kulturmanagement%2C+ausstellungsmanagement%2C+projektleitung%2C+projektmanagement%2C+unternehmensberatung%2C+Schweiz%2C+Zuerich+expo%2C+congress%2C+events%2C+management%2C+marketing%2C+sponsoring%2C+licensing%2C+merchandising%2C+trade+show%2C+messen%2C+ausstellungen%2C+kultur%2C+standortmarketing%2C+projekt%2C+projektmarketing%2C+zirkus%2C+kultur%2C+tourismus%2C+schweiz%2C+z%C3%BCrich%2C+handelsf%C3%B6rderung%2C+representation%2C+repr%C3%A4sentation%2C+repr%C3%A4sentanz%2C+vertretungen%2C+Kommunika%C2%ADtion%2C+Management%C2%ADprojekte%2C+Projektmanagement%2C+Landesmar%C2%ADketing%2C+Standort%C2%ADf%C3%B6rde%C2%ADrung%2C+Technologietransfer%2C+Innovationsf%C3%B6rderung%2C+Swiss+Pavilion%2C+Schweizer+Pavillon%2C+Pavillon+suisse%2C+Gourmet+Circus';
var metaContents  = 'Expo+%26+Special+Event+Management.+Marketing+%26+Communications+Projects.+Representation+in+Switzerland.';
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();
};

