/* [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','7101',jdecode('Home'),jdecode(''), jdecode('%2F7101.html'), 'true',[],'',''],
	['PAGE','7173',jdecode('Range+of+practice'),jdecode(''), jdecode('%2F7173%2Findex.html'), 'true',[ 
		['PAGE','7194',jdecode('Dentures+and+Partials'),jdecode(''), jdecode('%2F7173%2F7194.html'), 'true',[],'',''],
		['PAGE','18912',jdecode('Periodontics+and+Gum+Disease'),jdecode(''), jdecode('%2F7173%2F18912.html'), 'true',[],'',''],
		['PAGE','18612',jdecode('Dental+Implants'),jdecode(''), jdecode('%2F7173%2F18612.html'), 'true',[],'',''],
		['PAGE','15812',jdecode('Root+Canal+Therapy'),jdecode(''), jdecode('%2F7173%2F15812.html'), 'true',[],'',''],
		['PAGE','15833',jdecode('Invisalign%2F+Clear+Braces'),jdecode(''), jdecode('%2F7173%2F15833.html'), 'true',[],'',''],
		['PAGE','15854',jdecode('Cosmetic+Dentistry'),jdecode(''), jdecode('%2F7173%2F15854.html'), 'true',[],'',''],
		['PAGE','7215',jdecode('Oral+Surgery'),jdecode(''), jdecode('%2F7173%2F7215.html'), 'true',[],'',''],
		['PAGE','7236',jdecode('Whitening+'),jdecode(''), jdecode('%2F7173%2F7236.html'), 'true',[],'','']
	],'',''],
	['PAGE','16012',jdecode('In+Case+of+an+Emergency'),jdecode(''), jdecode('%2F16012.html'), 'true',[],'',''],
	['PAGE','7152',jdecode('Our+Promise+'),jdecode(''), jdecode('%2F7152.html'), 'true',[],'',''],
	['PAGE','8101',jdecode('About+us'),jdecode(''), jdecode('%2F8101%2Findex.html'), 'true',[ 
		['PAGE','8143',jdecode('Our+Doctor'),jdecode(''), jdecode('%2F8101%2F8143.html'), 'true',[],'',''],
		['PAGE','8164',jdecode('The+practice'),jdecode(''), jdecode('%2F8101%2F8164.html'), 'true',[],'','']
	],'',''],
	['PAGE','8185',jdecode('Contact'),jdecode(''), jdecode('%2F8185.html'), 'true',[],'',''],
	['PAGE','16112',jdecode('Hours+of+Operation'),jdecode(''), jdecode('%2F16112.html'), 'true',[],'',''],
	['PAGE','19312',jdecode('Payments'),jdecode(''), jdecode('%2F19312.html'), 'true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='C00405';
theSitetree.keyvisualId='2499';
theSitetree.keyvisualName='zahnarzt.jpg';
theSitetree.fontsetId='436';
theSitetree.graphicsetId='488';
theSitetree.contentColor='000066';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp13-cbeyon',
  product: 'WSCSYSSSSLYTC2ZA'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aeskulap',
				paletteFamily: 	'C00405',
				keyvisualId: 	'2499',
				keyvisualName: 	'zahnarzt.jpg',
				fontsetId: 		'436',
				graphicsetId: 	'488',
				contentColor: 	'000066',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				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:  '7101',
internalId:  '',
customField: '20101230-145433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7173',
internalId:  '',
customField: '20101230-145433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7152',
internalId:  '',
customField: '20101230-145433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8185',
internalId:  '',
customField: '20110104-100757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7194',
internalId:  '',
customField: '20101230-145433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16112',
internalId:  '',
customField: '20110108-171252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15833',
internalId:  '',
customField: '20110108-170841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8101',
internalId:  '',
customField: '20110104-100757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8143',
internalId:  '',
customField: '20110104-100757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8164',
internalId:  '',
customField: '20110104-100757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18612',
internalId:  '',
customField: '20110108-182912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15812',
internalId:  '',
customField: '20110108-170841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15854',
internalId:  '',
customField: '20110108-170841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7215',
internalId:  '',
customField: '20101230-145433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19312',
internalId:  '',
customField: '20110108-185803'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16012',
internalId:  '',
customField: '20110108-171028'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7236',
internalId:  '',
customField: '20101230-145433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18912',
internalId:  '',
customField: '20110108-184945'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7K9XY';
var companyName   = 'SMILE+SHAPERS+DENTAL';
var htmlTitle	  = '';
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();
};

