/* [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','4801',jdecode('Home'),jdecode(''), jdecode('%2F4801.html'), 'true',[],'',''],
	['PAGE','4852',jdecode('About+us'),jdecode(''), jdecode('%2F4852%2Findex.html'), 'true',[ 
		['PAGE','4894',jdecode('Our+team'),jdecode(''), jdecode('%2F4852%2F4894.html'), 'true',[],'','']
	],'',''],
	['PAGE','34501',jdecode('Contact%2FOffice+Hours'),jdecode(''), jdecode('%2F34501.html'), 'true',[],'',''],
	['PAGE','4873',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F4873.html'), 'true',[],'',''],
	['PAGE','34522',jdecode('Services'),jdecode(''), jdecode('%2F34522%2Findex.html'), 'true',[ 
		['PAGE','61501',jdecode('Bite+Adjustment'),jdecode(''), jdecode('%2F34522%2F61501.html'), 'true',[],'',''],
		['PAGE','5401',jdecode('Braces'),jdecode(''), jdecode('%2F34522%2F5401.html'), 'true',[],'',''],
		['PAGE','61522',jdecode('Bridges'),jdecode(''), jdecode('%2F34522%2F61522.html'), 'true',[],'',''],
		['PAGE','61543',jdecode('Cleanings+%2F+Gum+Disease+Treatment'),jdecode(''), jdecode('%2F34522%2F61543.html'), 'true',[],'',''],
		['PAGE','19201',jdecode('Cavity+Free+Club'),jdecode(''), jdecode('%2F34522%2F19201.html'), 'true',[],'',''],
		['PAGE','71412',jdecode('Deep+Bleaching'),jdecode(''), jdecode('%2F34522%2F71412.html'), 'true',[],'',''],
		['PAGE','61564',jdecode('Dentures+%2F+Partials'),jdecode(''), jdecode('%2F34522%2F61564.html'), 'true',[],'',''],
		['PAGE','34543',jdecode('Implants'),jdecode(''), jdecode('%2F34522%2F34543.html'), 'true',[],'',''],
		['PAGE','34564',jdecode('Improve+Your+Smile'),jdecode(''), jdecode('%2F34522%2F34564.html'), 'true',[],'',''],
		['PAGE','58301',jdecode('Lumineers'),jdecode(''), jdecode('%2F34522%2F58301.html'), 'true',[],'',''],
		['PAGE','62201',jdecode('Snap+On+Smile'),jdecode(''), jdecode('%2F34522%2F62201.html'), 'true',[],'',''],
		['PAGE','34585',jdecode('TMJ+Therapy'),jdecode(''), jdecode('%2F34522%2F34585.html'), 'true',[],'',''],
		['PAGE','61585',jdecode('Tooth+Colored+Fillings'),jdecode(''), jdecode('%2F34522%2F61585.html'), 'true',[],'',''],
		['PAGE','61606',jdecode('Tooth+Removal'),jdecode(''), jdecode('%2F34522%2F61606.html'), 'true',[],'',''],
		['PAGE','73512',jdecode('Veneers'),jdecode(''), jdecode('%2F34522%2F73512.html'), 'true',[],'',''],
		['PAGE','61627',jdecode('Root+Canals'),jdecode(''), jdecode('%2F34522%2F61627.html'), 'true',[],'','']
	],'',''],
	['PAGE','95263',jdecode('Serving+the+Community'),jdecode(''), jdecode('%2F95263.html'), 'true',[],'',''],
	['PAGE','40001',jdecode('Smile+Gallery'),jdecode(''), jdecode('%2F40001.html'), 'true',[],'',''],
	['PAGE','19901',jdecode('Testimonials'),jdecode(''), jdecode('%2F19901.html'), 'true',[],'',''],
	['PAGE','34606',jdecode('Technology'),jdecode(''), jdecode('%2F34606.html'), 'true',[],'',''],
	['PAGE','34627',jdecode('Office+Tour'),jdecode(''), jdecode('%2F34627.html'), 'true',[],'',''],
	['PAGE','76912',jdecode('Coupons'),jdecode(''), jdecode('%2F76912.html'), 'true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Steps';
theSitetree.paletteFamily='315881';
theSitetree.keyvisualId='2287';
theSitetree.keyvisualName='blanko.jpg';
theSitetree.fontsetId='367';
theSitetree.graphicsetId='419';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='315881';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Steps',
				paletteFamily: 	'315881',
				keyvisualId: 	'2287',
				keyvisualName: 	'blanko.jpg',
				fontsetId: 		'367',
				graphicsetId: 	'419',
				contentColor: 	'FFFFFF',
				contentBGColor: '315881',
				a_color: 		'315881',
				b_color: 		'2985B5',
				c_color: 		'3366CC',
				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:  '4801',
internalId:  '',
customField: '20110516-124413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4852',
internalId:  '',
customField: '20110516-124833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4873',
internalId:  '',
customField: '20110622-122758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4894',
internalId:  '',
customField: '20110516-125236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20090722-124555'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34564',
internalId:  '',
customField: '20100811-140351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5401',
internalId:  '',
customField: '20110518-152143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34606',
internalId:  '',
customField: '20110516-145048'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34585',
internalId:  '',
customField: '20110516-141652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34543',
internalId:  '',
customField: '20110516-140347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34522',
internalId:  '',
customField: '20110516-130257'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34501',
internalId:  '',
customField: '20110622-123737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19901',
internalId:  '',
customField: '20111017-134541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34627',
internalId:  '',
customField: '20100303-145020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40001',
internalId:  '',
customField: '20110627-143352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58301',
internalId:  '',
customField: '20110516-140610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61501',
internalId:  '',
customField: '20110218-125843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61522',
internalId:  '',
customField: '20110516-133056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61543',
internalId:  '',
customField: '20110516-133553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61564',
internalId:  '',
customField: '20110218-125943'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61585',
internalId:  '',
customField: '20110516-142356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61606',
internalId:  '',
customField: '20110218-130808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61627',
internalId:  '',
customField: '20110516-144315'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62201',
internalId:  '',
customField: '20110516-141213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71412',
internalId:  '',
customField: '20110516-140004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73512',
internalId:  '',
customField: '20110218-131032'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '76912',
internalId:  '',
customField: '20110516-145238'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '95263',
internalId:  '',
customField: '20110516-144439'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '4801',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INLCST';
var companyName   = 'First+Impressions+Dental++++++++++248+627+3933+';
var htmlTitle	  = 'First+Impressions+Dental';
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();
};

