/* [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','1001',jdecode('Home'),jdecode(''),'/1001/index.html','true',[ 
		['PAGE','4801',jdecode('Mission'),jdecode(''),'/1001/4801.html','true',[],'']
	],''],
	['PAGE','1052',jdecode('Meet+Dr.Bandak'),jdecode(''),'/1052/index.html','true',[ 
		['PAGE','1073',jdecode('Experience'),jdecode(''),'/1052/1073.html','true',[],'']
	],''],
	['PAGE','1094',jdecode('Procedures'),jdecode(''),'/1094.html','true',[],''],
	['PAGE','1115',jdecode('Skin+Care'),jdecode(''),'/1115/index.html','true',[ 
		['PAGE','1136',jdecode('Botox'),jdecode(''),'/1115/1136.html','true',[],''],
		['PAGE','1178',jdecode('Restylane'),jdecode(''),'/1115/1178.html','true',[],''],
		['PAGE','1199',jdecode('Juvederm'),jdecode(''),'/1115/1199.html','true',[],''],
		['PAGE','1241',jdecode('Radiesse'),jdecode(''),'/1115/1241.html','true',[],''],
		['PAGE','1262',jdecode('TCA+Peel'),jdecode(''),'/1115/1262.html','true',[],''],
		['PAGE','1283',jdecode('Microdermabrasion'),jdecode(''),'/1115/1283.html','true',[],''],
		['PAGE','1304',jdecode('Skin+Care+Products'),jdecode(''),'/1115/1304.html','true',[],'']
	],''],
	['PAGE','1325',jdecode('Laser'),jdecode(''),'/1325.html','true',[],''],
	['PAGE','1346',jdecode('Testimonials'),jdecode(''),'/1346.html','true',[],''],
	['PAGE','1367',jdecode('Photo+Gallery'),jdecode(''),'/1367.html','true',[],''],
	['PAGE','1388',jdecode('Contact+Us'),jdecode(''),'/1388.html','true',[],''],
	['PAGE','1409',jdecode('Out+of+Town+Patients'),jdecode(''),'/1409.html','true',[],''],
	['PAGE','1430',jdecode('Patient+Forms'),jdecode(''),'/1430.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Dispose';
theSitetree.paletteFamily='E99C2E';
theSitetree.keyvisualId='9696';
theSitetree.keyvisualName='kv_9696.gif';
theSitetree.fontsetId='10661';
theSitetree.graphicsetId='11182';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='CCCACA';
var theTemplate={
				name: 			'Dispose',
				paletteFamily: 	'E99C2E',
				keyvisualId: 	'9696',
				keyvisualName: 	'kv_9696.gif',
				fontsetId: 		'10661',
				graphicsetId: 	'11182',
				contentColor: 	'000000',
				contentBGColor: 'CCCACA',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-4a3f238740863cee6a50e06b18947bd0']={
webappId:    '7060',
documentId:  '1367',
internalId:  '4a3f238740863cee6a50e06b18947bd0',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1001',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1093833']={
webappId:    '1501',
documentId:  '1001',
internalId:  '1093833',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1001',
internalId:  '',
customField: '20080430-235809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4801',
internalId:  '',
customField: '20080430-235850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1052',
internalId:  '',
customField: '20070605-121432'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1073',
internalId:  '',
customField: '20080501-000310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1094',
internalId:  '',
customField: '20080501-000447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1115',
internalId:  '',
customField: '20070607-115603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1136',
internalId:  '',
customField: '20080501-000525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1178',
internalId:  '',
customField: '20070605-121331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1199',
internalId:  '',
customField: '20070605-121351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1241',
internalId:  '',
customField: '20070605-121609'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1262',
internalId:  '',
customField: '20070605-121642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1283',
internalId:  '',
customField: '20070605-121805'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1304',
internalId:  '',
customField: '20080501-000918'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1325',
internalId:  '',
customField: '20070605-115331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1346',
internalId:  '',
customField: '20080501-002222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1367',
internalId:  '',
customField: '20080501-002247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1388',
internalId:  '',
customField: '20080105-160101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1409',
internalId:  '',
customField: '20070605-115331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1430',
internalId:  '',
customField: '20070605-115331'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INEGSB';
var companyName   = 'Bandak%27s+Plastic+Surgery';
var htmlTitle	  = '';
var metaKeywords  = 'plastic+surgery++cosmetic+surgery++breast+augmentations+.+saline+and+silicone++liposuction++body+contouring%3A+belt+lipectomies.+Arm+tucks.+Breast+lifts+and+augmentation.+Upper+body+lifts.+++Lower+body+lifts.+Thigh+lifts++facelifts++eye+surgery+blepheroplasties++fat+injections++breast+reconstruction++DIEP+flaps++Microsurgery++Breast+reductions++Botox+injections++Fillers.+Injectables++Lip+augmentations++Neck+lifts++';
var metaContents  = 'Dr.+Bandak+is+board-certified+in+plastic+surgery+and+frequently+performs+body+contouring%2C+liposuction%2C+breast+enhancement%2C+breast+augmentation%2C+breast+reconstruction+after+breast+cancer+surgery%2C+skin+cancer+surgery+and+other+reconstructive+surgery.+Below+are+descriptions+of+procedures+offered+by+Dr.+Bandak.+If+you+have+further+questions%2C+view+the+Photo+Gallery+links%2C+read+the+testimonials%2C+or+call+us+at+304-388-1930%21+You+may+also+be+interested+in+non-surgical+options+to+improve+your+appearance.+Please+click+on+Skin+Care+for+more+information.';
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();
};
