/* [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(''),'/13.html','true',[],'',''],
	['PAGE','34',jdecode('About+us'),jdecode(''),'/34/index.html','true',[ 
		['PAGE','32101',jdecode('About+Pampa+Cort%C3%A9s'),jdecode(''),'/34/32101.html','true',[],'',''],
		['PAGE','55201',jdecode('Pampa%26%23x27%3Bs+Schedule'),jdecode(''),'/34/55201.html','true',[],'','']
	],'',''],
	['PAGE','93701',jdecode('Memorial+Day+Festival'),jdecode(''),'/93701.html','true',[],'',''],
	['PAGE','40401',jdecode('Tango+Store'),jdecode(''),'/40401.html','true',[],'',''],
	['PAGE','1041',jdecode('Company+Activities'),jdecode(''),'/1041/index.html','true',[ 
		['PAGE','1068',jdecode('Calendar+of+Events'),jdecode(''),'/1041/1068.html','true',[],'',''],
		['PAGE','1059',jdecode('Classes'),jdecode(''),'/1041/1059.html','true',[],'',''],
		['PAGE','1173',jdecode('In+the+Community'),jdecode(''),'/1041/1173.html','true',[],'',''],
		['PAGE','55243',jdecode('Contests+%26+Discounts'),jdecode(''),'/1041/55243.html','true',[],'',''],
		['PAGE','48401',jdecode('Free+Performances'),jdecode(''),'/1041/48401.html','true',[],'',''],
		['PAGE','1050',jdecode('About+our+Shows'),jdecode(''),'/1041/1050.html','true',[],'','']
	],'',''],
	['PAGE','64701',jdecode('Tango+Travels'),jdecode(''),'/64701.html','true',[],'',''],
	['PAGE','15501',jdecode('T%26M+Blog'),jdecode(''),'/15501.html','true',[],'',''],
	['PAGE','20201',jdecode('Contact+Us'),jdecode(''),'/20201.html','true',[],'',''],
	['PAGE','9201',jdecode('Links'),jdecode(''),'/9201.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Galerie';
theSitetree.paletteFamily='336699';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='73';
theSitetree.graphicsetId='94';
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: 			'Galerie',
				paletteFamily: 	'336699',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'73',
				graphicsetId: 	'94',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'336699',
				b_color: 		'D8F8F8',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				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:  '13',
internalId:  '',
customField: '20100208-191141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1068',
internalId:  '',
customField: '20100219-030112'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1059',
internalId:  '',
customField: '20100219-030358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34',
internalId:  '',
customField: '20091028-161341'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32101',
internalId:  '',
customField: '20080929-180203'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20201',
internalId:  '',
customField: '20080624-185338'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1041',
internalId:  '',
customField: '20081120-191213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1050',
internalId:  '',
customField: '20081009-225829'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48401',
internalId:  '',
customField: '20100208-203402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1173',
internalId:  '',
customField: '20090816-233550'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93701',
internalId:  '',
customField: '20100208-185730'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20081008-113300'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15501',
internalId:  '',
customField: '20090102-202741'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40401',
internalId:  '',
customField: '20081016-191103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64701',
internalId:  '',
customField: '20090817-003500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55243',
internalId:  '',
customField: '20090605-130705'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55201',
internalId:  '',
customField: '20091201-213853'
};
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();
};
