/* [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('Welcome'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','9601',jdecode('Goals'),jdecode(''),'/9601/index.html','true',[ 
		['PAGE','11701',jdecode('Dear+Reader'),jdecode(''),'/9601/11701.html','true',[],'',''],
		['PAGE','6243',jdecode('Foreword'),jdecode(''),'/9601/6243.html','true',[],'',''],
		['PAGE','9622',jdecode('Preface+by+W.+Arber'),jdecode(''),'/9601/9622.html','true',[],'',''],
		['PAGE','56901',jdecode('Epilogue+by+C.+Masters'),jdecode(''),'/9601/56901.html','true',[],'','']
	],'',''],
	['PAGE','17101',jdecode('Contact+%26+Order'),jdecode(''),'/17101.html','true',[],'',''],
	['PAGE','6201',jdecode('History+%26+Thanks'),jdecode(''),'/6201.html','true',[],'',''],
	['PAGE','6369',jdecode('Editors'),jdecode(''),'/6369.html','true',[],'',''],
	['PAGE','45601',jdecode('Authors'),jdecode(''),'/45601.html','true',[],'',''],
	['PAGE','108901',jdecode('Sponsors'),jdecode(''),'/108901.html','true',[],'',''],
	['PAGE','50701',jdecode('Dedication'),jdecode(''),'/50701.html','true',[],'',''],
	['PAGE','6285',jdecode('Support'),jdecode(''),'/6285/index.html','true',[ 
		['PAGE','6348',jdecode('General+'),jdecode(''),'/6285/6348.html','true',[],'',''],
		['PAGE','9643',jdecode('Literature'),jdecode(''),'/6285/9643.html','true',[],'',''],
		['PAGE','9664',jdecode('Graphics'),jdecode(''),'/6285/9664.html','true',[],'',''],
		['PAGE','44301',jdecode('Publishing'),jdecode(''),'/6285/44301.html','true',[],'',''],
		['PAGE','6306',jdecode('Scientific+Reviewers'),jdecode(''),'/6285/6306.html','true',[],'',''],
		['PAGE','9685',jdecode('Translation+'),jdecode(''),'/6285/9685.html','true',[],'','']
	],'',''],
	['PAGE','6390',jdecode('Publisher'),jdecode(''),'/6390.html','true',[],'',''],
	['PAGE','11001',jdecode('Book+Reviews'),jdecode(''),'/11001/index.html','true',[ 
		['PAGE','32301',jdecode('Reviews+on+Ed.+2'),jdecode(''),'/11001/32301.html','true',[],'',''],
		['PAGE','11022',jdecode('Reviews+on+Ed.+1'),jdecode(''),'/11001/11022.html','true',[],'','']
	],'',''],
	['PAGE','107501',jdecode('Feedback+by+Bill+Hadlow'),jdecode(''),'/107501.html','true',[],'',''],
	['PAGE','89301',jdecode('Feedback+by+Authors'),jdecode(''),'/89301.html','true',[],'',''],
	['PAGE','89322',jdecode('Feedback+by+Others'),jdecode(''),'/89322.html','true',[],'',''],
	['PAGE','98701',jdecode('SWISS-BOOK+SHOP'),jdecode(''),'/98701.html','true',[],'',''],
	['PAGE','67301',jdecode('News+%26+Science'),jdecode(''),'/67301.html','true',[],'',''],
	['PAGE','75601',jdecode('Meetings+on+Prions'),jdecode(''),'/75601.html','true',[],'',''],
	['PAGE','66822',jdecode('Season'),jdecode(''),'/66822.html','true',[],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='333F65';
theSitetree.keyvisualId='1754';
theSitetree.keyvisualName='krankenhaus.jpg';
theSitetree.fontsetId='290';
theSitetree.graphicsetId='355';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333F65';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'333F65',
				keyvisualId: 	'1754',
				keyvisualName: 	'krankenhaus.jpg',
				fontsetId: 		'290',
				graphicsetId: 	'355',
				contentColor: 	'FFFFFF',
				contentBGColor: '333F65',
				a_color: 		'333F65',
				b_color: 		'040507',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100908-110259'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '501',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-9923805']={
webappId:    '1501',
documentId:  '501',
internalId:  '9923805',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20070115-121645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11701',
internalId:  '',
customField: '20070115-124116'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6243',
internalId:  '',
customField: '20100816-122722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9622',
internalId:  '',
customField: '20070107-180529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '56901',
internalId:  '',
customField: '20070107-180938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20100908-105641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20100816-115842'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6369',
internalId:  '',
customField: '20100908-110153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45601',
internalId:  '',
customField: '20100816-121506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108901',
internalId:  '',
customField: '20070323-144151'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '50701',
internalId:  '',
customField: '20070301-111507'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6285',
internalId:  '',
customField: '20070323-135602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6348',
internalId:  '',
customField: '20100816-134144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9643',
internalId:  '',
customField: '20070107-201953'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9664',
internalId:  '',
customField: '20070114-092948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44301',
internalId:  '',
customField: '20070108-104802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6306',
internalId:  '',
customField: '20070108-105725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9685',
internalId:  '',
customField: '20070108-105752'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6390',
internalId:  '',
customField: '20070108-105955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11001',
internalId:  '',
customField: '20070208-110050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32301',
internalId:  '',
customField: '20070323-131340'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11022',
internalId:  '',
customField: '20070301-121447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107501',
internalId:  '',
customField: '20070301-114518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89301',
internalId:  '',
customField: '20070209-122248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89322',
internalId:  '',
customField: '20070323-132910'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98701',
internalId:  '',
customField: '20100816-120325'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67301',
internalId:  '',
customField: '20070213-232425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '66822',
internalId:  '',
customField: '20100816-120828'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75601',
internalId:  '',
customField: '20100816-120547'
};
var canonHostname = 'hptworkerdb01b.bluewin.ch';
var accountId     = 'ABW0X0IN2NYC';
var companyName   = 'PrionOne';
var htmlTitle	  = 'PrionOne';
var metaKeywords  = 'Book%2C+Book+Order%2C+Prions+in+Humans+and+Animals%2C+PrionOne%2C+H%C3%B6rnlimann%2C+Hoernlimann%2C+Hornlimann%2C+B.%2C+Beat%2C+Riesner%2C+D.%2C+Detlev%2C+Kretzschmar%2C+H.%2C+Hans%2C+A.%2C+BSE%2C+Mad+Cow+Disease%2C+CJD%2C+Creutzfeldt-Jakob+Disease%2C+Chronic+Wasting+Disease%2C+kuru%2C+transmissible%2C+spongiform%2C+encephalopathy%2C+encephalopathies%2C+TSE%2C+scrapie%2C+cattle%2C+cow%2C+sheep%2C+Bovine+Spongiform+Encephalopathy%2C+Wells%2C+Alpers%2C+Prusiner%2C+Will%2C+Bradley%2C+Hadlow';
var metaContents  = 'PrionOne%3A+The+only+international+reference%2C+published+in+2007%2C+on+prions+and+prion+diseases+covering+all+aspects+of+TSE.+Written+by+80+internationally+known+scientists.+Our+goal+was+to+present+an+extremely+complex+field+in+a+language+comprehensible+to+all.+BSE%2C+Mad+Cow+Disease%2C+CJD%2C+Creutzfeldt-Jakob+Disease+etc.';
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();
};
