/* [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','401',jdecode('Home'),jdecode(''), jdecode('%2F401.html'), 'true',[],'',''],
	['PAGE','452',jdecode('Wir+%C3%BCber+uns'),jdecode(''), jdecode('%2F452.html'), 'true',[],'',''],
	['PAGE','473',jdecode('Leistung+'),jdecode(''), jdecode('%2F473.html'), 'true',[],'',''],
	['PAGE','494',jdecode('Kunststofftuben'),jdecode(''), jdecode('%2F494%2Findex.html'), 'true',[ 
		['PAGE','48301',jdecode('Tubendatenblatt'),jdecode(''), jdecode('%2F494%2F48301.html'), 'true',[],'','']
	],'',''],
	['PAGE','515',jdecode('Tiegel+'),jdecode(''), jdecode('%2F515.html'), 'true',[],'',''],
	['PAGE','141612',jdecode('Pr%C3%A4gen'),jdecode(''), jdecode('%2F141612%2Findex.html'), 'true',[ 
		['PAGE','292812',jdecode('Heat+Transfer+Pr%C3%A4gung'),jdecode(''), jdecode('%2F141612%2F292812.html'), 'true',[],'','']
	],'',''],
	['PAGE','206812',jdecode('Flaschen+'),jdecode(''), jdecode('%2F206812%2Findex.html'), 'true',[ 
		['PAGE','197912',jdecode('Carisma+Flasche'),jdecode(''), jdecode('%2F206812%2F197912.html'), 'true',[],'',''],
		['PAGE','197933',jdecode('Classic+Flasche'),jdecode(''), jdecode('%2F206812%2F197933.html'), 'true',[],'',''],
		['PAGE','200112',jdecode('Color+Flasche'),jdecode(''), jdecode('%2F206812%2F200112.html'), 'true',[],'',''],
		['PAGE','197954',jdecode('Color+Tubenflasche'),jdecode(''), jdecode('%2F206812%2F197954.html'), 'true',[],'',''],
		['PAGE','197975',jdecode('Evolution+Flasche'),jdecode(''), jdecode('%2F206812%2F197975.html'), 'true',[],'',''],
		['PAGE','198143',jdecode('Glass+Polymer'),jdecode(''), jdecode('%2F206812%2F198143.html'), 'true',[],'',''],
		['PAGE','197996',jdecode('Olymp+Flasche'),jdecode(''), jdecode('%2F206812%2F197996.html'), 'true',[],'',''],
		['PAGE','198017',jdecode('Optima+Flasche'),jdecode(''), jdecode('%2F206812%2F198017.html'), 'true',[],'',''],
		['PAGE','198038',jdecode('Oval+Flasche'),jdecode(''), jdecode('%2F206812%2F198038.html'), 'true',[],'',''],
		['PAGE','198059',jdecode('Pharmacy'),jdecode(''), jdecode('%2F206812%2F198059.html'), 'true',[],'',''],
		['PAGE','200133',jdecode('Scala+Flasche'),jdecode(''), jdecode('%2F206812%2F200133.html'), 'true',[],'',''],
		['PAGE','198080',jdecode('Scala+Tubenflasche'),jdecode(''), jdecode('%2F206812%2F198080.html'), 'true',[],'',''],
		['PAGE','198101',jdecode('Vario+Flasche'),jdecode(''), jdecode('%2F206812%2F198101.html'), 'true',[],'',''],
		['PAGE','198122',jdecode('Venezia+Flasche'),jdecode(''), jdecode('%2F206812%2F198122.html'), 'true',[],'','']
	],'',''],
	['PAGE','344523',jdecode('Sachets'),jdecode(''), jdecode('%2F344523.html'), 'true',[],'',''],
	['PAGE','212712',jdecode('F%C3%BCllgut'),jdecode(''), jdecode('%2F212712.html'), 'true',[],'',''],
	['PAGE','237012',jdecode('Duftanh%C3%A4nger'),jdecode(''), jdecode('%2F237012.html'), 'true',[],'',''],
	['PAGE','221312',jdecode('AGB'),jdecode(''), jdecode('%2F221312.html'), 'true',[],'',''],
	['PAGE','196612',jdecode('Referenzen+CH'),jdecode(''), jdecode('%2F196612.html'), 'true',[],'',''],
	['PAGE','67401',jdecode('Referenzen+D'),jdecode(''), jdecode('%2F67401.html'), 'true',[],'',''],
	['PAGE','32601',jdecode('Kontakt'),jdecode(''), jdecode('%2F32601.html'), 'true',[],'',''],
	['PAGE','270812',jdecode('Anfahrt'),jdecode(''), jdecode('%2F270812.html'), 'true',[],'',''],
	['PAGE','45701',jdecode('Kontaktformular+'),jdecode(''), jdecode('%2F45701.html'), 'true',[],'',''],
	['PAGE','32643',jdecode('Impressum'),jdecode(''), jdecode('%2F32643.html'), 'true',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='943434';
theSitetree.keyvisualId='7184';
theSitetree.keyvisualName='kv_7184.jpg';
theSitetree.fontsetId='16409';
theSitetree.graphicsetId='12137';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
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: 			'Capri',
				paletteFamily: 	'943434',
				keyvisualId: 	'7184',
				keyvisualName: 	'kv_7184.jpg',
				fontsetId: 		'16409',
				graphicsetId: 	'12137',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '473',
internalId:  '',
customField: '20100129-091922'
};
webappMappings['7060']=webappMappings['7060-7b7403d9d324821a7d057f610b7c9ea5']={
webappId:    '7060',
documentId:  '196612',
internalId:  '7b7403d9d324821a7d057f610b7c9ea5',
customField: 'language:de;country:CH;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '270812',
internalId:  'location',
customField: 'language:de;country:CH;isIncluded:false;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20100413-171300'
};
webappMappings['7060']=webappMappings['7060-b05f7174c52526b12dce86c971a93ea6']={
webappId:    '7060',
documentId:  '67401',
internalId:  'b05f7174c52526b12dce86c971a93ea6',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '452',
internalId:  '',
customField: '20091021-185633'
};
webappMappings['7008']=webappMappings['7008-58']={
webappId:    '7008',
documentId:  '45701',
internalId:  '58',
customField: 'language:de;country:CH;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '494',
internalId:  '',
customField: '20080205-085840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48301',
internalId:  '',
customField: '20080205-090206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '515',
internalId:  '',
customField: '20080731-062110'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '141612',
internalId:  '',
customField: '20091021-190022'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '206812',
internalId:  '',
customField: '20091021-190125'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '197912',
internalId:  '',
customField: '20080413-201516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '197933',
internalId:  '',
customField: '20080413-201542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200112',
internalId:  '',
customField: '20080413-201610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '197954',
internalId:  '',
customField: '20080413-201632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '197975',
internalId:  '',
customField: '20080413-201655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198143',
internalId:  '',
customField: '20080413-201720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '197996',
internalId:  '',
customField: '20080413-201747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198017',
internalId:  '',
customField: '20091023-124748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198038',
internalId:  '',
customField: '20080413-201841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198059',
internalId:  '',
customField: '20080413-201904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '200133',
internalId:  '',
customField: '20080413-201927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198080',
internalId:  '',
customField: '20080413-201950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198101',
internalId:  '',
customField: '20080413-202013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '198122',
internalId:  '',
customField: '20080413-202037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212712',
internalId:  '',
customField: '20091021-185828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '237012',
internalId:  '',
customField: '20090930-104002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '221312',
internalId:  '',
customField: '20081027-075152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '196612',
internalId:  '',
customField: '20091021-185845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67401',
internalId:  '',
customField: '20091021-185857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32601',
internalId:  '',
customField: '20101111-173208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '270812',
internalId:  '',
customField: '20090622-154254'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45701',
internalId:  '',
customField: '20091021-185920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32643',
internalId:  '',
customField: '20101111-173046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '292812',
internalId:  '',
customField: '20100225-141122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '344523',
internalId:  '',
customField: '20101012-100936'
};
var webAppHostname = 'cgi.webomat.ch:80';
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'AHOPT0IN3G0T';
var companyName   = '+++++++++RDRD+Werbetuben+';
var htmlTitle	  = '';
var metaKeywords  = 'Tube%2C+Kunststoff%2C+Werbetube%2C+Tiegel%2C+Pr%C3%A4gung%2C+Kunststoffveredelung%2C+Lohnabf%C3%BCllung%2C+Werbegeschenke%2C+Flaschen%2C+Heat-Transfer';
var metaContents  = 'Tube%2C+Kunststoff%2C+Werbetube%2C+Tiegel%2C+Pr%C3%A4gung%2C+Kunststoffveredelung%2C+Lohnabf%C3%BCllung%2C+Werbegeschenke%2C+Flaschen%2C+Heat-Transfer';
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();
};

