/* [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','5101',jdecode('For+Your+Business'),jdecode(''), jdecode('%2F5101.html'), 'true',[],'',''],
	['PAGE','14643',jdecode('Why+PK+Services%3F'),jdecode(''), jdecode('%2F14643.html'), 'true',[],'',''],
	['PAGE','14622',jdecode('For+You'),jdecode(''), jdecode('%2F14622.html'), 'true',[],'',''],
	['PAGE','14601',jdecode('Industries+Served'),jdecode(''), jdecode('%2F14601.html'), 'true',[],'',''],
	['PAGE','5152',jdecode('Testimonials'),jdecode(''), jdecode('%2F5152.html'), 'true',[],'',''],
	['PAGE','7001',jdecode('Biography'),jdecode(''), jdecode('%2F7001.html'), 'true',[],'',''],
	['PAGE','14664',jdecode('Giving+Back'),jdecode(''), jdecode('%2F14664.html'), 'true',[],'',''],
	['PAGE','5512',jdecode('Contact+Center'),jdecode(''), jdecode('%2F5512.html'), 'true',[],'','']];
var siteelementCount=8;
theSitetree.topTemplateName='Diamond';
theSitetree.paletteFamily='DCDEDC';
theSitetree.keyvisualId='6217';
theSitetree.keyvisualName='kv_6217.jpg';
theSitetree.fontsetId='11090';
theSitetree.graphicsetId='11861';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='DCDEDC';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'optimum',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Diamond',
				paletteFamily: 	'DCDEDC',
				keyvisualId: 	'6217',
				keyvisualName: 	'kv_6217.jpg',
				fontsetId: 		'11090',
				graphicsetId: 	'11861',
				contentColor: 	'000000',
				contentBGColor: 'DCDEDC',
				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:  '5101',
internalId:  '',
customField: '20120105-152217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5152',
internalId:  '',
customField: '20111216-081624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20120116-091615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5512',
internalId:  '',
customField: '20120104-153950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14622',
internalId:  '',
customField: '20120116-084039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14664',
internalId:  '',
customField: '20111205-120154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20120116-092423'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14643',
internalId:  '',
customField: '20120124-152202'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INLMEC';
var companyName   = 'Administrative%2C+Secretarial+%26+Bookkeeping+Services';
var htmlTitle	  = 'P.K.+Services+%7E+Administrative%2C+Sales+%26+Bookkeeping+Staffing+Solutions';
var metaKeywords  = 'Word%2C+Excel%2C+Outlook%2C+Gold+Mine%2C+PowerPoint%2C+Sage+Peachtree%2C+QuickBooks%2C+Quicken%2C+Money%2C+Word+Perfect%2C++SalesForce%2C+E-Grabber%2C+F%2FC+Bookkeeping%2C+full+charge+bookkeeping%2C+Virtual+Assistant+%2C+constant+contact%2C+free+conference%2C+Sales+%26+Marketing+Support%2C+Special+Projects%2C+Executive+Administrative+Assistant%2C+Notary+Public%2C+Collections%2C+Customer+Service+Liaison%2C+Gal+Friday%2C++Contract+Administration%2C+Complete+Office+Management+%2C+Efficiency%2C+Software%2C+Systems+Consulting+%26+Tutoring%2C+training%2C+personnel%2C+Creation%2FTracking+Critical+Reports%2C+Organizing+%26+Clean-Ups%2C+secretary%2C+staffing%2C+solutions%2C+part+time%2C+long+term%2C+billing%2C+A%2FP%2C+A%2FR%2C+collections%2C+staffing%2C+financial+services%2C+Secretary%2C+notary+public%2C++appointment+setting%2C+typist%2C+CV%2C+Resume%2C+bookkeeper%2C+agency%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A';
var metaContents  = 'Administrative%2C+Secreatarial+%26+Bookkeeping+Services+%7E+Offering+the+skills+and+services+you+need%2C+as+needed%2C+to+take+your+business+to+the+next+level%21%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A';
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();
};

