/* [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','109545',jdecode('NewTek+TriCaster+repairs'),jdecode(''), jdecode('%2F109545.html'), 'true',[],'',''],
	['PAGE','110945',jdecode('Matrox+promotions'),jdecode(''), jdecode('%2F110945.html'), 'true',[],'',''],
	['PAGE','33512',jdecode('Low-cost+items+for+sale'),jdecode(''), jdecode('%2F33512.html'), 'true',[],'',''],
	['PAGE','27201',jdecode('Upcoming+events'),jdecode(''), jdecode('%2F27201.html'), 'true',[],'',''],
	['PAGE','71645',jdecode('Oct+12th+streaming+seminar'),jdecode(''), jdecode('%2F71645.html'), 'true',[],'',''],
	['PAGE','68545',jdecode('Streaming+help'),jdecode(''), jdecode('%2F68545.html'), 'true',[],'',''],
	['PAGE','5301',jdecode('Home'),jdecode(''), jdecode('%2F5301.html'), 'true',[],'',''],
	['PAGE','30201',jdecode('NewTek+news+%26+promotions'),jdecode(''), jdecode('%2F30201.html'), 'true',[],'',''],
	['PAGE','101845',jdecode('NewTek+archives'),jdecode(''), jdecode('%2F101845.html'), 'true',[],'',''],
	['PAGE','84445',jdecode('TriCaster+450%2F450+EXTREME+overview'),jdecode(''), jdecode('%2F84445.html'), 'true',[],'',''],
	['PAGE','98645',jdecode('TriCaster+450+EXTREME+review'),jdecode(''), jdecode('%2F98645.html'), 'true',[],'',''],
	['PAGE','104745',jdecode('NewTek+is+good+at+.+.+.+.'),jdecode(''), jdecode('%2F104745.html'), 'true',[],'',''],
	['PAGE','55034',jdecode('DigiTek+Systems+Forum'),jdecode(''), jdecode('%2F55034.html'), 'true',[],'',''],
	['PAGE','88345',jdecode('IBC+2011+news'),jdecode(''), jdecode('%2F88345.html'), 'true',[],'',''],
	['PAGE','42923',jdecode('Blackmagic+Design+ATEM'),jdecode(''), jdecode('%2F42923.html'), 'true',[],'',''],
	['PAGE','59334',jdecode('ATEM+1+M%2FE+review'),jdecode(''), jdecode('%2F59334.html'), 'true',[],'',''],
	['PAGE','78145',jdecode('ATEM+1+M%2FE+second+review'),jdecode(''), jdecode('%2F78145.html'), 'true',[],'',''],
	['PAGE','59734',jdecode('ATEM+versus+TriCaster'),jdecode(''), jdecode('%2F59734.html'), 'true',[],'',''],
	['PAGE','46323',jdecode('ATEM+Switchers+FAQ'),jdecode(''), jdecode('%2F46323.html'), 'true',[],'',''],
	['PAGE','76845',jdecode('Blackmagic+Design+news'),jdecode(''), jdecode('%2F76845.html'), 'true',[],'',''],
	['PAGE','41923',jdecode('Matrox+Multi-Ingest'),jdecode(''), jdecode('%2F41923.html'), 'true',[],'',''],
	['PAGE','22401',jdecode('NewTek+TriCaster+models'),jdecode(''), jdecode('%2F22401.html'), 'true',[],'',''],
	['PAGE','67945',jdecode('Adobe+CS5.5+software'),jdecode(''), jdecode('%2F67945.html'), 'true',[],'',''],
	['PAGE','49323',jdecode('NAB+2011+news'),jdecode(''), jdecode('%2F49323.html'), 'true',[],'',''],
	['PAGE','22422',jdecode('TriCaster+850+trade-in+plan'),jdecode(''), jdecode('%2F22422.html'), 'true',[],'',''],
	['PAGE','40423',jdecode('TriCaster+850+EXTREME+Upgrade'),jdecode(''), jdecode('%2F40423.html'), 'true',[],'',''],
	['PAGE','51523',jdecode('Matrox+MXO2+loyalty+plan'),jdecode(''), jdecode('%2F51523.html'), 'true',[],'',''],
	['PAGE','22443',jdecode('Products+that+we+sell'),jdecode(''), jdecode('%2F22443.html'), 'true',[],'',''],
	['PAGE','27801',jdecode('TriCaster+850+review'),jdecode(''), jdecode('%2F27801.html'), 'true',[],'',''],
	['PAGE','39523',jdecode('TriCaster+850+EXTREME+review'),jdecode(''), jdecode('%2F39523.html'), 'true',[],'',''],
	['PAGE','92645',jdecode('TriCaster+rev+3+update'),jdecode(''), jdecode('%2F92645.html'), 'true',[],'',''],
	['PAGE','31101',jdecode('NewTek+discontinues+VT%5B5%5D'),jdecode(''), jdecode('%2F31101.html'), 'true',[],'',''],
	['PAGE','31601',jdecode('Switcher+images'),jdecode(''), jdecode('%2F31601.html'), 'true',[],'',''],
	['PAGE','32412',jdecode('Adobe+CS5+and+Matrox+MXO2'),jdecode(''), jdecode('%2F32412.html'), 'true',[],'',''],
	['PAGE','22464',jdecode('Contact'),jdecode(''), jdecode('%2F22464.html'), 'true',[],'',''],
	['PAGE','26001',jdecode('Who+we+are+and+do+best'),jdecode(''), jdecode('%2F26001.html'), 'true',[],'','']];
var siteelementCount=36;
theSitetree.topTemplateName='Alpha';
theSitetree.paletteFamily='D72B2B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10555';
theSitetree.graphicsetId='10893';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp19-dulles',
  product: 'WSCSYSSSSLYTCPI5'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Alpha',
				paletteFamily: 	'D72B2B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10555',
				graphicsetId: 	'10893',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'D72B2B',
				e_color: 		'D72B2B',
				f_color: 		'D72B2B',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20120206-144416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27801',
internalId:  '',
customField: '20110908-222432'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22464',
internalId:  '',
customField: '20111124-122142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20110925-181753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22422',
internalId:  '',
customField: '20110908-222000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22443',
internalId:  '',
customField: '20110509-160145'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30201',
internalId:  '',
customField: '20120201-140518'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27201',
internalId:  '',
customField: '20120130-160134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26001',
internalId:  '',
customField: '20111124-120908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32412',
internalId:  '',
customField: '20110502-101646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31101',
internalId:  '',
customField: '20111203-122850'
};
webappMappings['7060']=webappMappings['7060-d7c253b108f90e26c123c8ef854265c0']={
webappId:    '7060',
documentId:  '31601',
internalId:  'd7c253b108f90e26c123c8ef854265c0',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31601',
internalId:  '',
customField: '20111031-124922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33512',
internalId:  '',
customField: '20120125-212108'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39523',
internalId:  '',
customField: '20111105-145131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40423',
internalId:  '',
customField: '20110908-222059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41923',
internalId:  '',
customField: '20110502-101623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42923',
internalId:  '',
customField: '20110531-091024'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46323',
internalId:  '',
customField: '20111130-134544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49323',
internalId:  '',
customField: '20110908-221742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51523',
internalId:  '',
customField: '20110903-100449'
};
webappMappings['1003']=webappMappings['1003-avf340i7cmgf1308628826c']={
webappId:    '1003',
documentId:  '55034',
internalId:  'avf340i7cmgf1308628826c',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55034',
internalId:  '',
customField: '20110612-192904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59334',
internalId:  '',
customField: '20110905-195255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '59734',
internalId:  '',
customField: '20110908-221319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67945',
internalId:  '',
customField: '20111001-171719'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68545',
internalId:  '',
customField: '20110723-092201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71645',
internalId:  '',
customField: '20110827-203448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76845',
internalId:  '',
customField: '20110929-080019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '78145',
internalId:  '',
customField: '20110917-095344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84445',
internalId:  '',
customField: '20111105-145032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88345',
internalId:  '',
customField: '20110919-221032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92645',
internalId:  '',
customField: '20110929-094916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98645',
internalId:  '',
customField: '20111127-085756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101845',
internalId:  '',
customField: '20111123-145633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104745',
internalId:  '',
customField: '20111229-094849'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '109545',
internalId:  '',
customField: '20120131-132633'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '110945',
internalId:  '',
customField: '20120206-150410'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CMGF';
var companyName   = 'Welcome+to+DigiTek+Systems';
var htmlTitle	  = 'NewTek+TriCaster+and+Blackmagic+Design+ATEM+dealer';
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();
};

