/* [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','5101',jdecode('Home'),jdecode(''),'/5101.html','true',[],'',''],
	['PAGE','5501',jdecode('Contact'),jdecode(''),'/5501/index.html','true',[ 
		['PAGE','5173',jdecode('How+to+find+us'),jdecode(''),'/5501/5173.html','true',[],'','']
	],'',''],
	['PAGE','5152',jdecode('About+us'),jdecode(''),'/5152/index.html','true',[ 
		['PAGE','5194',jdecode('Our+team'),jdecode(''),'/5152/5194.html','true',[],'','']
	],'',''],
	['PAGE','5564',jdecode('Procedures+and+Costs'),jdecode(''),'/5564.html','true',[],'',''],
	['PAGE','5606',jdecode('CERF'),jdecode(''),'/5606/index.html','true',[ 
		['PAGE','5627',jdecode('CERF+Individual'),jdecode(''),'/5606/5627.html','true',[],'',''],
		['PAGE','5648',jdecode('CERF+Litters'),jdecode(''),'/5606/5648.html','true',[],'','']
	],'',''],
	['PAGE','5522',jdecode('Mobile+Referral+Clinics'),jdecode(''),'/5522/index.html','true',[ 
		['PAGE','9301',jdecode('Travel+Location+Maps'),jdecode(''),'/5522/9301.html','true',[],'','']
	],'',''],
	['PAGE','9601',jdecode('Eye+Facts+and+Tips'),jdecode(''),'/9601/index.html','true',[ 
		['PAGE','15401',jdecode('Cataracts'),jdecode(''),'/9601/15401.html','true',[],'',''],
		['PAGE','16201',jdecode('Dry+Eye+%28KCS%29'),jdecode(''),'/9601/16201.html','true',[],'',''],
		['PAGE','15801',jdecode('Feline+Herpesvirus'),jdecode(''),'/9601/15801.html','true',[],'',''],
		['PAGE','15822',jdecode('Glaucoma'),jdecode(''),'/9601/15822.html','true',[],'',''],
		['PAGE','16222',jdecode('Pannus'),jdecode(''),'/9601/16222.html','true',[],'','']
	],'',''],
	['PAGE','5585',jdecode('Journals'),jdecode(''),'/5585/index.html','true',[ 
		['PAGE','17501',jdecode('Two+Colors'),jdecode(''),'/5585/17501.html','true',[],'','']
	],'',''],
	['PAGE','19401',jdecode('Photo+Gallery'),jdecode(''),'/19401.html','true',[],'',''],
	['PAGE','5543',jdecode('FAQs'),jdecode(''),'/5543.html','true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Movement';
theSitetree.paletteFamily='3E6E72';
theSitetree.keyvisualId='1819';
theSitetree.keyvisualName='kv_dummy.jpg';
theSitetree.fontsetId='289';
theSitetree.graphicsetId='354';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3E6E72';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Movement',
				paletteFamily: 	'3E6E72',
				keyvisualId: 	'1819',
				keyvisualName: 	'kv_dummy.jpg',
				fontsetId: 		'289',
				graphicsetId: 	'354',
				contentColor: 	'FFFFFF',
				contentBGColor: '3E6E72',
				a_color: 		'3E6E72',
				b_color: 		'101C1D',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20090429-141025'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20090703-115021'
};
webappMappings['7008']=webappMappings['7008-6000']={
webappId:    '7008',
documentId:  '5627',
internalId:  '6000',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-6001']={
webappId:    '7008',
documentId:  '5648',
internalId:  '6001',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5522',
internalId:  '',
customField: '20100114-135157'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5606',
internalId:  '',
customField: '20090428-170136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5627',
internalId:  '',
customField: '20090414-161132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5648',
internalId:  '',
customField: '20090414-161139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5564',
internalId:  '',
customField: '20091111-161459'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5543',
internalId:  '',
customField: '20090611-140913'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5585',
internalId:  '',
customField: '20090428-170824'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5152',
internalId:  '',
customField: '20091111-162632'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5173',
internalId:  '',
customField: '20090428-165951'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5194',
internalId:  '',
customField: '20090611-134708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20090408-182858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15401',
internalId:  '',
customField: '20090429-135703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20090916-182033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15822',
internalId:  '',
customField: '20090429-140410'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20090429-140218'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16201',
internalId:  '',
customField: '20090429-135858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16222',
internalId:  '',
customField: '20090429-140741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20090429-133342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19401',
internalId:  '',
customField: '20090611-134930'
};
var canonHostname = 'diywk02.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INHWGP';
var companyName   = 'Animal+Eye+Center';
var htmlTitle	  = '';
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();
};
