/* [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','5301',jdecode('Home'),jdecode(''),'/5301.html','true',[],'',''],
	['PAGE','5801',jdecode('Eagle+Series'),jdecode(''),'/5801/index.html','true',[ 
		['PAGE','10801',jdecode('Compound'),jdecode(''),'/5801/10801.html','false',[],'',''],
		['PAGE','22301',jdecode('Recurve'),jdecode(''),'/5801/22301.html','false',[],'','']
	],'',''],
	['PAGE','22343',jdecode('Falcon+Series'),jdecode(''),'/22343/index.html','true',[ 
		['PAGE','10822',jdecode('Compound'),jdecode(''),'/22343/10822.html','false',[],'',''],
		['PAGE','10864',jdecode('Recurve'),jdecode(''),'/22343/10864.html','false',[],'',''],
		['PAGE','10843',jdecode('Dyna+97+Standard'),jdecode(''),'/22343/10843.html','false',[],'','']
	],'',''],
	['PAGE','5394',jdecode('We+Shoot+For+Boobies'),jdecode(''),'/5394.html','true',[],'',''],
	['PAGE','5499',jdecode('About+us'),jdecode(''),'/5499/index.html','true',[ 
		['PAGE','5520',jdecode('Our+team'),jdecode(''),'/5499/5520.html','true',[],'',''],
		['PAGE','5541',jdecode('How+to+find+us'),jdecode(''),'/5499/5541.html','true',[],'',''],
		['PAGE','5478',jdecode('Contact'),jdecode(''),'/5499/5478.html','true',[],'','']
	],'',''],
	['PAGE','5415',jdecode('Shooting+Staff'),jdecode(''),'/5415/index.html','true',[ 
		['PAGE','10948',jdecode('Gold+Level'),jdecode(''),'/5415/10948.html','true',[],'',''],
		['PAGE','10969',jdecode('Silver+Level'),jdecode(''),'/5415/10969.html','true',[],'',''],
		['PAGE','10990',jdecode('Bronze+Level'),jdecode(''),'/5415/10990.html','true',[],'','']
	],'',''],
	['PAGE','26101',jdecode('Dealers+Page'),jdecode(''),'/26101.html','true',[],'',''],
	['PAGE','5457',jdecode('FAQs'),jdecode(''),'/5457.html','true',[],'',''],
	['PAGE','26922',jdecode('2010+Catalogue'),jdecode(''),'/26922/index.html','true',[ 
		['PAGE','29801',jdecode('Page+2-+Warrenty'),jdecode(''),'/26922/29801.html','true',[],'',''],
		['PAGE','29822',jdecode('Page+3-+BCA'),jdecode(''),'/26922/29822.html','true',[],'',''],
		['PAGE','29843',jdecode('Page+4-+Eagle'),jdecode(''),'/26922/29843.html','true',[],'',''],
		['PAGE','29864',jdecode('Page+5-+Falcon'),jdecode(''),'/26922/29864.html','true',[],'',''],
		['PAGE','30601',jdecode('Page+6-+Cloths%2FHats'),jdecode(''),'/26922/30601.html','true',[],'',''],
		['PAGE','30622',jdecode('Page+7-+Thank+the+Troops'),jdecode(''),'/26922/30622.html','true',[],'',''],
		['PAGE','29885',jdecode('Rear+Cover'),jdecode(''),'/26922/29885.html','true',[],'','']
	],'','']];
var siteelementCount=27;
theSitetree.topTemplateName='Cable';
theSitetree.paletteFamily='D30303';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10575';
theSitetree.graphicsetId='10527';
theSitetree.contentColor='00FF00';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Cable',
				paletteFamily: 	'D30303',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10575',
				graphicsetId: 	'10527',
				contentColor: 	'00FF00',
				contentBGColor: '000000',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5301',
internalId:  '',
customField: '20101229-110434'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5499',
internalId:  '',
customField: '20101229-105213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5520',
internalId:  '',
customField: '20101229-105508'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5541',
internalId:  '',
customField: '20090819-135358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5478',
internalId:  '',
customField: '20101229-105756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29843',
internalId:  '',
customField: '20100616-120002'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5801',
internalId:  '',
customField: '20101229-110448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10864',
internalId:  '',
customField: '20101229-104642'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5801',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10822',
internalId:  '',
customField: '20100616-104243'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29822',
internalId:  '',
customField: '20100616-115744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29801',
internalId:  '',
customField: '20100616-115642'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5394',
internalId:  '',
customField: '20101229-105141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5415',
internalId:  '',
customField: '20101229-105925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10801',
internalId:  '',
customField: '20101229-104442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5457',
internalId:  '',
customField: '20101229-110409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10843',
internalId:  '',
customField: '20100616-105529'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '5301',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US::;language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22301',
internalId:  '',
customField: '20100616-102821'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10948',
internalId:  '',
customField: '20101229-105955'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10969',
internalId:  '',
customField: '20100616-110059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10990',
internalId:  '',
customField: '20101229-110047'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22343',
internalId:  '',
customField: '20091226-100126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26101',
internalId:  '',
customField: '20101229-110310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29864',
internalId:  '',
customField: '20100616-120111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26922',
internalId:  '',
customField: '20100616-115052'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29885',
internalId:  '',
customField: '20100616-120242'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30622',
internalId:  '',
customField: '20100616-120935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30601',
internalId:  '',
customField: '20100616-121319'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '5801',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US::;language:en;country:US;'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INLOZZ';
var companyName   = 'Scott%27s+Strings';
var htmlTitle	  = 'Scott%27s+Strings';
var metaKeywords  = 'Compound%2CBow%2CString%2CArrow%2Ccolor%2Cboobies%2Cbreast%2Ccancer%2Ccustom%2Crecurve%2Clongbow%2Cflemish%2Ctwist%2C452X%2C8125%2Cbcy%2CDacron%2Cmaterial%2CAmericas%2Cbest%2Cwinners%2Cchoice%2Czebra%2Ceagle%2Cfalcon%2Ccompound%2C';
var metaContents  = 'Scotts+Strings+Custom+made+Drawstrings';
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();
};

