/* [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','5001',jdecode('Home+'),jdecode(''), jdecode('%2F5001%2Findex.html'), 'true',[ 
		['PAGE','31422',jdecode('History'),jdecode(''), jdecode('%2F5001%2F31422.html'), 'true',[],'','']
	],'',''],
	['PAGE','5143',jdecode('Who+We+Are'),jdecode(''), jdecode('%2F5143%2Findex.html'), 'true',[ 
		['PAGE','31401',jdecode('Charter'),jdecode(''), jdecode('%2F5143%2F31401.html'), 'true',[],'',''],
		['PAGE','32601',jdecode('Steering+Committee'),jdecode(''), jdecode('%2F5143%2F32601.html'), 'true',[],'',''],
		['PAGE','31801',jdecode('Committee++Bios'),jdecode(''), jdecode('%2F5143%2F31801.html'), 'true',[],'','']
	],'',''],
	['PAGE','47801',jdecode('Next+Meeting'),jdecode(''), jdecode('%2F47801.html'), 'true',[],'',''],
	['PAGE','23001',jdecode('Registration'),jdecode(''), jdecode('%2F23001.html'), 'true',[],'',''],
	['PAGE','21301',jdecode('Directions'),jdecode(''), jdecode('%2F21301.html'), 'true',[],'',''],
	['PAGE','15201',jdecode('Previous+Meetings'),jdecode(''), jdecode('%2F15201%2Findex.html'), 'true',[ 
		['PAGE','6501',jdecode('Mar+11+Meeting'),jdecode(''), jdecode('%2F15201%2F6501.html'), 'true',[],'',''],
		['PAGE','45601',jdecode('Sept+10+meeting'),jdecode(''), jdecode('%2F15201%2F45601.html'), 'true',[],'',''],
		['PAGE','38301',jdecode('June+10+meeting'),jdecode(''), jdecode('%2F15201%2F38301.html'), 'true',[],'',''],
		['PAGE','21001',jdecode('Sept+09+meeting'),jdecode(''), jdecode('%2F15201%2F21001.html'), 'true',[],'',''],
		['PAGE','5243',jdecode('Jan+09+Meeting'),jdecode(''), jdecode('%2F15201%2F5243.html'), 'true',[],'',''],
		['PAGE','29822',jdecode('Oct+07+meeting'),jdecode(''), jdecode('%2F15201%2F29822.html'), 'true',[],'',''],
		['PAGE','29801',jdecode('June+07+meeting'),jdecode(''), jdecode('%2F15201%2F29801.html'), 'true',[],'','']
	],'',''],
	['PAGE','5285',jdecode('Useful+Links'),jdecode(''), jdecode('%2F5285%2Findex.html'), 'true',[ 
		['PAGE','30601',jdecode('Vendors'),jdecode(''), jdecode('%2F5285%2F30601.html'), 'true',[],'',''],
		['PAGE','30622',jdecode('Articles%2FPapers'),jdecode(''), jdecode('%2F5285%2F30622.html'), 'false',[],'','']
	],'',''],
	['PAGE','32401',jdecode('Contact+Us'),jdecode(''), jdecode('%2F32401.html'), 'true',[],'',''],
	['PAGE','43101',jdecode('White+Papers'),jdecode(''), jdecode('%2F43101.html'), 'true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Mappe';
theSitetree.paletteFamily='5CAAC2';
theSitetree.keyvisualId='1929';
theSitetree.keyvisualName='apotheke.jpg';
theSitetree.fontsetId='324';
theSitetree.graphicsetId='377';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='5CAAC2';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Mappe',
				paletteFamily: 	'5CAAC2',
				keyvisualId: 	'1929',
				keyvisualName: 	'apotheke.jpg',
				fontsetId: 		'324',
				graphicsetId: 	'377',
				contentColor: 	'000000',
				contentBGColor: '5CAAC2',
				a_color: 		'5CAAC2',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20100516-095336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15201',
internalId:  '',
customField: '20100516-153130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5143',
internalId:  '',
customField: '20100927-231016'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21001',
internalId:  '',
customField: '20100830-190609'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5243',
internalId:  '',
customField: '20110216-150505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29801',
internalId:  '',
customField: '20110216-150232'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5285',
internalId:  '',
customField: '20100927-155806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20110327-213508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21301',
internalId:  '',
customField: '20120117-092631'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23001',
internalId:  '',
customField: '20120122-085827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29822',
internalId:  '',
customField: '20110216-145234'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30601',
internalId:  '',
customField: '20100516-090123'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30622',
internalId:  '',
customField: '20100927-165120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31401',
internalId:  '',
customField: '20100927-171710'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31422',
internalId:  '',
customField: '20100516-071346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31801',
internalId:  '',
customField: '20100903-112423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32401',
internalId:  '',
customField: '20100516-153927'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32601',
internalId:  '',
customField: '20100830-181704'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38301',
internalId:  '',
customField: '20110216-150902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43101',
internalId:  '',
customField: '20120117-145557'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45601',
internalId:  '',
customField: '20101027-124112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47801',
internalId:  '',
customField: '20120122-091531'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INEXV6';
var companyName   = 'EPICS+%28Equal+Partners+in+Clinical+Supplies%29';
var htmlTitle	  = 'EPICS+%28Equal+Partners+in+Clinical+Supplies%29';
var metaKeywords  = 'clinical+supplies%2C+clinical+trials%2C+development%2C+operations%2C+logistics';
var metaContents  = 'EPICS+%28Equal+Partners+in+Clinical+Supplies%29+is+a+non-profit+organization+dedicated+to+the+professional+engaged+in+both+the+demand-side+%28Clin+Pharm%2C+Clin+Dev%29+and+the+supply-side+%28DSM%2C+CSO%2C+etc%29+of+clinical+trials%2C+including+support+groups+such+as+Quality%2C+Regulatory%2C+Biostats%2C+Logistics%2C+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();
};

