/* [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','4598',jdecode('Home'),jdecode(''),'/4598.html','true',[],'',''],
	['PAGE','4655',jdecode('About+us'),jdecode(''),'/4655.html','true',[],'',''],
	['PAGE','13544',jdecode('Rifle+Barrels'),jdecode(''),'/13544/index.html','true',[ 
		['PAGE','5112',jdecode('Calibres+and+Twists'),jdecode(''),'/13544/5112.html','true',[],'',''],
		['PAGE','5139',jdecode('Contours'),jdecode(''),'/13544/5139.html','true',[],'',''],
		['PAGE','4709',jdecode('Chamberings'),jdecode(''),'/13544/4709.html','true',[],'',''],
		['PAGE','9297',jdecode('Palma+Perfection'),jdecode(''),'/13544/9297.html','true',[],'','']
	],'',''],
	['PAGE','31501',jdecode('Target+Stocks'),jdecode(''),'/31501.html','true',[],'',''],
	['PAGE','4763',jdecode('Gunsmithing'),jdecode(''),'/4763.html','true',[],'',''],
	['PAGE','4790',jdecode('Actions+and+Accessories'),jdecode(''),'/4790.html','true',[],'',''],
	['PAGE','5166',jdecode('Price+List'),jdecode(''),'/5166.html','true',[],'',''],
	['PAGE','4817',jdecode('Shipping%2FDelivery'),jdecode(''),'/4817.html','true',[],'',''],
	['PAGE','11444',jdecode('2Contact+us%2FOrdering'),jdecode(''),'/11444.html','true',[],'',''],
	['PAGE','16344',jdecode('Worldwide+Agents'),jdecode(''),'/16344.html','true',[],'',''],
	['PAGE','28601',jdecode('Newcon+Optik'),jdecode(''),'/28601.html','true',[],'',''],
	['PAGE','15244',jdecode('Testimonials'),jdecode(''),'/15244.html','true',[],'',''],
	['PAGE','27982',jdecode('Project+Rifles'),jdecode(''),'/27982.html','true',[],'',''],
	['PAGE','28073',jdecode('New+Developments'),jdecode(''),'/28073.html','true',[],'',''],
	['PAGE','28186',jdecode('Links'),jdecode(''),'/28186.html','true',[],'','']];
var siteelementCount=19;
theSitetree.topTemplateName='Zoe';
theSitetree.paletteFamily='245356';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='412';
theSitetree.graphicsetId='455';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Zoe',
				paletteFamily: 	'245356',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'412',
				graphicsetId: 	'455',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'00330B',
				e_color: 		'527559',
				f_color: 		'01841D',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7060']=webappMappings['7060-243ba1906b49da8b156b0c6871725023']={
webappId:    '7060',
documentId:  '27982',
internalId:  '243ba1906b49da8b156b0c6871725023',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4598',
internalId:  '',
customField: '20100507-040245'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15244',
internalId:  '',
customField: '20090121-011253'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4655',
internalId:  '',
customField: '20080620-060512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13544',
internalId:  '',
customField: '20090608-021708'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5112',
internalId:  '',
customField: '20090609-022358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5139',
internalId:  '',
customField: '20070912-014836'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4709',
internalId:  '',
customField: '20090824-054235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9297',
internalId:  '',
customField: '20080331-034512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4763',
internalId:  '',
customField: '20071106-030639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4790',
internalId:  '',
customField: '20080729-004819'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5166',
internalId:  '',
customField: '20100507-034435'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4817',
internalId:  '',
customField: '20080618-032430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11444',
internalId:  '',
customField: '20071129-234748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16344',
internalId:  '',
customField: '20090824-053418'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27982',
internalId:  '',
customField: '20100603-062131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28073',
internalId:  '',
customField: '20100219-030811'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28186',
internalId:  '',
customField: '20100408-023042'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28601',
internalId:  '',
customField: '20100429-205235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '31501',
internalId:  '',
customField: '20100531-224322'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2GEJ';
var companyName   = 'True-Flite+Rifle+Barrels';
var htmlTitle	  = 'True-Flite+Rifle+Barrels+and+Shooting+Accessories';
var metaKeywords  = 'True-Flite+rifle+barrels+%2C+True+Flite+barrels%2C+True+Flight+barrels%2C+rifle+barrels%2C+416R+rifle+barrel+steel+%2C+chrome+moly+rifle+barrels+%2C+premium+grade+barrels+%2C+NRA+long+range+target+rifle%2C+Barnard+target+actions+%2C+accuracy+gunsmithing+service%2C++UIT+%2C+F-+Class%2C+Palma%2C+Mercedes+Benz+280CE+1982%2C++++++++++++++++++++';
var metaContents  = 'True-Flite+Ltd%2C+manufacturer+and+exporter+of+Ultra-Match+and+Premium+grade+stainless+steel+rifle+barrels.+Accuracy+gunsmithing+services.';
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();
};
