/* [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','74',jdecode('Home'),jdecode(''),'/74.html','true',[],''],
	['PAGE','95',jdecode('About+us'),jdecode(''),'/95.html','true',[],''],
	['PAGE','113',jdecode('Service'),jdecode(''),'/113/index.html','true',[ 
		['PAGE','8801',jdecode('Computer+Setup+'),jdecode(''),'/113/8801.html','true',[],''],
		['PAGE','9201',jdecode('Basic+Diagnostic'),jdecode(''),'/113/9201.html','true',[],''],
		['PAGE','9222',jdecode('Basic+Security'),jdecode(''),'/113/9222.html','true',[],''],
		['PAGE','9411',jdecode('Getting+you+ONline'),jdecode(''),'/113/9411.html','true',[],''],
		['PAGE','9243',jdecode('Computer+Tune+ups+%26+Optimization'),jdecode(''),'/113/9243.html','true',[],''],
		['PAGE','9264',jdecode('Software+Install+%26+Troubleshooting'),jdecode(''),'/113/9264.html','true',[],''],
		['PAGE','9285',jdecode('Hardware+Install+%26+Electronic+Device+Setup'),jdecode(''),'/113/9285.html','true',[],''],
		['PAGE','9306',jdecode('Operating+System+Install'),jdecode(''),'/113/9306.html','true',[],''],
		['PAGE','9327',jdecode('Wireless+Security+Setup'),jdecode(''),'/113/9327.html','true',[],''],
		['PAGE','9348',jdecode('In-Home+Networking+Consultation'),jdecode(''),'/113/9348.html','true',[],''],
		['PAGE','11401',jdecode('Whole+Home+Network+Installation'),jdecode(''),'/113/11401.html','true',[],''],
		['PAGE','9369',jdecode('Add+Device+to+Existing+Network'),jdecode(''),'/113/9369.html','true',[],''],
		['PAGE','9390',jdecode('Network+Troubleshooting+and+Repair'),jdecode(''),'/113/9390.html','true',[],''],
		['PAGE','9432',jdecode('Data+Backup'),jdecode(''),'/113/9432.html','true',[],''],
		['PAGE','9453',jdecode('Data+Recovery+'),jdecode(''),'/113/9453.html','true',[],''],
		['PAGE','9474',jdecode('Clean+and+Remove'),jdecode(''),'/113/9474.html','true',[],''],
		['PAGE','9495',jdecode('Computer+Training'),jdecode(''),'/113/9495.html','true',[],'']
	],''],
	['PAGE','3011',jdecode('Computer+systems'),jdecode(''),'/3011.html','true',[],''],
	['PAGE','3020',jdecode('Parts+and+Accessories'),jdecode(''),'/3020.html','true',[],''],
	['PAGE','158',jdecode('Contact'),jdecode(''),'/158.html','true',[],'']];
var siteelementCount=23;
theSitetree.topTemplateName='Activate';
theSitetree.paletteFamily='1E3A6F';
theSitetree.keyvisualId='2030';
theSitetree.keyvisualName='cd.jpg';
theSitetree.fontsetId='337';
theSitetree.graphicsetId='396';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='1E3A6F';
var theTemplate={
				name: 			'Activate',
				paletteFamily: 	'1E3A6F',
				keyvisualId: 	'2030',
				keyvisualName: 	'cd.jpg',
				fontsetId: 		'337',
				graphicsetId: 	'396',
				contentColor: 	'FFFFFF',
				contentBGColor: '1E3A6F',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'1E3A6F',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9222',
internalId:  '',
customField: '20081020-163511'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '74',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74',
internalId:  '',
customField: '20080628-180812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95',
internalId:  '',
customField: '20080403-224958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '113',
internalId:  '',
customField: '20081020-172120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20081020-162532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20081020-163533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9327',
internalId:  '',
customField: '20081020-164023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9411',
internalId:  '',
customField: '20081020-164948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9243',
internalId:  '',
customField: '20081020-171405'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9264',
internalId:  '',
customField: '20081020-163724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9285',
internalId:  '',
customField: '20081020-163924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9306',
internalId:  '',
customField: '20081020-163952'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9348',
internalId:  '',
customField: '20081020-164143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11401',
internalId:  '',
customField: '20081020-164643'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9369',
internalId:  '',
customField: '20081020-164346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9390',
internalId:  '',
customField: '20081020-164836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9432',
internalId:  '',
customField: '20081020-165017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9453',
internalId:  '',
customField: '20081020-165327'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9474',
internalId:  '',
customField: '20081020-165302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9495',
internalId:  '',
customField: '20081020-165440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3011',
internalId:  '',
customField: '20080403-233122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3020',
internalId:  '',
customField: '20080405-181727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '158',
internalId:  '',
customField: '20080403-225656'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INX3ER';
var companyName   = 'Geekie+Mon';
var htmlTitle	  = '';
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();
};
