/* [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','233934',jdecode('PRODVIDA+EXAM+APRIL+9+2011'),jdecode(''), jdecode('%2F233934%2Findex.html'), 'false',[ 
		['PAGE','234634',jdecode('CHEEK+TO+CHEEK+PHOTOS'),jdecode(''), jdecode('%2F233934%2F234634.html'), 'true',[],'','']
	],'',''],
	['PAGE','125601',jdecode('LADIES+ASK+DANCE'),jdecode(''), jdecode('%2F125601.html'), 'false',[],'',''],
	['PAGE','75501',jdecode('2012+DANCE+CALENDAR'),jdecode(''), jdecode('%2F75501%2Findex.html'), 'true',[ 
		['PAGE','73701',jdecode('EVENT+LOCATIONS'),jdecode(''), jdecode('%2F75501%2F73701.html'), 'true',[],'','']
	],'',''],
	['PAGE','201',jdecode('EVENTS'),jdecode(''), jdecode('%2F201.html'), 'true',[],'',''],
	['PAGE','245345',jdecode('DANCE+FESTIVAL+SUCCESS%21'),jdecode(''), jdecode('%2F245345.html'), 'true',[],'',''],
	['PAGE','9401',jdecode('MEMBERSHIP'),jdecode(''), jdecode('%2F9401%2Findex.html'), 'true',[ 
		['PAGE','7301',jdecode('OFFICERS'),jdecode(''), jdecode('%2F9401%2F7301.html'), 'true',[],'',''],
		['PAGE','252',jdecode('OUR+MISSION'),jdecode(''), jdecode('%2F9401%2F252.html'), 'false',[],'','']
	],'',''],
	['PAGE','378',jdecode('CONTACT+US'),jdecode(''), jdecode('%2F378.html'), 'true',[],'',''],
	['PAGE','170501',jdecode('THE+LIGHTFOOT'),jdecode(''), jdecode('%2F170501.html'), 'false',[],'',''],
	['PAGE','199112',jdecode('WHY+I+DANCE'),jdecode(''), jdecode('%2F199112.html'), 'true',[],'',''],
	['PAGE','193601',jdecode('SPECIAL+EVENTS'),jdecode(''), jdecode('%2F193601.html'), 'false',[],'',''],
	['PAGE','167901',jdecode('FEBRUARY+28+SET+LIST'),jdecode(''), jdecode('%2F167901.html'), 'false',[],'',''],
	['PAGE','144901',jdecode('ABOUT+US'),jdecode(''), jdecode('%2F144901.html'), 'false',[],'',''],
	['PAGE','106301',jdecode('LESSON+SERIES'),jdecode(''), jdecode('%2F106301%2Findex.html'), 'true',[ 
		['PAGE','138101',jdecode('TANGO+CLASS+WINTER+2010'),jdecode(''), jdecode('%2F106301%2F138101.html'), 'true',[],'',''],
		['PAGE','203412',jdecode('TANGO+10+LESSON+SERIES'),jdecode(''), jdecode('%2F106301%2F203412.html'), 'true',[],'',''],
		['PAGE','208523',jdecode('LATIN+DANCE+SERIES'),jdecode(''), jdecode('%2F106301%2F208523.html'), 'true',[],'',''],
		['PAGE','160901',jdecode('SWING'),jdecode(''), jdecode('%2F106301%2F160901.html'), 'true',[],'',''],
		['PAGE','116301',jdecode('FOXTROT'),jdecode(''), jdecode('%2F106301%2F116301.html'), 'true',[],'',''],
		['PAGE','114722',jdecode('ADVANCED+TEXAS+TWO+STEP'),jdecode(''), jdecode('%2F106301%2F114722.html'), 'true',[],'',''],
		['PAGE','114701',jdecode('RUMBA'),jdecode(''), jdecode('%2F106301%2F114701.html'), 'true',[],'',''],
		['PAGE','105101',jdecode('CHA+CHA'),jdecode(''), jdecode('%2F106301%2F105101.html'), 'true',[],'',''],
		['PAGE','23901',jdecode('WALTZ'),jdecode(''), jdecode('%2F106301%2F23901.html'), 'true',[],'',''],
		['PAGE','23922',jdecode('BOLERO'),jdecode(''), jdecode('%2F106301%2F23922.html'), 'true',[],'','']
	],'',''],
	['PAGE','14201',jdecode('DANCE+%26+EVENT+CALENDAR'),jdecode(''), jdecode('%2F14201.html'), 'false',[],'',''],
	['PAGE','17901',jdecode('MONTHLY+EVENTS'),jdecode(''), jdecode('%2F17901%2Findex.html'), 'false',[ 
		['PAGE','88601',jdecode('INTRODUCTORY+LESSON'),jdecode(''), jdecode('%2F17901%2F88601.html'), 'false',[],'',''],
		['PAGE','71801',jdecode('WALTZ+'),jdecode(''), jdecode('%2F17901%2F71801.html'), 'false',[],'',''],
		['PAGE','71843',jdecode('MOONLIGHT+FORMAL'),jdecode(''), jdecode('%2F17901%2F71843.html'), 'false',[],'','']
	],'',''],
	['PAGE','92001',jdecode('COMPETITIVE+DANCE'),jdecode(''), jdecode('%2F92001%2Findex.html'), 'true',[ 
		['PAGE','232934',jdecode('NDSU+BALLROOM+DANCE+CLUB'),jdecode(''), jdecode('%2F92001%2F232934.html'), 'true',[],'','']
	],'',''],
	['PAGE','52201',jdecode('OTHER+DANCES+%26+EVENTS'),jdecode(''), jdecode('%2F52201%2Findex.html'), 'true',[ 
		['PAGE','129801',jdecode('FARGO+SWINGS'),jdecode(''), jdecode('%2F52201%2F129801.html'), 'false',[],'',''],
		['PAGE','125622',jdecode('MAY+I+HAVE+THIS+DANCE'),jdecode(''), jdecode('%2F52201%2F125622.html'), 'false',[],'',''],
		['PAGE','315',jdecode('WESTERN+STYLE'),jdecode(''), jdecode('%2F52201%2F315.html'), 'false',[],'',''],
		['PAGE','357',jdecode('SINGLES+DANCES'),jdecode(''), jdecode('%2F52201%2F357.html'), 'false',[],'','']
	],'',''],
	['PAGE','10401',jdecode('JOURNAL'),jdecode(''), jdecode('%2F10401.html'), 'false',[],'',''],
	['PAGE','185001',jdecode('INSTRUCTION+%26+MUSIC+VIDEO'),jdecode(''), jdecode('%2F185001.html'), 'true',[],'','']];
var siteelementCount=41;
theSitetree.topTemplateName='Office';
theSitetree.paletteFamily='727D9C';
theSitetree.keyvisualId='11165';
theSitetree.keyvisualName='kv_11165.jpg';
theSitetree.fontsetId='32065';
theSitetree.graphicsetId='13879';
theSitetree.contentColor='4e5978';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'endurance',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Office',
				paletteFamily: 	'727D9C',
				keyvisualId: 	'11165',
				keyvisualName: 	'kv_11165.jpg',
				fontsetId: 		'32065',
				graphicsetId: 	'13879',
				contentColor: 	'4e5978',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170501',
internalId:  '',
customField: '20100906-204117'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138101',
internalId:  '',
customField: '20100422-083157'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '193601',
internalId:  '',
customField: '20091022-223257'
};
webappMappings['7050']=webappMappings['7050-43']={
webappId:    '7050',
documentId:  '10401',
internalId:  '43',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201',
internalId:  '',
customField: '20120131-221655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '252',
internalId:  '',
customField: '20081115-174414'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20120108-164603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9401',
internalId:  '',
customField: '20120108-173126'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '378',
internalId:  '',
customField: '20120108-173532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '234634',
internalId:  '',
customField: '20110410-184352'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23901',
internalId:  '',
customField: '20080412-013528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23922',
internalId:  '',
customField: '20090402-000429'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14201',
internalId:  '',
customField: '20100906-203347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17901',
internalId:  '',
customField: '20090218-231311'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '160901',
internalId:  '',
customField: '20091127-002540'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '144901',
internalId:  '',
customField: '20120105-201212'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '315',
internalId:  '',
customField: '20080307-001513'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '357',
internalId:  '',
customField: '20080307-001533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '52201',
internalId:  '',
customField: '20081206-123732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '203412',
internalId:  '',
customField: '20100307-151208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '167901',
internalId:  '',
customField: '20090218-225517'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114701',
internalId:  '',
customField: '20091127-002648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10401',
internalId:  '',
customField: '20080305-191346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '233934',
internalId:  '',
customField: '20110410-185044'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71801',
internalId:  '',
customField: '20090215-230935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '114722',
internalId:  '',
customField: '20091127-002639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71843',
internalId:  '',
customField: '20080310-211159'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73701',
internalId:  '',
customField: '20120105-203749'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75501',
internalId:  '',
customField: '20120108-171307'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88601',
internalId:  '',
customField: '20090218-231350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92001',
internalId:  '',
customField: '20081206-123144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116301',
internalId:  '',
customField: '20091127-002610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106301',
internalId:  '',
customField: '20091127-002531'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125601',
internalId:  '',
customField: '20110303-205001'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105101',
internalId:  '',
customField: '20090525-143647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '125622',
internalId:  '',
customField: '20081115-155905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '129801',
internalId:  '',
customField: '20081202-234544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '199112',
internalId:  '',
customField: '20100125-161224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '185001',
internalId:  '',
customField: '20100221-210050'
};
webappMappings['7060']=webappMappings['7060-9de203245c0741df55b65c42596e8cdb']={
webappId:    '7060',
documentId:  '138101',
internalId:  '9de203245c0741df55b65c42596e8cdb',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '232934',
internalId:  '',
customField: '20110321-231615'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '208523',
internalId:  '',
customField: '20100410-142134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '245345',
internalId:  '',
customField: '20120131-221459'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INXZ73';
var companyName   = 'USA+Dance+Chapter+%232020+Northern+Lights+Dance+Club';
var htmlTitle	  = 'Northern+Lights+Dance+Club';
var metaKeywords  = 'BALLROOM+DANCE+FARGO+NORTHERN+LIGHTS+USA+DANCE+LESSONS+WALTZ+FOXTROT+TANGO+CHA+CHA+RUMBA+DANCE+CLUB+MOORHEAD+NORTH+DAKOTA+ENTERTAINMENT+DANCING+MUSIC+FORMAL+BRONZEGOLD+SILVER+NORTHERN+LIGHTS+DANCE+CLUB+USA+DANCE+EVENTS+USABDA+';
var metaContents  = 'We+Are+the+Northern+Lights+Chapter+of+USA+Dance.++USA+Dance+was+formerly+the++United+States+Amateur+Ballroom+Dancers+Association++%28USABDA%29.++Its+mission+is+to%2C+promote+the+quantity+and+quality+of+ballroom+dance+in+the+United+States.Northern+Lights+Ballroom+Dance+Club+serves+the+communities+of+Fargo%2C+North++Dakota%2C+Moorhead%2C+Minnesota+and+the+surrounding+areas-with+members+as+far+away+as+Grand+Forks%2C+Fergus+Falls%2C+Detroit+Lakes+and+more.++Functioning+as+a+non-profit+organization%2C+Northern+Lights+Dance+Club+promotes+the+national+mission+by+offering+dance+events+and+affordable+lessons%2C+to+its+members%2C+and+the+general+public.++';
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();
};

