/* [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','2101',jdecode('Home'),jdecode(''),'/2101.html','true',[],''],
	['PAGE','2152',jdecode('Community+Services'),jdecode(''),'/2152.html','true',[],''],
	['PAGE','2173',jdecode('Computer+Donations'),jdecode(''),'/2173.html','true',[],''],
	['PAGE','3401',jdecode('Learning+Center'),jdecode(''),'/3401.html','true',[],''],
	['PAGE','2801',jdecode('Contribute'),jdecode(''),'/2801.html','true',[],''],
	['PAGE','2194',jdecode('Contact+Us'),jdecode(''),'/2194.html','true',[],''],
	['PAGE','6201',jdecode('About+Us'),jdecode(''),'/6201.html','false',[],''],
	['PAGE','6222',jdecode('Terms+of+Use'),jdecode(''),'/6222.html','false',[],''],
	['PAGE','6243',jdecode('Privacy+Policy'),jdecode(''),'/6243.html','false',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Undulate';
theSitetree.paletteFamily='413D42';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33116';
theSitetree.graphicsetId='14071';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='413D42';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Undulate',
				paletteFamily: 	'413D42',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33116',
				graphicsetId: 	'14071',
				contentColor: 	'FFFFFF',
				contentBGColor: '413D42',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20090520-092243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2152',
internalId:  '',
customField: '20090520-093523'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6243',
internalId:  '',
customField: '20090607-170700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2173',
internalId:  '',
customField: '20090520-093658'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2101',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20090520-111747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6222',
internalId:  '',
customField: '20090607-170543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20090607-170326'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20090521-171221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2194',
internalId:  '',
customField: '20090520-094809'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHNJS';
var companyName   = 'Community+PC+Help';
var htmlTitle	  = 'Community+PC+Help';
var metaKeywords  = 'information%2C+technology%2C+computer%2C+repair%2C+technician%2Chome%2Coffice%2C+laptop%2C+software%2C+hardware%2C+website%2C+dell+computers%2C+email%2C+marketing%2C+surveys%2C+solutions%2C+migo%2C+migo%2C+boyd+it+consulting%2C+software%2C+repair%2C+computer%2C+migosoftware%2C+migo+mobile%2C+migomobile%2C+digital+rescue%2C+digital+shreadder%2C+digital+vault%2C+drive+washer%2C+easy+pc+transfer%2C+mobile+desktop%2C+pc+backup%2C+portable+vault%2C+recover+lost+data%2C+recover+lost+photos%2C+registry+repair%2C+xp+to+vista+easy+sync+suite%2C+Homepage%2C+laptops%2C+laptops%2C+computer%2C+computers%2C+Desktops%2C+desktop%2C+monitors%2C+monitor%2C+printer%2C+printers%2C+storage%2C+server%2C+Dell%2C+dell+support%2C+dell+technical+support+forums%2C+Ideas+for+Dell%2C+dell+reviews%2C+computer+games%2C+gaming%2C+projector%2C+projectors%2C+computer+accessories%2C+electronics%2C+sales%2C+deals%2C+value%2C+domain%2C+domain+name%2C+domain+registration%2C+domain+name+register%2C+buy+domain+name%2C+renewal%2C+domain+name+renewal%2C+email%2C+email+account%2C+hosting%2C+web+hosting%2C+ssi%2C+secure+certificates%2Ccheap%2C+inexpensive%2C+domains%2C+domain+names%2C+domain+registrations%2C+registars%2C+register%2CDNS%2C+URL%2C+web+address%2C+internet+address%2C+web+site+name%2C+bulk+domain+registration%2C+buy+domain%2C+private+domain+registrations%2C+bulk+price%2C+.com%2C+.net%2C+.org%2C+.biz%2C+.info%2C+Go+Daddy.com%2C+Go+Daddy%2C+godaddy.com%2C+boyditconsulting.com%2C+boyd+it+consulting%2C+boyd+it%2C+boyd%2C+consulting%2C+Boyd+IT+Consulting%2C+consulting';
var metaContents  = 'Community+PC+Help+is+a+501%28c%293+non-profit+community+service+organization.++The+purpose+and+mission+of+Community+PC+Help+is+to+provide+computers++to+individual+families%2C+children+and+community+service+organizations+in+the+local+urban+communities+of+Milwaukee%2C+Wisconsin.++I+also+provide+computer+repair+services+to+the+same.+I+provide+these+services+to+Christian+Ministries%2C+and+community+service+organizations+as+my+Christian+Service+to+the+local+community.';
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();
};
