/* [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','4901',jdecode('Home'),jdecode(''),'/4901.html','true',[],'',''],
	['PAGE','26001',jdecode('Product+Demos'),jdecode(''),'/26001.html','true',[],'',''],
	['PAGE','11201',jdecode('Products'),jdecode(''),'/11201/index.html','true',[ 
		['PAGE','27601',jdecode('ZPrinter+650'),jdecode(''),'/11201/27601.html','true',[],'',''],
		['PAGE','4952',jdecode('Spectrum+510'),jdecode(''),'/11201/4952.html','true',[],'',''],
		['PAGE','4973',jdecode('ZPrinter+450'),jdecode(''),'/11201/4973.html','true',[],'',''],
		['PAGE','11222',jdecode('ZPrinter+310'),jdecode(''),'/11201/11222.html','true',[],'',''],
		['PAGE','11243',jdecode('ZScanners'),jdecode(''),'/11201/11243.html','true',[],'','']
	],'',''],
	['PAGE','25701',jdecode('Services'),jdecode(''),'/25701.html','true',[],'',''],
	['PAGE','11285',jdecode('FAQ%26%23x27%3Bs'),jdecode(''),'/11285/index.html','true',[ 
		['PAGE','11306',jdecode('What+is+3D+Printing%3F'),jdecode(''),'/11285/11306.html','true',[],'',''],
		['PAGE','11327',jdecode('File+Preparation'),jdecode(''),'/11285/11327.html','true',[],'',''],
		['PAGE','11348',jdecode('Consumable+Costs'),jdecode(''),'/11285/11348.html','true',[],'',''],
		['PAGE','11369',jdecode('Maintenance'),jdecode(''),'/11285/11369.html','true',[],'','']
	],'',''],
	['PAGE','11411',jdecode('Service+Providers'),jdecode(''),'/11411.html','true',[],'',''],
	['PAGE','11432',jdecode('Useful+Links'),jdecode(''),'/11432.html','true',[],'',''],
	['PAGE','13701',jdecode('Downloads'),jdecode(''),'/13701.html','true',[],'',''],
	['PAGE','12901',jdecode('Contact+Us'),jdecode(''),'/12901.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Seifenblase';
theSitetree.paletteFamily='FF9B5E';
theSitetree.keyvisualId='2353';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='379';
theSitetree.graphicsetId='430';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Seifenblase',
				paletteFamily: 	'FF9B5E',
				keyvisualId: 	'2353',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'379',
				graphicsetId: 	'430',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'CC3300',
				e_color: 		'FF3300',
				f_color: 		'FF9966',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4901',
internalId:  '',
customField: '20091122-152628'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4952',
internalId:  '',
customField: '20080626-155947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4973',
internalId:  '',
customField: '20090212-134732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25701',
internalId:  '',
customField: '20090212-135754'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11201',
internalId:  '',
customField: '20090212-132121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11222',
internalId:  '',
customField: '20080626-202314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11243',
internalId:  '',
customField: '20090212-135646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11285',
internalId:  '',
customField: '20080626-143143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11306',
internalId:  '',
customField: '20080626-154625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11327',
internalId:  '',
customField: '20080626-204000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11348',
internalId:  '',
customField: '20080626-204910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11369',
internalId:  '',
customField: '20080626-143725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13701',
internalId:  '',
customField: '20090212-140004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11411',
internalId:  '',
customField: '20090331-134547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11432',
internalId:  '',
customField: '20080626-144502'
};
webappMappings['7008']=webappMappings['7008-628']={
webappId:    '7008',
documentId:  '12901',
internalId:  '628',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12901',
internalId:  '',
customField: '20080720-122622'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26001',
internalId:  '',
customField: '20090212-131926'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27601',
internalId:  '',
customField: '20090212-134339'
};
var canonHostname = 'sitebuilder1.jnb2.host-h.net';
var accountId     = 'AHTZ10INXV6K';
var companyName   = 'RAPID+3D';
var htmlTitle	  = 'Rapid+3D+-+agents+for++ZCorp+3D+Printers+and+3D+Scanners';
var metaKeywords  = 'rapid+protoyping%2C+3D+scanner%2C+3D+printer%2C+colour+printer%2C+modelling';
var metaContents  = 'Rapid+3D+-+ZCorp+3D+Printer+and+3D+Scanners';
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();
};
