/* [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','5301',jdecode('Home'),jdecode(''),'/5301.html','true',[],''],
	['PAGE','14001',jdecode('About'),jdecode(''),'/14001/index.html','true',[ 
		['PAGE','14022',jdecode('Debbie+Mozelle'),jdecode(''),'/14001/14022.html','true',[],''],
		['PAGE','14201',jdecode('Stores'),jdecode(''),'/14001/14201.html','true',[],''],
		['PAGE','15001',jdecode('Customer+Service'),jdecode(''),'/14001/15001.html','true',[],'']
	],''],
	['PAGE','40209',jdecode('Most+recent+Ads'),jdecode(''),'/40209.html','true',[],''],
	['PAGE','15127',jdecode('Products'),jdecode(''),'/15127.html','true',[],''],
	['PAGE','15190',jdecode('How+to+Order'),jdecode(''),'/15190.html','true',[],''],
	['PAGE','15148',jdecode('Specials'),jdecode(''),'/15148/index.html','true',[ 
		['PAGE','15169',jdecode('Available+Products'),jdecode(''),'/15148/15169.html','true',[],'']
	],''],
	['PAGE','43309',jdecode('Sunglasses'),jdecode(''),'/43309.html','true',[],''],
	['PAGE','38609',jdecode('Eyeglass+frames'),jdecode(''),'/38609.html','true',[],''],
	['PAGE','49809',jdecode('NEW+FRAMES+2010'),jdecode(''),'/49809.html','true',[],''],
	['PAGE','36509',jdecode('Staff'),jdecode(''),'/36509.html','true',[],''],
	['PAGE','36530',jdecode('Sight+Testing'),jdecode(''),'/36530.html','true',[],''],
	['PAGE','36551',jdecode('Lab+Generators+and+Edgers'),jdecode(''),'/36551.html','true',[],''],
	['PAGE','34509',jdecode('Progressive+Lenses'),jdecode(''),'/34509.html','true',[],''],
	['PAGE','14043',jdecode('Eyewear+Consulting'),jdecode(''),'/14043/index.html','true',[ 
		['PAGE','15043',jdecode('What+looks+good+on+you'),jdecode(''),'/14043/15043.html','true',[],''],
		['PAGE','15022',jdecode('Custom+consulting'),jdecode(''),'/14043/15022.html','true',[],'']
	],''],
	['PAGE','41409',jdecode('Color+Analysis'),jdecode(''),'/41409.html','true',[],''],
	['PAGE','15064',jdecode('Eye+Care'),jdecode(''),'/15064/index.html','true',[ 
		['PAGE','15085',jdecode('Your+Eyes'),jdecode(''),'/15064/15085.html','true',[],''],
		['PAGE','15106',jdecode('Your+Eyewear'),jdecode(''),'/15064/15106.html','true',[],'']
	],''],
	['PAGE','15211',jdecode('A+Gift+of+Sight'),jdecode(''),'/15211/index.html','true',[ 
		['PAGE','15232',jdecode('Donate+Your+Glasses'),jdecode(''),'/15211/15232.html','true',[],'']
	],''],
	['PAGE','15253',jdecode('Contact+Us'),jdecode(''),'/15253.html','true',[],''],
	['PAGE','15274',jdecode('Links'),jdecode(''),'/15274.html','true',[],'']];
var siteelementCount=28;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='617F92';
theSitetree.keyvisualId='6906';
theSitetree.keyvisualName='kv_6906.jpg';
theSitetree.fontsetId='11214';
theSitetree.graphicsetId='12036';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='809DAF';
var theTemplate={
				name: 			'Antigua',
				paletteFamily: 	'617F92',
				keyvisualId: 	'6906',
				keyvisualName: 	'kv_6906.jpg',
				fontsetId: 		'11214',
				graphicsetId: 	'12036',
				contentColor: 	'FFFFFF',
				contentBGColor: '809DAF',
				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: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20100416-011143'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14043',
internalId:  '',
customField: '20090320-235956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20090320-235519'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14022',
internalId:  '',
customField: '20100110-224804'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20090320-235645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15001',
internalId:  '',
customField: '20090323-011129'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15022',
internalId:  '',
customField: '20090323-012636'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15043',
internalId:  '',
customField: '20090324-222458'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15064',
internalId:  '',
customField: '20090326-005506'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15085',
internalId:  '',
customField: '20090306-224816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15106',
internalId:  '',
customField: '20100110-233605'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15127',
internalId:  '',
customField: '20090325-010928'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15148',
internalId:  '',
customField: '20100110-225311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15169',
internalId:  '',
customField: '20090321-020932'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15190',
internalId:  '',
customField: '20090325-011114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15211',
internalId:  '',
customField: '20090326-004500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15232',
internalId:  '',
customField: '20090321-002718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15253',
internalId:  '',
customField: '20090507-231606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15274',
internalId:  '',
customField: '20090401-231416'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34509',
internalId:  '',
customField: '20090321-025711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36509',
internalId:  '',
customField: '20090326-235259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36530',
internalId:  '',
customField: '20090325-004228'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36551',
internalId:  '',
customField: '20090325-011731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38609',
internalId:  '',
customField: '20100110-233329'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40209',
internalId:  '',
customField: '20090402-002040'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '41409',
internalId:  '',
customField: '20090506-224117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43309',
internalId:  '',
customField: '20100110-230548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49809',
internalId:  '',
customField: '20100111-001117'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INLMLH';
var companyName   = 'Debbie+Mozelle+Designer+Optical+';
var htmlTitle	  = '';
var metaKeywords  = 'eyeglass+cases%2Ceyeglasses%2Ccontacts%2Clenses%2Ceyeglass+cleaner%2Cdebbiemozelle%2Cdesignerframes%2Copticians%2Copticians+langley%2Copticians+whiterock%2Copticians+lower+mainland%2Cglasses%2Cframes%2Ccases%2Ccloths%2Ccleaners%2Ccleaner%2Ceyeglass+holders%2Csunglasses%2Cprescription+eyeglasses%2Cprescription+sunglasses%2Ceyeglass+frames%2Ccontact+lenses%2Ccolored+contact+lenses%2Csight+testing%2Cfree+sight+testing%2Csoldering%2Cframe+repairs%2Cbuisness%2Ceyeglass+buisness%2Clicenced+optician%2Clicenced+contact+lens+fitter%2Ceyeglass+lab%2Cquality+service%2C+service%2Ccustomer+service%2Cdebbie+mozelle+phonecards%2Ccleaning+cloths%2Ceyeglass+repair+kits%2Cadjustements%2C+eyeglass+adjustements%2CEyeglasses%2Ccontact+lenses%2Caccessories%2Ceyeglass+cases%2Ceyeglass+cleaner%2Ceyeglass+cloth%2Crepairs%2C';
var metaContents  = 'eyeglass+cases%2Ceyeglasses%2Ccontacts%2Clenses%2Ceyeglass+cleaner%2Cdebbiemozelle%2Cdesignerframes%2Copticians%2Copticians+langley%2Copticians+whiterock%2Copticians+lower+mainland%2Cglasses%2Cframes%2Ccases%2Ccloths%2Ccleaners%2Ccleaner%2Ceyeglass+holders%2Csunglasses%2Cprescription+eyeglasses%2Cprescription+sunglasses%2Ceyeglass+frames%2Ccontact+lenses%2Ccolored+contact+lenses%2Csight+testing%2Cfree+sight+testing%2Csoldering%2Cframe+repairs%2Cbuisness%2Ceyeglass+buisness%2Clicenced+optician%2Clicenced+contact+lens+fitter%2Ceyeglass+lab%2Cquality+service%2C+service%2Ccustomer+service%2Cdebbie+mozelle+phonecards%2Ccleaning+cloths%2Ceyeglass+repair+kits%2Cadjustements%2C+eyeglass+adjustements%2C';
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();
};
