/* [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','52112',jdecode('Home%3A+10+Easy+Steps'),jdecode(''), jdecode('%2F52112%2Findex.html'), 'true',[ 
		['PAGE','52812',jdecode('Accumulate'),jdecode(''), jdecode('%2F52112%2F52812.html'), 'true',[],'',''],
		['PAGE','52833',jdecode('Apply+with+%22Value+Packs%22'),jdecode(''), jdecode('%2F52112%2F52833.html'), 'true',[],'',''],
		['PAGE','52854',jdecode('Prepare'),jdecode(''), jdecode('%2F52112%2F52854.html'), 'true',[],'',''],
		['PAGE','52875',jdecode('Sit+the+Exam'),jdecode(''), jdecode('%2F52112%2F52875.html'), 'true',[],'',''],
		['PAGE','52896',jdecode('Reap+the+Benefits'),jdecode(''), jdecode('%2F52112%2F52896.html'), 'true',[],'',''],
		['PAGE','53112',jdecode('Participate+in+Focus+Groups'),jdecode(''), jdecode('%2F52112%2F53112.html'), 'true',[],'',''],
		['PAGE','53133',jdecode('Join+the+Network'),jdecode(''), jdecode('%2F52112%2F53133.html'), 'true',[],'',''],
		['PAGE','53154',jdecode('Get+Rewarded'),jdecode(''), jdecode('%2F52112%2F53154.html'), 'true',[],'',''],
		['PAGE','4830',jdecode('Check+Media+Releases'),jdecode(''), jdecode('%2F52112%2F4830.html'), 'true',[],'',''],
		['PAGE','4851',jdecode('Contact+the+Network'),jdecode(''), jdecode('%2F52112%2F4851.html'), 'true',[],'','']
	],'',''],
	['PAGE','53217',jdecode('CMP+Network+SA'),jdecode(''), jdecode('%2F53217%2Findex.html'), 'true',[ 
		['PAGE','75712',jdecode('Advisory+Board'),jdecode(''), jdecode('%2F53217%2F75712.html'), 'true',[],'','']
	],'',''],
	['PAGE','53196',jdecode('SA+CMP%26%23x27%3Bs+2006%2F2011'),jdecode(''), jdecode('%2F53196.html'), 'true',[],'',''],
	['PAGE','37112',jdecode('FAQ'),jdecode(''), jdecode('%2F37112.html'), 'true',[],'',''],
	['PAGE','31112',jdecode('CMP+Contributors'),jdecode(''), jdecode('%2F31112.html'), 'true',[],'',''],
	['PAGE','67412',jdecode('Contact+Us'),jdecode(''), jdecode('%2F67412.html'), 'true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='727D9C';
theSitetree.keyvisualId='11143';
theSitetree.keyvisualName='kv_11143.jpg';
theSitetree.fontsetId='32062';
theSitetree.graphicsetId='13879';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hetzner',
  product: 'WSCSYSSSSLY0XKDS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Office',
				paletteFamily: 	'727D9C',
				keyvisualId: 	'11143',
				keyvisualName: 	'kv_11143.jpg',
				fontsetId: 		'32062',
				graphicsetId: 	'13879',
				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:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52854',
internalId:  '',
customField: '20111027-140032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52875',
internalId:  '',
customField: '20120126-135705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4851',
internalId:  '',
customField: '20111027-094255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53112',
internalId:  '',
customField: '20120222-094227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53133',
internalId:  '',
customField: '20120126-151343'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53154',
internalId:  '',
customField: '20111027-150224'
};
webappMappings['1501']=webappMappings['1501-8208314']={
webappId:    '1501',
documentId:  '52112',
internalId:  '8208314',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-4976']={
webappId:    '7008',
documentId:  '53133',
internalId:  '4976',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67412',
internalId:  '',
customField: '20111027-092509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53196',
internalId:  '',
customField: '20120222-133203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52833',
internalId:  '',
customField: '20120126-143331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52812',
internalId:  '',
customField: '20120206-155946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53217',
internalId:  '',
customField: '20120222-135147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4830',
internalId:  '',
customField: '20120222-141004'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '52112',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000--']={
webappId:    '5000',
documentId:  '75712',
internalId:  '-',
customField: '20120222-134516'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52896',
internalId:  '',
customField: '20111027-164527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31112',
internalId:  '',
customField: '20111027-165236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37112',
internalId:  '',
customField: '20120222-134115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52112',
internalId:  '',
customField: '20120222-133110'
};
var webAppHostname = 'sitebuilder.host-h.net:80';
var canonHostname = 'sitebuilder1.jnb2.host-h.net';
var accountId     = 'AHTZ10IN2570';
var companyName   = 'CMP+Network+South+Africa';
var htmlTitle	  = 'Certified+Meeting+Professional+-+The+Premier+Qualification+for+the+Meetings++Events+Industry';
var metaKeywords  = '';
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();
};

