/* [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','1401',jdecode('Home'),jdecode(''),'/1401.html','true',[],'',''],
	['PAGE','63384',jdecode('Online+Shopping'),jdecode(''),'/63384.html','true',[],'',''],
	['PAGE','1452',jdecode('About+us'),jdecode(''),'/1452.html','true',[],'',''],
	['PAGE','1494',jdecode('Archery+Products'),jdecode(''),'/1494/index.html','true',[ 
		['PAGE','47984',jdecode('Bow+Sale'),jdecode(''),'/1494/47984.html','true',[],'',''],
		['PAGE','61084',jdecode('Crossbows+%26+More'),jdecode(''),'/1494/61084.html','true',[],'',''],
		['PAGE','51684',jdecode('USED+BOWS'),jdecode(''),'/1494/51684.html','true',[],'',''],
		['PAGE','60184',jdecode('Bowfishing+Equipment'),jdecode(''),'/1494/60184.html','true',[],'','']
	],'',''],
	['PAGE','27384',jdecode('Firearms+%26+Knives'),jdecode(''),'/27384/index.html','true',[ 
		['PAGE','52284',jdecode('Reloading'),jdecode(''),'/27384/52284.html','true',[],'',''],
		['PAGE','8501',jdecode('USED+GUN+LIST'),jdecode(''),'/27384/8501.html','true',[],'','']
	],'',''],
	['PAGE','77884',jdecode('Tree+Stands+%26+More'),jdecode(''),'/77884.html','true',[],'',''],
	['PAGE','27405',jdecode('Fun+Stuff'),jdecode(''),'/27405.html','true',[],'',''],
	['PAGE','73484',jdecode('THS+T-Shirts'),jdecode(''),'/73484.html','true',[],'',''],
	['PAGE','69084',jdecode('THS+Success'),jdecode(''),'/69084.html','true',[],'',''],
	['PAGE','1641',jdecode('Local+ranges+'),jdecode(''),'/1641.html','true',[],'',''],
	['PAGE','1662',jdecode('Up+coming+events%21'),jdecode(''),'/1662.html','true',[],'',''],
	['PAGE','7801',jdecode('THS+News'),jdecode(''),'/7801.html','true',[],'',''],
	['PAGE','1578',jdecode('Contact+Us'),jdecode(''),'/1578.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Kalkutta';
theSitetree.paletteFamily='83A763';
theSitetree.keyvisualId='6205';
theSitetree.keyvisualName='kv_6205.jpg';
theSitetree.fontsetId='11141';
theSitetree.graphicsetId='11946';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='ADC895';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Kalkutta',
				paletteFamily: 	'83A763',
				keyvisualId: 	'6205',
				keyvisualName: 	'kv_6205.jpg',
				fontsetId: 		'11141',
				graphicsetId: 	'11946',
				contentColor: 	'000000',
				contentBGColor: 'ADC895',
				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:  '1401',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1401',
internalId:  '',
customField: '20100612-092917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1494',
internalId:  '',
customField: '20100603-121944'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1452',
internalId:  '',
customField: '20100430-100047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1578',
internalId:  '',
customField: '20100331-132456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51684',
internalId:  '',
customField: '20100331-141545'
};
webappMappings['1501']=webappMappings['1501-7078687']={
webappId:    '1501',
documentId:  '1401',
internalId:  '7078687',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47984',
internalId:  '',
customField: '20100508-182415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27405',
internalId:  '',
customField: '20100527-150153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27384',
internalId:  '',
customField: '20100703-141517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61084',
internalId:  '',
customField: '20100627-150839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1641',
internalId:  '',
customField: '20100430-100219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1662',
internalId:  '',
customField: '20100710-130816'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63384',
internalId:  '',
customField: '20100527-135050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60184',
internalId:  '',
customField: '20100612-105408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52284',
internalId:  '',
customField: '20100504-172703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7801',
internalId:  '',
customField: '20100324-174922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8501',
internalId:  '',
customField: '20100418-120604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '69084',
internalId:  '',
customField: '20100527-150418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73484',
internalId:  '',
customField: '20100527-150233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77884',
internalId:  '',
customField: '20100703-135327'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN2809';
var companyName   = 'THS+Sporting+Center';
var htmlTitle	  = 'THS+Sporting+Center+-+The+One+Stop+Shop+For+All+Your+Needs+On+The+Range+And+In+The+Woods';
var metaKeywords  = 'The+Hock+Shop%2C+Guns%2C+Bows%2C+Archey%2C+THS%2C+port+huron%2C+Arrows%2C+concealed+handgun%2C+knifes%2C+pawn%2C+loans%2C+St+Clair+County%2C+Gun+Store%2C+Reloading%2C+Hunting%2C+Jewlery';
var metaContents  = 'THS+Sporting+Center+is+a+highly+professional+archery+and+firearms+pro-shop+with+top+of+the+line%2C+knowlegable+emplyees.+The+additional+sales+floor+of+lightly+used+jelwery%2C+electronics%2C+tools%2C+and+more+give+shoppers+a+one+stop+shop+for+a+plethora+of+great+items+at+a+great+price.+';
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();
};
