/* [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','1899',jdecode('Home'),jdecode(''),'/1899.html','true',[],''],
	['PAGE','46601',jdecode('Dr.+Rozakis+Bio'),jdecode(''),'/46601.html','true',[],''],
	['PAGE','1857',jdecode('Blog'),jdecode(''),'/1857.html','true',[],''],
	['PAGE','1752',jdecode('Lasik'),jdecode(''),'/1752.html','true',[],''],
	['PAGE','1773',jdecode('Phakic+IOL'),jdecode(''),'/1773.html','true',[],''],
	['PAGE','15401',jdecode('Phakic+vs+Lasik'),jdecode(''),'/15401.html','true',[],''],
	['PAGE','1878',jdecode('Lens+Exchange'),jdecode(''),'/1878.html','true',[],''],
	['PAGE','1836',jdecode('Macular+Degeneration'),jdecode(''),'/1836.html','true',[],''],
	['PAGE','12101',jdecode('Restorative+Medicine'),jdecode(''),'/12101.html','true',[],''],
	['PAGE','83501',jdecode('Registration+Page'),jdecode(''),'/83501.html','false',[],''],
	['PAGE','47501',jdecode('Video+Introduction'),jdecode(''),'/47501.html','false',[],''],
	['PAGE','70201',jdecode('Macular+Study'),jdecode(''),'/70201.html','false',[],''],
	['PAGE','15422',jdecode('Migraine'),jdecode(''),'/15422.html','false',[],''],
	['PAGE','62601',jdecode('Tim+Russert'),jdecode(''),'/62601.html','false',[],''],
	['PAGE','55301',jdecode('YouTube'),jdecode(''),'/55301.html','false',[],''],
	['PAGE','52101',jdecode('Lasik+Feedback'),jdecode(''),'/52101.html','false',[],''],
	['PAGE','52622',jdecode('Restorative+Feedback'),jdecode(''),'/52622.html','false',[],''],
	['PAGE','52601',jdecode('neurology'),jdecode(''),'/52601.html','false',[],''],
	['PAGE','13301',jdecode('Eye+Professionals'),jdecode(''),'/13301.html','false',[],''],
	['PAGE','18201',jdecode('See+Look+Feel+Great%21'),jdecode(''),'/18201.html','false',[],''],
	['PAGE','8601',jdecode('Optometry'),jdecode(''),'/8601.html','false',[],''],
	['PAGE','1794',jdecode('Cataract'),jdecode(''),'/1794.html','false',[],''],
	['PAGE','18501',jdecode('Erbium+Skin+Laser'),jdecode(''),'/18501.html','false',[],''],
	['PAGE','42301',jdecode('Lamellar+Book'),jdecode(''),'/42301.html','false',[],''],
	['PAGE','19101',jdecode('Images'),jdecode(''),'/19101.html','false',[],''],
	['PAGE','58401',jdecode('Labs'),jdecode(''),'/58401.html','false',[],''],
	['PAGE','89601',jdecode('Contact+Us'),jdecode(''),'/89601.html','true',[],''],
	['PAGE','61001',jdecode('Webinar'),jdecode(''),'/61001.html','false',[],''],
	['PAGE','87901',jdecode('DZugan+Principle'),jdecode(''),'/87901.html','false',[],'']];
var siteelementCount=29;
theSitetree.topTemplateName='Moonflight';
theSitetree.paletteFamily='5B7A93';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='445';
theSitetree.graphicsetId='499';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Moonflight',
				paletteFamily: 	'5B7A93',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'445',
				graphicsetId: 	'499',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'2C5574',
				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['7050']=webappMappings['7050-757']={
webappId:    '7050',
documentId:  '1857',
internalId:  '757',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87901',
internalId:  '',
customField: '20091112-235504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1794',
internalId:  '',
customField: '20080409-015154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20080418-013229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1836',
internalId:  '',
customField: '20091221-221530'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1857',
internalId:  '',
customField: '20091221-223410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1878',
internalId:  '',
customField: '20080405-022616'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1752',
internalId:  '',
customField: '20091207-140645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1773',
internalId:  '',
customField: '20080509-122122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1899',
internalId:  '',
customField: '20091221-222657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20080406-025907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12101',
internalId:  '',
customField: '20091112-233647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20091112-233521'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20080506-010726'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15422',
internalId:  '',
customField: '20090710-191551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18501',
internalId:  '',
customField: '20080418-005847'
};
webappMappings['7060']=webappMappings['7060-ea3b7c305e20de26934196a0b6bbc9fb']={
webappId:    '7060',
documentId:  '19101',
internalId:  'ea3b7c305e20de26934196a0b6bbc9fb',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19101',
internalId:  '',
customField: '20080409-074407'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42301',
internalId:  '',
customField: '20080413-192004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '46601',
internalId:  '',
customField: '20091221-220331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47501',
internalId:  '',
customField: '20080508-015528'
};
webappMappings['7008']=webappMappings['7008-3376']={
webappId:    '7008',
documentId:  '52101',
internalId:  '3376',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52101',
internalId:  '',
customField: '20080503-214132'
};
webappMappings['7008']=webappMappings['7008-3387']={
webappId:    '7008',
documentId:  '52622',
internalId:  '3387',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52601',
internalId:  '',
customField: '20080610-221850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52622',
internalId:  '',
customField: '20080505-230546'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55301',
internalId:  '',
customField: '20090615-001830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58401',
internalId:  '',
customField: '20080509-121843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61001',
internalId:  '',
customField: '20080521-000806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62601',
internalId:  '',
customField: '20080804-161915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '70201',
internalId:  '',
customField: '20081117-014311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89601',
internalId:  '',
customField: '20091221-221913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83501',
internalId:  '',
customField: '20090222-024021'
};
webappMappings['7008']=webappMappings['7008-13873']={
webappId:    '7008',
documentId:  '83501',
internalId:  '13873',
customField: 'language:en;country:US;'
};
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2QNF';
var companyName   = 'Ophthalmology+and+Restorative+Medicine';
var htmlTitle	  = 'Rozakis+Eye+Surgery+and+Restorative+Medicine';
var metaKeywords  = 'Lasik+Phakic+Lenses+Staar+Visian+hormones+macular+degeneration+Cleveland+Ohio+Migraine';
var metaContents  = 'Dr.+Rozakis+is+a+pioneer+in+the+surgical+methods+to+eliminate+the+need+for+glasses+and+contact+lenses+as+well+as+a+pioneer+in+the+integration+of+Ophthalmology+with+the+field+of+bioidentical+hormonal+medicine.';
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();
};
