/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],''],
	['PAGE','352',jdecode('Meet+your+acupuncturist'),jdecode(''),'/352.html','true',[],''],
	['PAGE','13801',jdecode('Services+and+Special'),jdecode(''),'/13801.html','true',[],''],
	['PAGE','9401',jdecode('Q+%26+A'),jdecode(''),'/9401.html','true',[],''],
	['PAGE','394',jdecode('Fee+and+Insurances'),jdecode(''),'/394.html','true',[],''],
	['PAGE','9422',jdecode('Patient+Testimonials'),jdecode(''),'/9422.html','true',[],''],
	['PAGE','13222',jdecode('Cancellation+and+Refund'),jdecode(''),'/13222.html','true',[],''],
	['PAGE','13501',jdecode('Location'),jdecode(''),'/13501.html','false',[],''],
	['PAGE','14701',jdecode('Contact+us'),jdecode(''),'/14701.html','false',[],''],
	['PAGE','25301',jdecode('Your+Voting'),jdecode(''),'/25301.html','true',[],''],
	['PAGE','28601',jdecode('Anti-Anging'),jdecode(''),'/28601.html','true',[],''],
	['PAGE','29601',jdecode('Biophotonic+Scanner'),jdecode(''),'/29601.html','true',[],''],
	['PAGE','31236',jdecode('Antioxidant+Score'),jdecode(''),'/31236.html','true',[],''],
	['PAGE','31736',jdecode('chinese'),jdecode(''),'/31736.html','true',[],''],
	['PAGE','32536',jdecode('Face+Book+Friendship'),jdecode(''),'/32536.html','true',[],''],
	['PAGE','32736',jdecode('Usage'),jdecode(''),'/32736.html','true',[],''],
	['PAGE','37736',jdecode('beijing'),jdecode(''),'/37736.html','true',[],'']];
var siteelementCount=17;
theSitetree.topTemplateName='Roses';
theSitetree.paletteFamily='FFFBF2';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10444';
theSitetree.graphicsetId='10823';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFBF2';
var theTemplate={
				name: 			'Roses',
				paletteFamily: 	'FFFBF2',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10444',
				graphicsetId: 	'10823',
				contentColor: 	'000000',
				contentBGColor: 'FFFBF2',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'787878',
				e_color: 		'9D584B',
				f_color: 		'9D584B',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100401-214421'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31236',
internalId:  '',
customField: '20090312-104538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '352',
internalId:  '',
customField: '20090122-073026'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20090207-132720'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '394',
internalId:  '',
customField: '20090207-133216'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13222',
internalId:  '',
customField: '20090207-133310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9422',
internalId:  '',
customField: '20090126-104003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20090126-105854'
};
webappMappings['7008']=webappMappings['7008-400']={
webappId:    '7008',
documentId:  '14701',
internalId:  '400',
customField: 'language:en;country:US;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '13501',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13501',
internalId:  '',
customField: '20090207-133412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14701',
internalId:  '',
customField: '20090207-133538'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31736',
internalId:  '',
customField: '20090312-104629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32536',
internalId:  '',
customField: '20090401-170534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29601',
internalId:  '',
customField: '20090312-082723'
};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '301',
internalId:  '1501',
customField: '1501'
};
webappMappings['7005']=webappMappings['7005-189']={
webappId:    '7005',
documentId:  '25301',
internalId:  '189',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25301',
internalId:  '',
customField: '20090207-133642'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20090215-170721'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32736',
internalId:  '',
customField: '20090504-153401'
};
webappMappings['1501']=webappMappings['1501-3219762']={
webappId:    '1501',
documentId:  '301',
internalId:  '3219762',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37736',
internalId:  '',
customField: '20100401-214104'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INE92D';
var companyName   = 'Chevy+Chase+Wellness+Center';
var htmlTitle	  = 'Best+Acupuncture+Services+In+Chevy+Chase%2C++Bethesda%2C+N.W.+DC+%26+Beijing+China';
var metaKeywords  = 'acupuncture%2C+acupressure%2C+herb%2C+massage%2CChevy+chase%2C+Bethesda%2Cdc%2C+beijing%2C+china';
var metaContents  = 'acupuncture%2C+acupressure%2C+herb%2C+massage%2CChevy+chase%2C+Bethesda%2Cdc%2Cbeijing%2C+china';
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();
};
