/* [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','201',jdecode('Home'),jdecode(''),'/201.html','true',[],'',''],
	['PAGE','95608',jdecode('Center+for+Holistic+Medicine'),jdecode(''),'/95608.html','true',[],'',''],
	['PAGE','1906',jdecode('About+Dr+Bisceglie'),jdecode(''),'/1906.html','true',[],'',''],
	['PAGE','9229',jdecode('For+Patients'),jdecode(''),'/9229.html','true',[],'',''],
	['PAGE','1911',jdecode('For+Physicians'),jdecode(''),'/1911.html','true',[],'',''],
	['PAGE','99808',jdecode('Naprapathy+research'),jdecode(''),'/99808.html','true',[],'',''],
	['PAGE','98508',jdecode('LASER+Treatment+Info'),jdecode(''),'/98508.html','true',[],'',''],
	['PAGE','105308',jdecode('InfraRED+Therapy'),jdecode(''),'/105308.html','true',[],'',''],
	['PAGE','67501',jdecode('Contact+Dr+Bisceglie'),jdecode(''),'/67501/index.html','true',[ 
		['PAGE','93308',jdecode('Appointment+Request+%28follow+up+page%29'),jdecode(''),'/67501/93308.html','false',[],'','']
	],'',''],
	['PAGE','88808',jdecode('Testimonials'),jdecode(''),'/88808.html','true',[],'',''],
	['PAGE','74608',jdecode('Definitions+and+Tips'),jdecode(''),'/74608.html','true',[],'',''],
	['PAGE','9234',jdecode('Links'),jdecode(''),'/9234.html','true',[],'','']];
var siteelementCount=13;
theSitetree.topTemplateName='Business';
theSitetree.paletteFamily='003366';
theSitetree.keyvisualId='2488';
theSitetree.keyvisualName='stethoskop.jpg';
theSitetree.fontsetId='418';
theSitetree.graphicsetId='463';
theSitetree.contentColor='020E66';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Business',
				paletteFamily: 	'003366',
				keyvisualId: 	'2488',
				keyvisualName: 	'stethoskop.jpg',
				fontsetId: 		'418',
				graphicsetId: 	'463',
				contentColor: 	'020E66',
				contentBGColor: 'FFFFFF',
				a_color: 		'003366',
				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:  '201',
internalId:  '',
customField: '20090203-095244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88808',
internalId:  '',
customField: '20090122-132720'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9234',
internalId:  '',
customField: '20090122-133924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95608',
internalId:  '',
customField: '20080921-221551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67501',
internalId:  '',
customField: '20070308-140607'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '74608',
internalId:  '',
customField: '20080220-111346'
};
webappMappings['1501']=webappMappings['1501-719279']={
webappId:    '1501',
documentId:  '201',
internalId:  '719279',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1906',
internalId:  '',
customField: '20080921-215732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9229',
internalId:  '',
customField: '20070315-103324'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1911',
internalId:  '',
customField: '20090203-095509'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '99808',
internalId:  '',
customField: '20071017-222104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98508',
internalId:  '',
customField: '20070716-213830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105308',
internalId:  '',
customField: '20080220-115157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93308',
internalId:  '',
customField: '20070308-140716'
};
webappMappings['7008']=webappMappings['7008-3497']={
webappId:    '7008',
documentId:  '67501',
internalId:  '3497',
customField: 'language:en;country:US;'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010INXZ77';
var companyName   = 'Dr.+Richard+A.+Bisceglie%2C+D.N.%2CC.N.S.';
var htmlTitle	  = 'Dr+Richard+Bisceglie+DN%2C+CNS+-+Manual+%2F+Nutritional+%2F+Integrative+Medicine';
var metaKeywords  = 'naprapath%2Cnaprapathy%2Cnaprapathic%2Cchiropractor%2Cchiropractic%2Cmassage%2Cphysical+therapy.healing+touch%2Cintegrative%2Calternative%2Cmedicine%2Cmanual%2Cpain+management%2C+back+pain%2C+north+shore%2C+northshore%2Crekii%2Cinfrared%2Cinfra-red%2C+laser%2Ctrauma%2Cwellness%2Chealthcare.bisceglie%2Ccrainio-sacral%2Ccranio-sacral%2Ccrainiosacral%2Ccranio-sacral%2Costeopath%2Costeopathic%2Cd.o.%2Cdo+++';
var metaContents  = 'Private+practice+location+information+of+Dr+Richard+Bisceglie+DN';
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();
};
