/* [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','108699',jdecode('Home'),jdecode(''), jdecode('%2F108699%2Findex.html'), 'true',[ 
		['PAGE','107899',jdecode('News_13'),jdecode(''), jdecode('%2F108699%2F107899.html'), 'true',[],'',''],
		['PAGE','105599',jdecode('News_12'),jdecode(''), jdecode('%2F108699%2F105599.html'), 'true',[],'',''],
		['PAGE','104699',jdecode('News_11'),jdecode(''), jdecode('%2F108699%2F104699.html'), 'true',[],'',''],
		['PAGE','103299',jdecode('News_10'),jdecode(''), jdecode('%2F108699%2F103299.html'), 'true',[],'',''],
		['PAGE','93799',jdecode('News_9'),jdecode(''), jdecode('%2F108699%2F93799.html'), 'true',[],'',''],
		['PAGE','92589',jdecode('News_8'),jdecode(''), jdecode('%2F108699%2F92589.html'), 'true',[],'',''],
		['PAGE','89268',jdecode('News_7'),jdecode(''), jdecode('%2F108699%2F89268.html'), 'true',[],'',''],
		['PAGE','88301',jdecode('News_6'),jdecode(''), jdecode('%2F108699%2F88301.html'), 'true',[],'',''],
		['PAGE','85901',jdecode('News_5'),jdecode(''), jdecode('%2F108699%2F85901.html'), 'true',[],'',''],
		['PAGE','84201',jdecode('News_4'),jdecode(''), jdecode('%2F108699%2F84201.html'), 'true',[],'',''],
		['PAGE','85201',jdecode('News_3'),jdecode(''), jdecode('%2F108699%2F85201.html'), 'true',[],'',''],
		['PAGE','28401',jdecode('News_2'),jdecode(''), jdecode('%2F108699%2F28401.html'), 'true',[],'',''],
		['PAGE','501',jdecode('News_1'),jdecode(''), jdecode('%2F108699%2F501.html'), 'true',[],'','']
	],'',''],
	['PAGE','35501',jdecode('Science'),jdecode(''), jdecode('%2F35501.html'), 'true',[],'',''],
	['PAGE','573',jdecode('Modalities'),jdecode(''), jdecode('%2F573%2Findex.html'), 'true',[ 
		['PAGE','552',jdecode('WCH7'),jdecode(''), jdecode('%2F573%2F552.html'), 'true',[],'',''],
		['PAGE','594',jdecode('WCH4'),jdecode(''), jdecode('%2F573%2F594.html'), 'true',[],'','']
	],'',''],
	['PAGE','5001',jdecode('History'),jdecode(''), jdecode('%2F5001.html'), 'true',[],'',''],
	['PAGE','5022',jdecode('Make+Your+Project'),jdecode(''), jdecode('%2F5022.html'), 'true',[],'',''],
	['PAGE','12001',jdecode('Pictures+Gallery'),jdecode(''), jdecode('%2F12001%2Findex.html'), 'true',[ 
		['PAGE','27501',jdecode('Panamerican+Games+2007'),jdecode(''), jdecode('%2F12001%2F27501.html'), 'true',[],'','']
	],'',''],
	['PAGE','21101',jdecode('Videos'),jdecode(''), jdecode('%2F21101.html'), 'true',[],'',''],
	['PAGE','9601',jdecode('Contact'),jdecode(''), jdecode('%2F9601.html'), 'true',[],'',''],
	['PAGE','39806',jdecode('Guestbook'),jdecode(''), jdecode('%2F39806%2Findex.html'), 'true',[ 
		['PAGE','39801',jdecode('Messages'),jdecode(''), jdecode('%2F39806%2F39801.html'), 'false',[],'','']
	],'','']];
var siteelementCount=26;
theSitetree.topTemplateName='Card';
theSitetree.paletteFamily='669900';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='427';
theSitetree.graphicsetId='481';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'pt',
  country: 'BR'
};
var prodDef={
  wl_name: 'brazilprod',
  product: 'WSCSYSSSSLY0X9A9'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Card',
				paletteFamily: 	'669900',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'427',
				graphicsetId: 	'481',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1501']={
webappId:    '1501',
documentId:  '108699',
internalId:  '1501',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-702c92d2fe72bf39a31b711fbd17c2db']={
webappId:    '7060',
documentId:  '27501',
internalId:  '702c92d2fe72bf39a31b711fbd17c2db',
customField: 'language:pt;country:BR;'
};
webappMappings['1002']=webappMappings['1002-39806avec10invhd7']={
webappId:    '1002',
documentId:  '39806',
internalId:  '39806avec10invhd7',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '108699',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28401',
internalId:  '',
customField: '20090626-094501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20080923-064844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '35501',
internalId:  '',
customField: '20080914-205534'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '573',
internalId:  '',
customField: '20080915-141038'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '552',
internalId:  '',
customField: '20100414-123737'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '594',
internalId:  '',
customField: '20100414-124335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20080917-214425'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5022',
internalId:  '',
customField: '20080915-144930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12001',
internalId:  '',
customField: '20080209-215019'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27501',
internalId:  '',
customField: '20070803-092812'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21101',
internalId:  '',
customField: '20080915-135830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20080914-210533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39806',
internalId:  '',
customField: '20080915-140210'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39801',
internalId:  '',
customField: '20080915-140748'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '105599',
internalId:  '',
customField: '20100918-113346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107899',
internalId:  '',
customField: '20110222-203608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88301',
internalId:  '',
customField: '20100120-214035'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89268',
internalId:  '',
customField: '20100223-211437'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '92589',
internalId:  '',
customField: '20100302-092613'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93799',
internalId:  '',
customField: '20100311-183742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103299',
internalId:  '',
customField: '20100414-124543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '104699',
internalId:  '',
customField: '20100419-182905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85201',
internalId:  '',
customField: '20091019-195420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '85901',
internalId:  '',
customField: '20100113-110924'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84201',
internalId:  '',
customField: '20091011-200525'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '108699',
internalId:  '',
customField: '20110726-093322'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INVHD7';
var companyName   = 'Wheel+Chair+Handball';
var htmlTitle	  = 'Wheelchair+Handball';
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();
};

