/* [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','13',jdecode('Home'),jdecode(''), jdecode('%2F13.html'), 'true',[],'',''],
	['PAGE','1041',jdecode('Company+Activities'),jdecode(''), jdecode('%2F1041%2Findex.html'), 'true',[ 
		['PAGE','149834',jdecode('Calendar+of+Events'),jdecode(''), jdecode('%2F1041%2F149834.html'), 'true',[],'',''],
		['PAGE','149434',jdecode('Classes'),jdecode(''), jdecode('%2F1041%2F149434.html'), 'true',[],'',''],
		['PAGE','155734',jdecode('Workshops'),jdecode(''), jdecode('%2F1041%2F155734.html'), 'true',[],'',''],
		['PAGE','149855',jdecode('La+Pe%C3%B1a+de+Pampa+Cort%C3%A9s'),jdecode(''), jdecode('%2F1041%2F149855.html'), 'true',[],'',''],
		['PAGE','149876',jdecode('In+the+Community'),jdecode(''), jdecode('%2F1041%2F149876.html'), 'true',[],'',''],
		['PAGE','150534',jdecode('Our+Professional+Shows'),jdecode(''), jdecode('%2F1041%2F150534.html'), 'true',[],'',''],
		['PAGE','149634',jdecode('Community+Shows'),jdecode(''), jdecode('%2F1041%2F149634.html'), 'false',[],'','']
	],'',''],
	['PAGE','153334',jdecode('The+Art+of+Tango%2C+Jan+8'),jdecode(''), jdecode('%2F153334.html'), 'false',[],'',''],
	['PAGE','153355',jdecode('Our+Feet+Speak'),jdecode(''), jdecode('%2F153355.html'), 'true',[],'',''],
	['PAGE','55243',jdecode('Contests+%26+Discounts'),jdecode(''), jdecode('%2F55243.html'), 'true',[],'',''],
	['PAGE','40401',jdecode('Tango+Store'),jdecode(''), jdecode('%2F40401.html'), 'true',[],'',''],
	['PAGE','105201',jdecode('T%26M+Ebulletins'),jdecode(''), jdecode('%2F105201.html'), 'true',[],'',''],
	['PAGE','9201',jdecode('Links'),jdecode(''), jdecode('%2F9201.html'), 'true',[],'',''],
	['PAGE','34',jdecode('About+us'),jdecode(''), jdecode('%2F34%2Findex.html'), 'true',[ 
		['PAGE','32101',jdecode('About+Pampa+Cort%C3%A9s'),jdecode(''), jdecode('%2F34%2F32101.html'), 'true',[],'',''],
		['PAGE','103601',jdecode('About+Gigi+Jensen'),jdecode(''), jdecode('%2F34%2F103601.html'), 'true',[],'','']
	],'',''],
	['PAGE','20201',jdecode('Contact+Us'),jdecode(''), jdecode('%2F20201.html'), 'true',[],'',''],
	['PAGE','148834',jdecode('Breaking+News'),jdecode(''), jdecode('%2F148834.html'), 'false',[],'',''],
	['PAGE','15501',jdecode('T%26M+Blog'),jdecode(''), jdecode('%2F15501.html'), 'false',[],'',''],
	['PAGE','93701',jdecode('Memorial+Day+Festival'),jdecode(''), jdecode('%2F93701.html'), 'false',[],'',''],
	['PAGE','145734',jdecode('Oct+22+Anniversary'),jdecode(''), jdecode('%2F145734.html'), 'false',[],'','']];
var siteelementCount=23;
theSitetree.topTemplateName='Grace';
theSitetree.paletteFamily='80B3EC';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='32048';
theSitetree.graphicsetId='13871';
theSitetree.contentColor='5484ba';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp19-dulles',
  product: 'WSCSYSSSSLYTCPI5'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Grace',
				paletteFamily: 	'80B3EC',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'32048',
				graphicsetId: 	'13871',
				contentColor: 	'5484ba',
				contentBGColor: 'FFFFFF',
				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['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '13',
internalId:  '1006',
customField: '1006'
};
webappMappings['7050']=webappMappings['7050-501']={
webappId:    '7050',
documentId:  '15501',
internalId:  '501',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-2362']={
webappId:    '7008',
documentId:  '20201',
internalId:  '2362',
customField: 'language:en;country:US;'
};
webappMappings['4001']=webappMappings['4001-12047533']={
webappId:    '4001',
documentId:  '40401',
internalId:  '12047533',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103601',
internalId:  '',
customField: '20110301-233027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13',
internalId:  '',
customField: '20120115-202007'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '150534',
internalId:  '',
customField: '20111229-014647'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34',
internalId:  '',
customField: '20110830-103957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32101',
internalId:  '',
customField: '20110830-104043'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20201',
internalId:  '',
customField: '20110925-001847'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1041',
internalId:  '',
customField: '20100628-194252'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149855',
internalId:  '',
customField: '20120113-144336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149876',
internalId:  '',
customField: '20111003-123904'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149834',
internalId:  '',
customField: '20111230-214941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93701',
internalId:  '',
customField: '20100628-192406'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20110302-001537'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20090102-202741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '148834',
internalId:  '',
customField: '20111229-003758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105201',
internalId:  '',
customField: '20111003-120203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40401',
internalId:  '',
customField: '20081016-191103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '155734',
internalId:  '',
customField: '20120113-143900'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55243',
internalId:  '',
customField: '20111229-003613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149434',
internalId:  '',
customField: '20120115-202736'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '149634',
internalId:  '',
customField: '20111003-123104'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '145734',
internalId:  '',
customField: '20111013-021827'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153334',
internalId:  '',
customField: '20111229-014341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '153355',
internalId:  '',
customField: '20120115-202358'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10IN2DBD';
var companyName   = 'Sharing+Argentine+Dance+%26+Culture';
var htmlTitle	  = 'tango+argentina+folkloric+pampa';
var metaKeywords  = '';
var metaContents  = '';
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();
};

