/* [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','2901',jdecode('Home'),jdecode(''),'/2901.html','true',[],''],
	['PAGE','2973',jdecode('About+Us'),jdecode(''),'/2973/index.html','true',[ 
		['PAGE','20401',jdecode('About+Our+Founder'),jdecode(''),'/2973/20401.html','true',[],''],
		['PAGE','20422',jdecode('About+Our+Logo'),jdecode(''),'/2973/20422.html','true',[],'']
	],''],
	['PAGE','2952',jdecode('Contact+Us'),jdecode(''),'/2952.html','true',[],''],
	['PAGE','3401',jdecode('Services'),jdecode(''),'/3401/index.html','true',[ 
		['PAGE','4101',jdecode('See...+Your+Target+Market'),jdecode(''),'/3401/4101.html','true',[],''],
		['PAGE','4122',jdecode('Know...+Their+Wants+and+Needs'),jdecode(''),'/3401/4122.html','true',[],''],
		['PAGE','4143',jdecode('Act...+To++Reach+Them+Effectively'),jdecode(''),'/3401/4143.html','true',[],'']
	],''],
	['PAGE','16701',jdecode('Products'),jdecode(''),'/16701/index.html','true',[ 
		['PAGE','19001',jdecode('Business+Plans+%26+Marketing+Plans'),jdecode(''),'/16701/19001.html','true',[],''],
		['PAGE','19022',jdecode('Informational+Products'),jdecode(''),'/16701/19022.html','true',[],''],
		['PAGE','19043',jdecode('Press+Releases'),jdecode(''),'/16701/19043.html','true',[],''],
		['PAGE','21401',jdecode('Social+Networking+Support'),jdecode(''),'/16701/21401.html','true',[],'']
	],''],
	['PAGE','17122',jdecode('JeebyComm+Blog'),jdecode(''),'/17122.html','true',[],''],
	['PAGE','17101',jdecode('Client+Testimonials'),jdecode(''),'/17101.html','true',[],''],
	['PAGE','16722',jdecode('Writing+Samples'),jdecode(''),'/16722.html','false',[],''],
	['PAGE','9601',jdecode('Case+Studies'),jdecode(''),'/9601.html','false',[],''],
	['PAGE','17143',jdecode('Press'),jdecode(''),'/17143.html','false',[],''],
	['PAGE','9622',jdecode('What%26%23x27%3Bs+New'),jdecode(''),'/9622.html','false',[],'']];
var siteelementCount=20;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='727D9C';
theSitetree.keyvisualId='11148';
theSitetree.keyvisualName='kv_11148.jpg';
theSitetree.fontsetId='32062';
theSitetree.graphicsetId='13879';
theSitetree.contentColor='4e5978';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Office',
				paletteFamily: 	'727D9C',
				keyvisualId: 	'11148',
				keyvisualName: 	'kv_11148.jpg',
				fontsetId: 		'32062',
				graphicsetId: 	'13879',
				contentColor: 	'4e5978',
				contentBGColor: 'FFFFFF',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2901',
internalId:  '',
customField: '20091124-132907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2952',
internalId:  '',
customField: '20091124-144207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2973',
internalId:  '',
customField: '20090926-213102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4122',
internalId:  '',
customField: '20090926-201250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3401',
internalId:  '',
customField: '20090926-172718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4101',
internalId:  '',
customField: '20090926-172755'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4143',
internalId:  '',
customField: '20090926-202213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20090131-225827'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9622',
internalId:  '',
customField: '20090131-225827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16701',
internalId:  '',
customField: '20090926-220816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16722',
internalId:  '',
customField: '20090607-213251'
};
webappMappings['7050']=webappMappings['7050-12385']={
webappId:    '7050',
documentId:  '17122',
internalId:  '12385',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17122',
internalId:  '',
customField: '20090926-230225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20091124-130042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17143',
internalId:  '',
customField: '20090926-165542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19001',
internalId:  '',
customField: '20090926-222705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19022',
internalId:  '',
customField: '20090926-223848'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19043',
internalId:  '',
customField: '20090926-202813'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20401',
internalId:  '',
customField: '20090926-211545'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20422',
internalId:  '',
customField: '20090926-212941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21401',
internalId:  '',
customField: '20090926-230135'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INELK9';
var companyName   = 'Great+Blue+Communications';
var htmlTitle	  = 'Great+Blue+Communications.++The+Words+You+Need...+Guaranteed.';
var metaKeywords  = 'marketing%2C+business+plans%2C+communications%2C+writing%2C+strategic%2C+analysis%2C+consulting%2C+business%2C+writer%2C+writing%2C+market+research%2C+marketing+communications%2C+target+market%2C+target+customers%2C+customers%2C+strategic+marketing+analysis%2C+strategic+analysis%2C+strategy%2C+analytical%2C+small+business%2C+advertising%2C+freelancer%2C+free-lancer%2C+free+lancer%2C+consultant%2C+branding%2C+brand+health%2C+business+owner';
var metaContents  = 'Great+Blue+Communications.++The+Words+You+Need.++Guaranteed.++A+marketing+and+communications+consulting+firm.++We+help+you+see+your+target+market%2C+know+their+wants+and+needs%2C+and+act+to+reach+them+effectively.++Visit+our+website+today+to+learn+how+we+can+help+you%21++www.greatbluecomm.com';
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();
};
