/* [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','2201',jdecode('Home'),jdecode(''), jdecode('%2F2201.html'), 'true',[],'',''],
	['PAGE','2420',jdecode('About+us'),jdecode(''), jdecode('%2F2420%2Findex.html'), 'true',[ 
		['PAGE','2462',jdecode('Our+team'),jdecode(''), jdecode('%2F2420%2F2462.html'), 'true',[],'',''],
		['PAGE','2483',jdecode('The+practice'),jdecode(''), jdecode('%2F2420%2F2483.html'), 'true',[],'','']
	],'',''],
	['PAGE','2252',jdecode('Hours'),jdecode(''), jdecode('%2F2252.html'), 'true',[],'',''],
	['PAGE','2399',jdecode('Contact'),jdecode(''), jdecode('%2F2399.html'), 'true',[],'',''],
	['PAGE','2378',jdecode('Service'),jdecode(''), jdecode('%2F2378.html'), 'true',[],'',''],
	['PAGE','19623',jdecode('Specials'),jdecode(''), jdecode('%2F19623.html'), 'true',[],'',''],
	['PAGE','14412',jdecode('Spectrum+of+Practice'),jdecode(''), jdecode('%2F14412%2Findex.html'), 'true',[ 
		['PAGE','14433',jdecode('Course+offerings'),jdecode(''), jdecode('%2F14412%2F14433.html'), 'true',[],'',''],
		['PAGE','14454',jdecode('Mission+Statement'),jdecode(''), jdecode('%2F14412%2F14454.html'), 'true',[],'',''],
		['PAGE','14475',jdecode('Care'),jdecode(''), jdecode('%2F14412%2F14475.html'), 'true',[],'','']
	],'',''],
	['PAGE','8833',jdecode('Email+Dr.+Atwal'),jdecode(''), jdecode('%2F8833.html'), 'true',[],'',''],
	['PAGE','18723',jdecode('Prescription+Refill'),jdecode(''), jdecode('%2F18723.html'), 'true',[],'',''],
	['PAGE','19823',jdecode('Hospital+Tour'),jdecode(''), jdecode('%2F19823.html'), 'true',[],'',''],
	['PAGE','20123',jdecode('Testimonials'),jdecode(''), jdecode('%2F20123.html'), 'true',[],'',''],
	['PAGE','9112',jdecode('Our+Location'),jdecode(''), jdecode('%2F9112.html'), 'true',[],'',''],
	['PAGE','10912',jdecode('Your+Experience'),jdecode(''), jdecode('%2F10912.html'), 'true',[],'',''],
	['PAGE','9133',jdecode('Guestbook'),jdecode(''), jdecode('%2F9133.html'), 'true',[],'',''],
	['PAGE','15212',jdecode('News%2FUpdates'),jdecode(''), jdecode('%2F15212.html'), 'true',[],'',''],
	['PAGE','2357',jdecode('Interesting+links'),jdecode(''), jdecode('%2F2357.html'), 'true',[],'',''],
	['PAGE','8812',jdecode('Privacy+Policy'),jdecode(''), jdecode('%2F8812.html'), 'true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Aeskulap';
theSitetree.paletteFamily='C00405';
theSitetree.keyvisualId='2494';
theSitetree.keyvisualName='arzt.jpg';
theSitetree.fontsetId='434';
theSitetree.graphicsetId='487';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'valueweb',
  product: 'WSCSYSSSSLYTCR7V'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Aeskulap',
				paletteFamily: 	'C00405',
				keyvisualId: 	'2494',
				keyvisualName: 	'arzt.jpg',
				fontsetId: 		'434',
				graphicsetId: 	'487',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2201',
internalId:  '',
customField: '20120113-174717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2252',
internalId:  '',
customField: '20090307-135532'
};
webappMappings['7008']=webappMappings['7008-2320']={
webappId:    '7008',
documentId:  '8833',
internalId:  '2320',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '2201',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-3805082']={
webappId:    '1501',
documentId:  '2201',
internalId:  '3805082',
customField: '1501'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '9112',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8833',
internalId:  '',
customField: '20090605-133727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8812',
internalId:  '',
customField: '20090307-132745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2357',
internalId:  '',
customField: '20120113-173954'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2378',
internalId:  '',
customField: '20090213-181047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2399',
internalId:  '',
customField: '20120113-172439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2420',
internalId:  '',
customField: '20100924-205658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2462',
internalId:  '',
customField: '20101228-214301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2483',
internalId:  '',
customField: '20090824-002040'
};
webappMappings['1002']=webappMappings['1002-9133ahw050invv5a']={
webappId:    '1002',
documentId:  '9133',
internalId:  '9133ahw050invv5a',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9112',
internalId:  '',
customField: '20090605-133529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9133',
internalId:  '',
customField: '20090605-134033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14433',
internalId:  '',
customField: '20100924-204312'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14412',
internalId:  '',
customField: '20100924-204008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10912',
internalId:  '',
customField: '20090824-002151'
};
webappMappings['7005']=webappMappings['7005-359']={
webappId:    '7005',
documentId:  '10912',
internalId:  '359',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14454',
internalId:  '',
customField: '20100924-205206'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14475',
internalId:  '',
customField: '20100924-205004'
};
webappMappings['1003']=webappMappings['1003-ahw050invv5a12b46b3bdea']={
webappId:    '1003',
documentId:  '15212',
internalId:  'ahw050invv5a12b46b3bdea',
customField: 'en:US'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15212',
internalId:  '',
customField: '20100924-212900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18723',
internalId:  '',
customField: '20101228-213653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19623',
internalId:  '',
customField: '20120113-172021'
};
webappMappings['7060']=webappMappings['7060-7144d65c57ae3187e0d1236ef652510d']={
webappId:    '7060',
documentId:  '19823',
internalId:  '7144d65c57ae3187e0d1236ef652510d',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-fb4bd6ee2b45eec2cb1a26643c13ed11']={
webappId:    '7060',
documentId:  '20123',
internalId:  'fb4bd6ee2b45eec2cb1a26643c13ed11',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20123',
internalId:  '',
customField: '20101223-184403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19823',
internalId:  '',
customField: '20110801-114722'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INVV5A';
var companyName   = 'Adam+Pet+Clinic';
var htmlTitle	  = 'Adam+Pet+Clinic';
var metaKeywords  = 'San+Jose+Vet+Veterinarian+Bay+Area+Pet+Pet+Clinic+Animal+Clinic+Cupertino+Saratoga+Los+Gatos+Sunnyvale+Fremont+Milpitas+Gilroy+Morgan+Hill+Los+Gatos+Hills+Mountain+View';
var metaContents  = 'We+are+a+full+scale+veterinary+clinic+in+the+Bay+Area+servicing+all+of+your+pets+needs.';
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();
};

