/* [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','87',jdecode('Home'),jdecode(''), jdecode('%2F87.html'), 'true',[],'',''],
	['PAGE','108',jdecode('About+us'),jdecode(''), jdecode('%2F108.html'), 'true',[],'',''],
	['PAGE','117',jdecode('Business+Hours'),jdecode(''), jdecode('%2F117.html'), 'true',[],'',''],
	['PAGE','126',jdecode('Pricing+%26+Services'),jdecode(''), jdecode('%2F126.html'), 'true',[],'',''],
	['PAGE','1056',jdecode('Spa+Pricing+'),jdecode(''), jdecode('%2F1056.html'), 'true',[],'',''],
	['PAGE','135',jdecode('Contact+Us'),jdecode(''), jdecode('%2F135.html'), 'true',[],'',''],
	['PAGE','724',jdecode('News+and+PR'),jdecode(''), jdecode('%2F724.html'), 'true',[],'',''],
	['PAGE','733',jdecode('Job+Listings+'),jdecode(''), jdecode('%2F733.html'), 'true',[],'',''],
	['PAGE','788',jdecode('Directions'),jdecode(''), jdecode('%2F788.html'), 'true',[],'',''],
	['PAGE','800',jdecode('How+to+find+us'),jdecode(''), jdecode('%2F800.html'), 'true',[],'','']];
var siteelementCount=10;
theSitetree.topTemplateName='Boston';
theSitetree.paletteFamily='4C5C9E';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='11066';
theSitetree.graphicsetId='11842';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='6476B8';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLYTCPXC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Boston',
				paletteFamily: 	'4C5C9E',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'11066',
				graphicsetId: 	'11842',
				contentColor: 	'FFFFFF',
				contentBGColor: '6476B8',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '87',
internalId:  '1006',
customField: '1006'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '788',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['2002']=webappMappings['2002-routing']={
webappId:    '2002',
documentId:  '800',
internalId:  'routing',
customField: 'en_US'
};
webappMappings['1501']=webappMappings['1501-116542']={
webappId:    '1501',
documentId:  '87',
internalId:  '116542',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-807']={
webappId:    '7008',
documentId:  '135',
internalId:  '807',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87',
internalId:  '',
customField: '20120202-155207'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108',
internalId:  '',
customField: '20091016-181617'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '117',
internalId:  '',
customField: '20110829-164606'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '126',
internalId:  '',
customField: '20110829-164049'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1056',
internalId:  '',
customField: '20110829-164154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '135',
internalId:  '',
customField: '20110829-164854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '724',
internalId:  '',
customField: '20080330-221346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '733',
internalId:  '',
customField: '20080518-162656'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '788',
internalId:  '',
customField: '20080330-210915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '800',
internalId:  '',
customField: '20081207-173409'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INX2II';
var companyName   = 'Paws+%27n+Claws+Pet+Resort';
var htmlTitle	  = 'Paws+n+Claws+Pet+Resort+%26+Grooming+Salon+-+PREMIER+Pet+Boarding+and+Grooming+';
var metaKeywords  = 'Pet+sitting%2C+pet+boarding%2C+dog+boarding%2C+dog+grooming%2C+cat+grooming%2C+cat+boarding%2C+Pennsylvania+pet+boarding%2C+Erie+PA+pet+boarding%2C+Erie+County+Pet+Boarding%2C+animal+boarding%2C+grooming%2C+kennel%2C+pet+resort%2C+kenneling%2C+kenneling%2C+boarding+facility%2C+dog+day+care%2C+doggy+day+care%2C+doggie+day+care%2C+animal+day+care%2C+pet+styling+';
var metaContents  = 'Paws+n+Claws+Pet+Resort+is+the+PREMIER+pet+boarding+and+grooming+facility+whose+first+consideration+is+the+comfort%2C+safety+and+security+of+your+pets.++We+offer+full+service+grooming%2C+styling+and+bath+packages+at+our+salon.++We+board+dogs%2C+cats%2C+rabbits%2C+ferrets%2C+small+mammals%2C+birds%2C+reptiles%2C+amphibians%2C+fish+and+other+exotics.++';
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();
};

