/* [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 theSitetree=[ 
	['PAGE','32',jdecode('Home'),jdecode(''),'/32.html','true',[],''],
	['PAGE','53',jdecode('Products'),jdecode(''),'/53/index.html','true',[ 
		['PAGE','6760',jdecode('PBS-Std+Edition'),jdecode(''),'/53/6760.html','true',[],''],
		['PAGE','62',jdecode('PBS-Silver+Edition'),jdecode(''),'/53/62.html','true',[],''],
		['PAGE','5108',jdecode('PBS-Gold+Edition'),jdecode(''),'/53/5108.html','true',[],''],
		['PAGE','6212',jdecode('PBS-Pro+Edition'),jdecode(''),'/53/6212.html','true',[],''],
		['PAGE','6769',jdecode('Perfect+Fit+2008'),jdecode(''),'/53/6769.html','true',[],'']
	],''],
	['PAGE','2036',jdecode('Purchase'),jdecode(''),'/2036.html','true',[],''],
	['PAGE','1657',jdecode('Screen+Shots'),jdecode(''),'/1657/index.html','true',[ 
		['PAGE','7128',jdecode('PBS-Std+Edition'),jdecode(''),'/1657/7128.html','true',[],''],
		['PAGE','1536',jdecode('PBS-Silver+Edition'),jdecode(''),'/1657/1536.html','true',[],''],
		['PAGE','5772',jdecode('PBS-Gold+Edition'),jdecode(''),'/1657/5772.html','true',[],''],
		['PAGE','6358',jdecode('PBS-Pro+Edition'),jdecode(''),'/1657/6358.html','true',[],''],
		['PAGE','7186',jdecode('Perfect+Fit+2008'),jdecode(''),'/1657/7186.html','true',[],'']
	],''],
	['PAGE','4993',jdecode('Free+Downloads'),jdecode(''),'/4993.html','true',[],''],
	['PAGE','1648',jdecode('Coming+Soon...'),jdecode(''),'/1648.html','true',[],''],
	['PAGE','5226',jdecode('FAQs'),jdecode(''),'/5226.html','true',[],''],
	['PAGE','2124',jdecode('Registration'),jdecode(''),'/2124/index.html','true',[ 
		['PAGE','2181',jdecode('Register+Product+%28follow+up+page%29'),jdecode(''),'/2124/2181.html','false',[],''],
		['PAGE','1862',jdecode('Leave+Feedback+%28follow+up+page%29'),jdecode(''),'/2124/1862.html','false',[],'']
	],''],
	['PAGE','5893',jdecode('Links'),jdecode(''),'/5893.html','true',[],''],
	['PAGE','89',jdecode('Contact+Us'),jdecode(''),'/89.html','true',[],''],
	['PAGE','98',jdecode('About+Us'),jdecode(''),'/98.html','true',[],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Circulation';
theSitetree.paletteFamily='B1942D';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10587';
theSitetree.graphicsetId='10563';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='000000';
var theTemplate={
				name: 			'Circulation',
				paletteFamily: 	'B1942D',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10587',
				graphicsetId: 	'10563',
				contentColor: 	'FFFFFF',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['1001']=webappMappings['1001-ahw050in3wzrba991d3db1d9f1f1']={
webappId:    '1001',
documentId:  '2181',
internalId:  'ahw050in3wzrba991d3db1d9f1f1',
customField: 'followUp'
};
webappMappings['1001']=webappMappings['1001-ahw050in3wzrba991d3db1d9f1f1']={
webappId:    '1001',
documentId:  '2124',
internalId:  'ahw050in3wzrba991d3db1d9f1f1',
customField: ''
};
webappMappings['1001']=webappMappings['1001-ahw050in3wzr9288a734fe97a9d3']={
webappId:    '1001',
documentId:  '1862',
internalId:  'ahw050in3wzr9288a734fe97a9d3',
customField: 'followUp'
};
webappMappings['1501']=webappMappings['1501-1337844']={
webappId:    '1501',
documentId:  '32',
internalId:  '1337844',
customField: '1501'
};
webappMappings['7005']=webappMappings['7005-500']={
webappId:    '7005',
documentId:  '32',
internalId:  '500',
customField: 'language:en;country:US;'
};
webappMappings['7005']=webappMappings['7005-501']={
webappId:    '7005',
documentId:  '1648',
internalId:  '501',
customField: 'language:en;country:US;'
};
webappMappings['7005']=webappMappings['7005-502']={
webappId:    '7005',
documentId:  '98',
internalId:  '502',
customField: 'language:en;country:US;'
};
webappMappings['7005']=webappMappings['7005-503']={
webappId:    '7005',
documentId:  '2036',
internalId:  '503',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-113ce7f4960e0dd2d24acd95fdf11265']={
webappId:    '7060',
documentId:  '1536',
internalId:  '113ce7f4960e0dd2d24acd95fdf11265',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-3ff309fd7b31f286cb5019de69656afd']={
webappId:    '7060',
documentId:  '5772',
internalId:  '3ff309fd7b31f286cb5019de69656afd',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-2c830e9a9754c878d2bb168039d3d726']={
webappId:    '7060',
documentId:  '6358',
internalId:  '2c830e9a9754c878d2bb168039d3d726',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-e546526a4a8ade6eee6bb2c52cc22958']={
webappId:    '7060',
documentId:  '7128',
internalId:  'e546526a4a8ade6eee6bb2c52cc22958',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-3768d558256ac5e929f96eaeccd875b8']={
webappId:    '7060',
documentId:  '7186',
internalId:  '3768d558256ac5e929f96eaeccd875b8',
customField: 'language:en;country:US;'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3WZR';
var companyName   = 'EES+Software+Designs%2C+Inc.';
var htmlTitle	  = 'EES+Software+Designs';
var metaKeywords  = 'Bowling+Software++Bowling+Software++Bowling++Statistics+Software++Statistics+Software++Bowling+Statistics++Bowling+Statistics++Bowling+Stats++Bowling+Stats++Bowling+Scores++Bowling+Scores++';
var metaContents  = 'Stat-Keeper++Custom+Software++Bowling+Software++Stat-Keeper++Custom+Software++Bowling+Software';
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();
};
