/* [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','2801',jdecode('Home'),jdecode(''),'/2801.html','true',[],'',''],
	['PAGE','15701',jdecode('Dr.+Joey%26%23x27%3Bs+Online+Store'),jdecode(''),'/15701.html','false',[],'',''],
	['PAGE','17101',jdecode('eNewsletter'),jdecode(''),'/17101/index.html','true',[ 
		['PAGE','16501',jdecode('Subscribe'),jdecode(''),'/17101/16501.html','true',[],'',''],
		['PAGE','13901',jdecode('Archive'),jdecode(''),'/17101/13901.html','true',[],'','']
	],'',''],
	['PAGE','18401',jdecode('Computer+Services'),jdecode(''),'/18401.html','true',[],'',''],
	['PAGE','26101',jdecode('Online+Store+++++**NEW%21**'),jdecode(''),'/26101.html','true',[],'',''],
	['PAGE','22001',jdecode('Service+Specials'),jdecode(''),'/22001/index.html','true',[ 
		['PAGE','22501',jdecode('%2425+Off+Hourly+Charge+'),jdecode(''),'/22001/22501.html','false',[],'',''],
		['PAGE','6101',jdecode('Tune+Up+Special'),jdecode(''),'/22001/6101.html','false',[],'',''],
		['PAGE','35001',jdecode('Audio+Transfer+Special'),jdecode(''),'/22001/35001.html','true',[],'',''],
		['PAGE','22522',jdecode('Video+Transfer+Special'),jdecode(''),'/22001/22522.html','true',[],'','']
	],'',''],
	['PAGE','7501',jdecode('Transfer+Home+Movies+to+DVD'),jdecode(''),'/7501/index.html','true',[ 
		['PAGE','7801',jdecode('FAQs'),jdecode(''),'/7501/7801.html','true',[],'',''],
		['PAGE','7822',jdecode('Basic+Service'),jdecode(''),'/7501/7822.html','true',[],'',''],
		['PAGE','7843',jdecode('Deluxe+Service'),jdecode(''),'/7501/7843.html','true',[],'',''],
		['PAGE','7864',jdecode('Premier+Service'),jdecode(''),'/7501/7864.html','true',[],'',''],
		['PAGE','7885',jdecode('Customized+Services'),jdecode(''),'/7501/7885.html','true',[],'','']
	],'',''],
	['PAGE','28701',jdecode('Web+Services'),jdecode(''),'/28701/index.html','true',[ 
		['PAGE','30001',jdecode('Web+Hosting'),jdecode(''),'/28701/30001.html','true',[],'',''],
		['PAGE','30022',jdecode('Web+Site+Design'),jdecode(''),'/28701/30022.html','true',[],'',''],
		['PAGE','30043',jdecode('Marketing+Consulting'),jdecode(''),'/28701/30043.html','true',[],'',''],
		['PAGE','25001',jdecode('Log+In'),jdecode(''),'/28701/25001.html','true',[],'','']
	],'',''],
	['PAGE','24301',jdecode('Customer+Reviews'),jdecode(''),'/24301/index.html','true',[ 
		['PAGE','30501',jdecode('Add+a+Review'),jdecode(''),'/24301/30501.html','true',[],'','']
	],'',''],
	['PAGE','8801',jdecode('Contact+Us'),jdecode(''),'/8801.html','true',[],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='727D9C';
theSitetree.keyvisualId='11163';
theSitetree.keyvisualName='kv_11163.jpg';
theSitetree.fontsetId='32062';
theSitetree.graphicsetId='13879';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Office',
				paletteFamily: 	'727D9C',
				keyvisualId: 	'11163',
				keyvisualName: 	'kv_11163.jpg',
				fontsetId: 		'32062',
				graphicsetId: 	'13879',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				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:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2801',
internalId:  '',
customField: '20110704-022233'
};
webappMappings['1501']=webappMappings['1501-11840109']={
webappId:    '1501',
documentId:  '2801',
internalId:  '11840109',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20100521-194225'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20090911-172802'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7801',
internalId:  '',
customField: '20090105-052109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7822',
internalId:  '',
customField: '20090105-042749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7843',
internalId:  '',
customField: '20090105-043453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7864',
internalId:  '',
customField: '20090105-044854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7885',
internalId:  '',
customField: '20090404-132351'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '8801',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8801',
internalId:  '',
customField: '20100927-155053'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20100521-201526'
};
webappMappings['4001']=webappMappings['4001-13522161']={
webappId:    '4001',
documentId:  '15701',
internalId:  '13522161',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15701',
internalId:  '',
customField: '20081115-020553'
};
webappMappings['7008']=webappMappings['7008-12040']={
webappId:    '7008',
documentId:  '16501',
internalId:  '12040',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20090103-234519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20100521-201400'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18401',
internalId:  '',
customField: '20110704-011636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22001',
internalId:  '',
customField: '20110704-013659'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22501',
internalId:  '',
customField: '20100927-151441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22522',
internalId:  '',
customField: '20100521-195602'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '24301',
internalId:  '',
customField: '20090227-234950'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25001',
internalId:  '',
customField: '20090228-171044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20090227-221217'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28701',
internalId:  '',
customField: '20090212-222841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20090212-223840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30022',
internalId:  '',
customField: '20090212-223840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30043',
internalId:  '',
customField: '20090212-223840'
};
webappMappings['7008']=webappMappings['7008-14105']={
webappId:    '7008',
documentId:  '30501',
internalId:  '14105',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30501',
internalId:  '',
customField: '20090227-232444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20110704-013014'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INEMRX';
var companyName   = 'Dr.+Joey%27s+Computer+RX';
var htmlTitle	  = 'Dr.+Joey%27s+Computer+RX';
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();
};

