/* [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','43',jdecode('Home'),jdecode(''),'/43.html','true',[],'',''],
	['PAGE','64',jdecode('Head+Coach+Gary+Valentine'),jdecode(''),'/64.html','true',[],'',''],
	['PAGE','73',jdecode('About+us'),jdecode(''),'/73/index.html','true',[ 
		['PAGE','82',jdecode('Team+Connecticut+Lifters'),jdecode(''),'/73/82.html','true',[],'','']
	],'',''],
	['PAGE','64380',jdecode('2010+CT+Open+Final+Results'),jdecode(''),'/64380.html','true',[],'',''],
	['PAGE','88024',jdecode('2010+CT+Open+Lifts%2C+page+1.'),jdecode(''),'/88024.html','true',[],'',''],
	['PAGE','88557',jdecode('2010+CT+Open+Lifts+page+2.'),jdecode(''),'/88557.html','true',[],'',''],
	['PAGE','89124',jdecode('2010+CT+Open+Lifts+page+3.'),jdecode(''),'/89124.html','true',[],'',''],
	['PAGE','45581',jdecode('Valentine+Strength%2C+LLC.'),jdecode(''),'/45581.html','true',[],'',''],
	['PAGE','65480',jdecode('Gary+V++Bodybuliding++1977%21'),jdecode(''),'/65480.html','true',[],'',''],
	['PAGE','52892',jdecode('2010+SHU+Open+-+lifts+here%21'),jdecode(''),'/52892.html','true',[],'',''],
	['PAGE','634',jdecode('Products'),jdecode(''),'/634/index.html','true',[ 
		['PAGE','643',jdecode('First+Product'),jdecode(''),'/634/643.html','true',[],'',''],
		['PAGE','652',jdecode('Second+Product'),jdecode(''),'/634/652.html','true',[],'',''],
		['PAGE','661',jdecode('Third+Product'),jdecode(''),'/634/661.html','true',[],'','']
	],'',''],
	['PAGE','670',jdecode('Offers'),jdecode(''),'/670.html','true',[],'',''],
	['PAGE','42981',jdecode('Interesting+links'),jdecode(''),'/42981.html','true',[],'',''],
	['PAGE','91',jdecode('Contact'),jdecode(''),'/91.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Capri';
theSitetree.paletteFamily='737272';
theSitetree.keyvisualId='7225';
theSitetree.keyvisualName='kv_7225.jpg';
theSitetree.fontsetId='16412';
theSitetree.graphicsetId='12138';
theSitetree.contentColor='2E2D2D';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Capri',
				paletteFamily: 	'737272',
				keyvisualId: 	'7225',
				keyvisualName: 	'kv_7225.jpg',
				fontsetId: 		'16412',
				graphicsetId: 	'12138',
				contentColor: 	'2E2D2D',
				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['7060']=webappMappings['7060-e20ab41684f8eb56e0d224077342d537']={
webappId:    '7060',
documentId:  '88557',
internalId:  'e20ab41684f8eb56e0d224077342d537',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '43',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42981',
internalId:  '',
customField: '20090914-201014'
};
webappMappings['7060']=webappMappings['7060-5748d5c3e164a887e4e31d9297d573f8']={
webappId:    '7060',
documentId:  '89124',
internalId:  '5748d5c3e164a887e4e31d9297d573f8',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43',
internalId:  '',
customField: '20100802-170102'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64',
internalId:  '',
customField: '20091026-182141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73',
internalId:  '',
customField: '20080223-014840'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '82',
internalId:  '',
customField: '20100803-102947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '91',
internalId:  '',
customField: '20090828-224137'
};
webappMappings['7060']=webappMappings['7060-94b65363bf414797b2401c6226aa3086']={
webappId:    '7060',
documentId:  '88024',
internalId:  '94b65363bf414797b2401c6226aa3086',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '634',
internalId:  '',
customField: '20080222-023430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '643',
internalId:  '',
customField: '20080222-023430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '652',
internalId:  '',
customField: '20080222-023430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '661',
internalId:  '',
customField: '20080222-023430'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '670',
internalId:  '',
customField: '20100423-155852'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89124',
internalId:  '',
customField: '20100803-122009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88557',
internalId:  '',
customField: '20100803-114548'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88024',
internalId:  '',
customField: '20100803-110449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45581',
internalId:  '',
customField: '20100310-145619'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52892',
internalId:  '',
customField: '20100619-210226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64380',
internalId:  '',
customField: '20100803-101252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '65480',
internalId:  '',
customField: '20100627-110141'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXVCM';
var companyName   = 'Team+Connecticut+Olympic+Weightlifting+Club';
var htmlTitle	  = '';
var metaKeywords  = 'Gary+Valentine%2C+Snatch%2C+Clean+and+jerk%2C+Coach%2C+Olympic+Weightlifting%2C+Club%2C+Connecticut%2C+Instruction%2C+Coaching%2C+power+clean';
var metaContents  = 'Olympic+Weightlifting%2C+Club%2C+Connecticut%2C+Instruction%2C+Coaching%2C+Personal+training%2C+Sport+performance%2C+';
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();
};
