/* [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','54201',jdecode('New+Jigs+2012'),jdecode(''), jdecode('%2F54201.html'), 'true',[],'',''],
	['ITEM','63801',jdecode('Shopping+Cart'),jdecode(''), jdecode('http%3A%2F%2Fwww.fishinglunatics.com%2Fcatalog'), 'true',[],'','_blank'],
	['PAGE','61801',jdecode('Bite+Me+Video+Clips'),jdecode(''), jdecode('%2F61801.html'), 'true',[],'',''],
	['PAGE','61501',jdecode('GO+Fish+Mag+Articles'),jdecode(''), jdecode('%2F61501.html'), 'false',[],'',''],
	['PAGE','3001',jdecode('Home'),jdecode(''), jdecode('%2F3001.html'), 'true',[],'',''],
	['PAGE','57901',jdecode('Bite+Me+Retailers+'),jdecode(''), jdecode('%2F57901.html'), 'true',[],'',''],
	['PAGE','52301',jdecode('Sponsorship'),jdecode(''), jdecode('%2F52301.html'), 'true',[],'',''],
	['PAGE','3052',jdecode('About+us'),jdecode(''), jdecode('%2F3052.html'), 'true',[],'',''],
	['PAGE','52601',jdecode('Pro+Team'),jdecode(''), jdecode('%2F52601.html'), 'true',[],'',''],
	['PAGE','26401',jdecode('18g+Sprat+Spoon'),jdecode(''), jdecode('%2F26401.html'), 'true',[],'',''],
	['PAGE','53701',jdecode('28g+Pilchard+Spoon'),jdecode(''), jdecode('%2F53701.html'), 'false',[],'',''],
	['PAGE','26301',jdecode('35g+Herring+Spoon'),jdecode(''), jdecode('%2F26301.html'), 'true',[],'',''],
	['PAGE','26422',jdecode('100g+Herring+Spoon'),jdecode(''), jdecode('%2F26422.html'), 'true',[],'',''],
	['PAGE','54252',jdecode('70g+Spike+Jig'),jdecode(''), jdecode('%2F54252.html'), 'false',[],'',''],
	['PAGE','26443',jdecode('110g+Sprat+Jig'),jdecode(''), jdecode('%2F26443.html'), 'true',[],'',''],
	['PAGE','54273',jdecode('140g+Spike+Jig'),jdecode(''), jdecode('%2F54273.html'), 'false',[],'',''],
	['PAGE','54294',jdecode('150g+Flutter+Jig'),jdecode(''), jdecode('%2F54294.html'), 'false',[],'',''],
	['PAGE','26464',jdecode('160g+Butterfly+Jig'),jdecode(''), jdecode('%2F26464.html'), 'true',[],'',''],
	['PAGE','26485',jdecode('180g+Herring+Jig'),jdecode(''), jdecode('%2F26485.html'), 'true',[],'',''],
	['PAGE','54315',jdecode('190g+Torpedo+Jig'),jdecode(''), jdecode('%2F54315.html'), 'false',[],'',''],
	['PAGE','26506',jdecode('200g+Garfish+Jig'),jdecode(''), jdecode('%2F26506.html'), 'true',[],'',''],
	['PAGE','26527',jdecode('350g+Jobfish+Jig'),jdecode(''), jdecode('%2F26527.html'), 'true',[],'',''],
	['PAGE','26548',jdecode('400g+Silky+Jig'),jdecode(''), jdecode('%2F26548.html'), 'true',[],'',''],
	['PAGE','26569',jdecode('100g+Octopus+Jig'),jdecode(''), jdecode('%2F26569.html'), 'true',[],'',''],
	['PAGE','26590',jdecode('200g+Squid+Jig'),jdecode(''), jdecode('%2F26590.html'), 'true',[],'',''],
	['PAGE','35401',jdecode('Fishing+Tanzania'),jdecode(''), jdecode('%2F35401.html'), 'true',[],'',''],
	['PAGE','10201',jdecode('Gallery'),jdecode(''), jdecode('%2F10201.html'), 'true',[],'',''],
	['PAGE','3094',jdecode('Contact'),jdecode(''), jdecode('%2F3094.html'), 'true',[],'',''],
	['PAGE','49901',jdecode('Google+Code'),jdecode(''), jdecode('%2F49901.html'), 'false',[],'','']];
var siteelementCount=29;
theSitetree.topTemplateName='Common';
theSitetree.paletteFamily='D40202';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='26636';
theSitetree.graphicsetId='13449';
theSitetree.contentColor='D40202';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hetzner',
  product: 'WSCSYSSSSLY0XKDS'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Common',
				paletteFamily: 	'D40202',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'26636',
				graphicsetId: 	'13449',
				contentColor: 	'D40202',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3001',
internalId:  '',
customField: '20090716-084841'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3052',
internalId:  '',
customField: '20090204-215923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26401',
internalId:  '',
customField: '20100826-192237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10201',
internalId:  '',
customField: '20090204-002835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26422',
internalId:  '',
customField: '20090201-231212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26301',
internalId:  '',
customField: '20090218-225528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26443',
internalId:  '',
customField: '20090201-231814'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26464',
internalId:  '',
customField: '20100827-004958'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26485',
internalId:  '',
customField: '20090201-232149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26506',
internalId:  '',
customField: '20090305-141833'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26527',
internalId:  '',
customField: '20090211-112130'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26548',
internalId:  '',
customField: '20090201-232542'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26569',
internalId:  '',
customField: '20090211-114645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '26590',
internalId:  '',
customField: '20090211-114801'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '54201',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-9f61b51effdaf69d7977b856e42a847f']={
webappId:    '7060',
documentId:  '10201',
internalId:  '9f61b51effdaf69d7977b856e42a847f',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3094',
internalId:  '',
customField: '20090202-235433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35401',
internalId:  '',
customField: '20100405-230310'
};
webappMappings['7060']=webappMappings['7060-9b5f177d6a0f49184152008bbeaada02']={
webappId:    '7060',
documentId:  '35401',
internalId:  '9b5f177d6a0f49184152008bbeaada02',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '49901',
internalId:  '',
customField: '20090224-084917'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52301',
internalId:  '',
customField: '20090716-084036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52601',
internalId:  '',
customField: '20090716-083907'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53701',
internalId:  '',
customField: '20100411-172403'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54201',
internalId:  '',
customField: '20111010-214233'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54252',
internalId:  '',
customField: '20100411-164653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54273',
internalId:  '',
customField: '20100411-164653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54294',
internalId:  '',
customField: '20100411-164653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54315',
internalId:  '',
customField: '20100411-164653'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '57901',
internalId:  '',
customField: '20120111-234000'
};
webappMappings['7060']=webappMappings['7060-2f2b2ece5b7ce8f13e0289387e83f322']={
webappId:    '7060',
documentId:  '61501',
internalId:  '2f2b2ece5b7ce8f13e0289387e83f322',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61501',
internalId:  '',
customField: '20100711-133624'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61801',
internalId:  '',
customField: '20111010-221646'
};
var webAppHostname = 'sitebuilder.host-h.net:80';
var canonHostname = 'sitebuilder1.jnb2.host-h.net';
var accountId     = 'AHTZ10INXH61';
var companyName   = 'Fishing+Lunatics';
var htmlTitle	  = 'Vertical+Jigging';
var metaKeywords  = 'Vertical+Jigging%2C+Fishing+Lunatics%2C+Saltwater+jigging%2C+jigging%2C+jigs%2C+Bite+Me';
var metaContents  = 'Vertical+Jigging+Specialists';
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();
};

