/* [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','601',jdecode('Home'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','652',jdecode('About+Us'),jdecode(''),'/652/index.html','true',[ 
		['PAGE','673',jdecode('History'),jdecode(''),'/652/673.html','true',[],'','']
	],'',''],
	['PAGE','694',jdecode('Services'),jdecode(''),'/694/index.html','true',[ 
		['PAGE','34201',jdecode('Comprehensive+Exam'),jdecode(''),'/694/34201.html','true',[],'',''],
		['PAGE','33901',jdecode('Contact+Lens+Fitting'),jdecode(''),'/694/33901.html','true',[],'',''],
		['PAGE','34222',jdecode('Fundus+Photography'),jdecode(''),'/694/34222.html','true',[],'',''],
		['PAGE','35001',jdecode('LASIK+Evaluation'),jdecode(''),'/694/35001.html','true',[],'',''],
		['PAGE','35022',jdecode('Cataract+Evaluation'),jdecode(''),'/694/35022.html','true',[],'',''],
		['PAGE','35043',jdecode('Pediatric+Eye+Exams'),jdecode(''),'/694/35043.html','true',[],'',''],
		['PAGE','35064',jdecode('Diabetic+Eye+Disease'),jdecode(''),'/694/35064.html','true',[],'','']
	],'',''],
	['PAGE','715',jdecode('Contact+Us'),jdecode(''),'/715.html','true',[],'',''],
	['PAGE','778',jdecode('Contact+Lenses'),jdecode(''),'/778/index.html','true',[ 
		['PAGE','22401',jdecode('Order+Contact+Lenses'),jdecode(''),'/778/22401.html','true',[],'',''],
		['PAGE','36201',jdecode('Dos+and+Don%26%23x27%3Bts'),jdecode(''),'/778/36201.html','true',[],'',''],
		['PAGE','36301',jdecode('What+if...'),jdecode(''),'/778/36301.html','true',[],'',''],
		['PAGE','36322',jdecode('For+Overnight+Wearers'),jdecode(''),'/778/36322.html','true',[],'',''],
		['PAGE','37812',jdecode('Contact+Lens+Care+Products'),jdecode(''),'/778/37812.html','true',[],'','']
	],'',''],
	['PAGE','32301',jdecode('Eye+Diseases'),jdecode(''),'/32301.html','true',[],'',''],
	['PAGE','18701',jdecode('Upcoming+Events%21'),jdecode(''),'/18701.html','true',[],'',''],
	['PAGE','820',jdecode('Optical+Shop'),jdecode(''),'/820/index.html','true',[ 
		['PAGE','20301',jdecode('Our+Lab'),jdecode(''),'/820/20301.html','true',[],'',''],
		['PAGE','61112',jdecode('Our+Products'),jdecode(''),'/820/61112.html','true',[],'','']
	],'',''],
	['PAGE','10601',jdecode('Online+Discount+Offers'),jdecode(''),'/10601.html','true',[],'',''],
	['PAGE','10622',jdecode('Appointment+Request'),jdecode(''),'/10622/index.html','true',[ 
		['PAGE','25301',jdecode('Patient+Forms'),jdecode(''),'/10622/25301.html','true',[],'','']
	],'',''],
	['PAGE','30701',jdecode('Leave+a+Comment'),jdecode(''),'/30701.html','true',[],'',''],
	['PAGE','38512',jdecode('Newsletter'),jdecode(''),'/38512.html','true',[],'','']];
var siteelementCount=28;
theSitetree.topTemplateName='Oblique';
theSitetree.paletteFamily='E6D18A';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='33311';
theSitetree.graphicsetId='14183';
theSitetree.contentColor='333333';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Oblique',
				paletteFamily: 	'E6D18A',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'33311',
				graphicsetId: 	'14183',
				contentColor: 	'333333',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Palatino Linotype, Book Antiqua, Palatino, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-905']={
webappId:    '7008',
documentId:  '10622',
internalId:  '905',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-906']={
webappId:    '7008',
documentId:  '22401',
internalId:  '906',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61112',
internalId:  '',
customField: '20090610-181232'
};
webappMappings['7008']=webappMappings['7008-907']={
webappId:    '7008',
documentId:  '30701',
internalId:  '907',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20100524-112226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20100607-163039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '673',
internalId:  '',
customField: '20100517-180055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '694',
internalId:  '',
customField: '20100517-175322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '778',
internalId:  '',
customField: '20090307-144040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33901',
internalId:  '',
customField: '20090130-161112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34201',
internalId:  '',
customField: '20100517-134429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34222',
internalId:  '',
customField: '20090108-105539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35001',
internalId:  '',
customField: '20081215-135623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35022',
internalId:  '',
customField: '20081215-135623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35043',
internalId:  '',
customField: '20090528-141738'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35064',
internalId:  '',
customField: '20090206-183814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '715',
internalId:  '',
customField: '20091209-114126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22401',
internalId:  '',
customField: '20090130-155650'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32301',
internalId:  '',
customField: '20081208-123835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18701',
internalId:  '',
customField: '20100517-140039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '820',
internalId:  '',
customField: '20090312-135207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10601',
internalId:  '',
customField: '20100126-233504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20301',
internalId:  '',
customField: '20090316-115829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10622',
internalId:  '',
customField: '20091015-094744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25301',
internalId:  '',
customField: '20081219-133305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37812',
internalId:  '',
customField: '20090307-150319'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38512',
internalId:  '',
customField: '20081219-132412'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30701',
internalId:  '',
customField: '20090504-231033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36201',
internalId:  '',
customField: '20081217-184041'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36322',
internalId:  '',
customField: '20081219-121603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36301',
internalId:  '',
customField: '20081217-195216'
};
webappMappings['7008']=webappMappings['7008-1798']={
webappId:    '7008',
documentId:  '38512',
internalId:  '1798',
customField: 'language:en;country:US;'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INP70R';
var companyName   = 'Mission+EyeCare';
var htmlTitle	  = 'Mission+EyeCare';
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();
};
