/* [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','1801',jdecode('Welcome+to+TT'),jdecode(''),'/1801.html','true',[],'',''],
	['PAGE','9901',jdecode('Our+Company'),jdecode(''),'/9901/index.html','true',[ 
		['PAGE','24801',jdecode('Company+Overview'),jdecode(''),'/9901/24801.html','true',[],'','']
	],'',''],
	['PAGE','42801',jdecode('thinkmobilemoney'),jdecode(''),'/42801.html','true',[],'',''],
	['PAGE','42822',jdecode('thinkcreatingmarkets'),jdecode(''),'/42822.html','false',[],'',''],
	['PAGE','42843',jdecode('TT+Wholesale+Food+%26+Drink'),jdecode(''),'/42843.html','false',[],'',''],
	['PAGE','42864',jdecode('TOMD'),jdecode(''),'/42864.html','false',[],'',''],
	['PAGE','24843',jdecode('Practice+Areas'),jdecode(''),'/24843/index.html','true',[ 
		['PAGE','24864',jdecode('Mobile+Financial+Services'),jdecode(''),'/24843/24864.html','true',[],'',''],
		['PAGE','24885',jdecode('Payment+Systems'),jdecode(''),'/24843/24885.html','true',[],'',''],
		['PAGE','24906',jdecode('Programme+Management'),jdecode(''),'/24843/24906.html','true',[],'',''],
		['PAGE','32601',jdecode('Policy+and+Regulation'),jdecode(''),'/24843/32601.html','true',[],'',''],
		['PAGE','42885',jdecode('Programme+Delivery'),jdecode(''),'/24843/42885.html','false',[],'',''],
		['PAGE','42906',jdecode('Field+Implementation+Support'),jdecode(''),'/24843/42906.html','false',[],'',''],
		['PAGE','25601',jdecode('Events+Management'),jdecode(''),'/24843/25601.html','true',[],'',''],
		['PAGE','24927',jdecode('The+TroyTyla+Think+Tank'),jdecode(''),'/24843/24927.html','true',[],'','']
	],'',''],
	['PAGE','9964',jdecode('TroyTyla+at+Work'),jdecode(''),'/9964/index.html','true',[ 
		['PAGE','9985',jdecode('Current+Projects'),jdecode(''),'/9964/9985.html','true',[],'',''],
		['PAGE','10006',jdecode('Past+Projects'),jdecode(''),'/9964/10006.html','true',[],'','']
	],'',''],
	['PAGE','15601',jdecode('Publications'),jdecode(''),'/15601.html','true',[],'',''],
	['PAGE','10069',jdecode('Related+Website+Links'),jdecode(''),'/10069.html','true',[],'',''],
	['PAGE','24822',jdecode('Contact+Us'),jdecode(''),'/24822.html','true',[],'',''],
	['PAGE','44701',jdecode('Contact+Form'),jdecode(''),'/44701.html','false',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Displace';
theSitetree.paletteFamily='2E2E2E';
theSitetree.keyvisualId='11075';
theSitetree.keyvisualName='kv_11075.jpg';
theSitetree.fontsetId='31958';
theSitetree.graphicsetId='13798';
theSitetree.contentColor='D8D8D5';
theSitetree.contentBGColor='2E2E2E';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Displace',
				paletteFamily: 	'2E2E2E',
				keyvisualId: 	'11075',
				keyvisualName: 	'kv_11075.jpg',
				fontsetId: 		'31958',
				graphicsetId: 	'13798',
				contentColor: 	'D8D8D5',
				contentBGColor: '2E2E2E',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1801',
internalId:  '',
customField: '20100523-172854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20100520-171624'
};
webappMappings['7008']=webappMappings['7008-3468']={
webappId:    '7008',
documentId:  '44701',
internalId:  '3468',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9964',
internalId:  '',
customField: '20081107-001717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10069',
internalId:  '',
customField: '20081107-004242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15601',
internalId:  '',
customField: '20081107-001402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10006',
internalId:  '',
customField: '20100523-164239'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9985',
internalId:  '',
customField: '20100523-164057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25601',
internalId:  '',
customField: '20081106-155013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44701',
internalId:  '',
customField: '20100520-192353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42801',
internalId:  '',
customField: '20100523-134304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42822',
internalId:  '',
customField: '20100523-134558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42843',
internalId:  '',
customField: '20100520-170447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42864',
internalId:  '',
customField: '20100520-170447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42885',
internalId:  '',
customField: '20100520-170447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42906',
internalId:  '',
customField: '20100520-170447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24843',
internalId:  '',
customField: '20100523-163822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24801',
internalId:  '',
customField: '20100420-164000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24822',
internalId:  '',
customField: '20100523-164548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24864',
internalId:  '',
customField: '20100523-173044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24885',
internalId:  '',
customField: '20100420-163337'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24906',
internalId:  '',
customField: '20100420-164240'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24927',
internalId:  '',
customField: '20100420-164327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32601',
internalId:  '',
customField: '20081106-233311'
};
var canonHostname = 'sitebuilder1.jnb2.host-h.net';
var accountId     = 'AHTZ10INXVTA';
var companyName   = 'extending+your+payments+franchise...';
var htmlTitle	  = '';
var metaKeywords  = 'Mobile%2C+banking%2C+mobile+banking%2C+m-commerce%2C+mobile+commerce%2C+mobile+money+transfer%2C+mmt%2C+mobile+money%2C+mobile+financial+services%2C+consulting%2C+mobile+banking+consulting%2C+mobile+banking+consultants%2C+Gavin+Krugel%2C+troytyla%2Ctroytyla.com%2C+growth+of+m-commerce+in+south+africa%2C+m-commerce+in+south+africa%2C+virtual+airtime%2C+money+transfer%2C+mobile%2C+paym8%2C+cointel%2C+GSMA+Mobile+world+congress%2C+m-pesa%2C+payphone%2C+troytyler%2C+troytyle%2C+thinkmobilemoney%2C+thinkmobile%2C+thinkmoney%2C+think.mobile.money.%2C+think.mobilemoney.%2C+thinkcreatingmarkets%2C+think+creating+markets%2C+think.creatingmarkets.%2C+think.creating.markets.%2C';
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();
};
