/* [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','4801',jdecode('Home'),jdecode(''),'/4801.html','true',[],'',''],
	['PAGE','4852',jdecode('About+us'),jdecode(''),'/4852/index.html','true',[ 
		['PAGE','4915',jdecode('Committee+INC'),jdecode(''),'/4852/4915.html','true',[],'',''],
		['PAGE','11601',jdecode('Membership'),jdecode(''),'/4852/11601.html','true',[],'',''],
		['PAGE','14201',jdecode('History'),jdecode(''),'/4852/14201.html','true',[],'',''],
		['PAGE','48412',jdecode('Constitution'),jdecode(''),'/4852/48412.html','true',[],'','']
	],'',''],
	['PAGE','4894',jdecode('What+we+do'),jdecode(''),'/4894/index.html','true',[ 
		['PAGE','14222',jdecode('Congresses'),jdecode(''),'/4894/14222.html','true',[],'',''],
		['PAGE','14243',jdecode('Publications'),jdecode(''),'/4894/14243.html','true',[],'',''],
		['PAGE','14264',jdecode('Patronage'),jdecode(''),'/4894/14264.html','true',[],'',''],
		['PAGE','14285',jdecode('INC+Grants'),jdecode(''),'/4894/14285.html','true',[],'','']
	],'',''],
	['PAGE','6101',jdecode('Glasgow+2009'),jdecode(''),'/6101/index.html','true',[ 
		['PAGE','43612',jdecode('Grants+%2F+Bourses'),jdecode(''),'/6101/43612.html','true',[],'','']
	],'',''],
	['PAGE','44812',jdecode('Congress+2015'),jdecode(''),'/44812.html','true',[],'',''],
	['PAGE','22801',jdecode('Articles'),jdecode(''),'/22801/index.html','true',[ 
		['PAGE','6122',jdecode('Numismatists'),jdecode(''),'/22801/6122.html','true',[],'',''],
		['PAGE','4936',jdecode('Collections'),jdecode(''),'/22801/4936.html','true',[],'',''],
		['PAGE','31012',jdecode('Collectors'),jdecode(''),'/22801/31012.html','true',[],'',''],
		['PAGE','22501',jdecode('Laws'),jdecode(''),'/22801/22501.html','true',[],'',''],
		['PAGE','23501',jdecode('Obituaries'),jdecode(''),'/22801/23501.html','true',[],'','']
	],'',''],
	['PAGE','21001',jdecode('Documents'),jdecode(''),'/21001/index.html','true',[ 
		['PAGE','21322',jdecode('e-News'),jdecode(''),'/21001/21322.html','true',[],'',''],
		['PAGE','25601',jdecode('Congresses'),jdecode(''),'/21001/25601.html','true',[],'',''],
		['PAGE','25622',jdecode('Surveys'),jdecode(''),'/21001/25622.html','true',[],'',''],
		['PAGE','40612',jdecode('e-Papers'),jdecode(''),'/21001/40612.html','true',[],'','']
	],'',''],
	['PAGE','32412',jdecode('Travel+Grants'),jdecode(''),'/32412/index.html','true',[ 
		['PAGE','32433',jdecode('Grants+2010-11'),jdecode(''),'/32412/32433.html','true',[],'',''],
		['PAGE','32454',jdecode('Bourses+2010-11'),jdecode(''),'/32412/32454.html','true',[],'',''],
		['PAGE','32475',jdecode('Stipendien+2010-11'),jdecode(''),'/32412/32475.html','true',[],'',''],
		['PAGE','47312',jdecode('Reports'),jdecode(''),'/32412/47312.html','true',[],'','']
	],'',''],
	['PAGE','28001',jdecode('Links'),jdecode(''),'/28001.html','true',[],'',''],
	['PAGE','5041',jdecode('Contact'),jdecode(''),'/5041.html','true',[],'','']];
var siteelementCount=32;
theSitetree.topTemplateName='Popart';
theSitetree.paletteFamily='2F0882';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10731';
theSitetree.graphicsetId='10452';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'de',
  country: 'CH'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Popart',
				paletteFamily: 	'2F0882',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10731',
				graphicsetId: 	'10452',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-8732031']={
webappId:    '1501',
documentId:  '4801',
internalId:  '8732031',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20100405-202944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44812',
internalId:  '',
customField: '20100420-101159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4852',
internalId:  '',
customField: '20100405-203046'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4915',
internalId:  '',
customField: '20100310-152511'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4894',
internalId:  '',
customField: '20100405-203523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32412',
internalId:  '',
customField: '20090928-121642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43612',
internalId:  '',
customField: '20090928-120259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11601',
internalId:  '',
customField: '20100407-173817'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20090928-160605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14222',
internalId:  '',
customField: '20100406-211941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14243',
internalId:  '',
customField: '20100406-212250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14264',
internalId:  '',
customField: '20100406-202959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14285',
internalId:  '',
customField: '20100406-203359'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20100405-204117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22801',
internalId:  '',
customField: '20100405-204608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6122',
internalId:  '',
customField: '20090928-152723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4936',
internalId:  '',
customField: '20090928-152928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31012',
internalId:  '',
customField: '20090928-153139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22501',
internalId:  '',
customField: '20090928-153422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23501',
internalId:  '',
customField: '20090928-155231'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21001',
internalId:  '',
customField: '20100406-203538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21322',
internalId:  '',
customField: '20090710-204332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25601',
internalId:  '',
customField: '20090928-123604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25622',
internalId:  '',
customField: '20070312-165816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40612',
internalId:  '',
customField: '20100310-163955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32433',
internalId:  '',
customField: '20090928-121145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32454',
internalId:  '',
customField: '20100406-203753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32475',
internalId:  '',
customField: '20090928-121113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28001',
internalId:  '',
customField: '20070312-190431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5041',
internalId:  '',
customField: '20100310-161652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47312',
internalId:  '',
customField: '20090928-140615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48412',
internalId:  '',
customField: '20090928-155859'
};
var canonHostname = 'webomat02.hostpoint.ch';
var accountId     = 'Ahp010INXVEO';
var companyName   = 'International+Numismatic+Council+INC+-+Conseil+international+de+numismatique+CIN';
var htmlTitle	  = 'INC+-+International+Numismatic+Council+%2F+CIN+-+Conseil+internationale+de+numismatique';
var metaKeywords  = 'numismatics+academic+societies';
var metaContents  = '';
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();
};
