/* [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','901',jdecode('Home'),jdecode(''),'/901.html','true',[],'',''],
	['PAGE','1015',jdecode('Services'),jdecode(''),'/1015/index.html','true',[ 
		['PAGE','1036',jdecode('Routine+Vision+Care'),jdecode(''),'/1015/1036.html','true',[],'',''],
		['PAGE','1057',jdecode('Non-Routine+Care'),jdecode(''),'/1015/1057.html','true',[],'','']
	],'',''],
	['PAGE','952',jdecode('Staff'),jdecode(''),'/952/index.html','true',[ 
		['PAGE','973',jdecode('Dr+Nathan+L+Scott'),jdecode(''),'/952/973.html','true',[],'',''],
		['PAGE','994',jdecode('Staff%2FTechnicians'),jdecode(''),'/952/994.html','true',[],'','']
	],'',''],
	['PAGE','45634',jdecode('Patient+Education'),jdecode(''),'/45634/index.html','true',[ 
		['PAGE','7543',jdecode('Heard+on+KOZI'),jdecode(''),'/45634/7543.html','true',[],'',''],
		['PAGE','67555',jdecode('3D+Eye+Library'),jdecode(''),'/45634/67555.html','true',[],'','']
	],'',''],
	['PAGE','1078',jdecode('Products'),jdecode(''),'/1078/index.html','true',[ 
		['PAGE','1099',jdecode('Frames'),jdecode(''),'/1078/1099.html','true',[],'',''],
		['PAGE','40023',jdecode('Sunglasses+%2F+Snow'),jdecode(''),'/1078/40023.html','true',[],'',''],
		['PAGE','21423',jdecode('Lens+Designs'),jdecode(''),'/1078/21423.html','true',[],'',''],
		['PAGE','1120',jdecode('Lens+Materials'),jdecode(''),'/1078/1120.html','true',[],'',''],
		['PAGE','37423',jdecode('Bolle%26%23x27%3B+Rx+Lenses'),jdecode(''),'/1078/37423.html','false',[],'',''],
		['PAGE','37444',jdecode('Nike+Rx+Lenses'),jdecode(''),'/1078/37444.html','false',[],'',''],
		['PAGE','36423',jdecode('Serengeti+Rx+Lenses'),jdecode(''),'/1078/36423.html','false',[],'',''],
		['PAGE','29023',jdecode('Buying+Glasses'),jdecode(''),'/1078/29023.html','false',[],'',''],
		['PAGE','21444',jdecode('Lens+Upgrades'),jdecode(''),'/1078/21444.html','true',[],'',''],
		['PAGE','1141',jdecode('Contact+Lenses'),jdecode(''),'/1078/1141.html','true',[],'',''],
		['PAGE','31823',jdecode('Contact+Lens+Care'),jdecode(''),'/1078/31823.html','true',[],'','']
	],'',''],
	['PAGE','31323',jdecode('Purchase+Contacts'),jdecode(''),'/31323.html','true',[],'',''],
	['PAGE','7501',jdecode('Forms'),jdecode(''),'/7501.html','true',[],'',''],
	['PAGE','7522',jdecode('Preferred+Specialists'),jdecode(''),'/7522.html','true',[],'',''],
	['PAGE','17012',jdecode('Location'),jdecode(''),'/17012.html','true',[],'',''],
	['PAGE','27223',jdecode('Survey'),jdecode(''),'/27223.html','true',[],'',''],
	['PAGE','1183',jdecode('Contact'),jdecode(''),'/1183/index.html','true',[ 
		['PAGE','13701',jdecode('E-Mail+Contact+List'),jdecode(''),'/1183/13701.html','true',[],'',''],
		['PAGE','13801',jdecode('E-Mail+List'),jdecode(''),'/1183/13801.html','false',[],'','']
	],'',''],
	['PAGE','28223',jdecode('Espanol%2FSpanish'),jdecode(''),'/28223.html','false',[],'',''],
	['PAGE','43034',jdecode('Employment'),jdecode(''),'/43034.html','true',[],'',''],
	['PAGE','65855',jdecode('CareCredit'),jdecode(''),'/65855.html','false',[],'','']];
var siteelementCount=33;
theSitetree.topTemplateName='echo';
theSitetree.paletteFamily='712A2B';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10623';
theSitetree.graphicsetId='10630';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'echo',
				paletteFamily: 	'712A2B',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10623',
				graphicsetId: 	'10630',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-876269']={
webappId:    '1501',
documentId:  '901',
internalId:  '876269',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1015',
internalId:  '',
customField: '20081126-202227'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '901',
internalId:  '',
customField: '20100310-004441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1036',
internalId:  '',
customField: '20081111-165142'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1057',
internalId:  '',
customField: '20081126-202241'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '952',
internalId:  '',
customField: '20100311-230958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '973',
internalId:  '',
customField: '20091204-172023'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '994',
internalId:  '',
customField: '20100316-003302'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1078',
internalId:  '',
customField: '20090513-215131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1099',
internalId:  '',
customField: '20100322-155352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1120',
internalId:  '',
customField: '20081126-234406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1141',
internalId:  '',
customField: '20081126-225608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21423',
internalId:  '',
customField: '20081126-233351'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7501',
internalId:  '',
customField: '20091204-172539'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7522',
internalId:  '',
customField: '20081114-164519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7543',
internalId:  '',
customField: '20100311-235255'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1183',
internalId:  '',
customField: '20100428-160223'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20100311-234541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13701',
internalId:  '',
customField: '20081113-164403'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '17012',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17012',
internalId:  '',
customField: '20100316-011259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21444',
internalId:  '',
customField: '20100111-154409'
};
webappMappings['7005']=webappMappings['7005-100']={
webappId:    '7005',
documentId:  '27223',
internalId:  '100',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27223',
internalId:  '',
customField: '20100322-160114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29023',
internalId:  '',
customField: '20081126-212411'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28223',
internalId:  '',
customField: '20081126-204853'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31323',
internalId:  '',
customField: '20091204-172147'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31823',
internalId:  '',
customField: '20081126-232111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36423',
internalId:  '',
customField: '20100316-010305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37423',
internalId:  '',
customField: '20100316-005606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37444',
internalId:  '',
customField: '20090413-161912'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40023',
internalId:  '',
customField: '20100316-004422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43034',
internalId:  '',
customField: '20091120-180406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45634',
internalId:  '',
customField: '20091204-173207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65855',
internalId:  '',
customField: '20100310-005039'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '67555',
internalId:  '',
customField: '20100311-235147'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INE1PQ';
var companyName   = 'Spectrum+Eye+Care';
var htmlTitle	  = 'Spectrum+Eye+Care+-+Chelan';
var metaKeywords  = 'Spectrum+Eye+Care+Eye+Care+Optometrist+Optometry+Chelan+Eyeglass+Eyeglasses+Contacts+Contact+Lenses++Lake+Chelan+lasik+cataract+glaucoma+sunglass+sunglasses+surgery+ophthalmology+ophthalmologist';
var metaContents  = 'Spectrum+Eye+Care+-+Chelan%2C+WA';
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();
};
