/* [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','1336',jdecode('In+Memory'),jdecode(''),'/1336.html','true',[],'',''],
	['PAGE','1201',jdecode('Home'),jdecode(''),'/1201.html','true',[],'',''],
	['PAGE','1252',jdecode('First+Time+Visitors'),jdecode(''),'/1252.html','true',[],'',''],
	['PAGE','1294',jdecode('Performace+Pulse'),jdecode(''),'/1294.html','true',[],'',''],
	['PAGE','23901',jdecode('Fact+or+Myth'),jdecode(''),'/23901.html','true',[],'',''],
	['PAGE','17101',jdecode('New+and+%26%23x27%3BNote%26%23x27%3B++Worthy'),jdecode(''),'/17101.html','true',[],'',''],
	['PAGE','1357',jdecode('Recommended+Reading'),jdecode(''),'/1357.html','true',[],'',''],
	['PAGE','17143',jdecode('Forum'),jdecode(''),'/17143.html','false',[],'',''],
	['PAGE','23922',jdecode('Help+Us+Help+You'),jdecode(''),'/23922.html','true',[],'',''],
	['PAGE','1315',jdecode('Who+We+Are'),jdecode(''),'/1315.html','true',[],'',''],
	['PAGE','1462',jdecode('Links'),jdecode(''),'/1462.html','true',[],'',''],
	['PAGE','64301',jdecode('Shop+Amazon.com'),jdecode(''),'/64301.html','true',[],'',''],
	['PAGE','1483',jdecode('Get+In+Touch+With+Us'),jdecode(''),'/1483/index.html','true',[ 
		['PAGE','27301',jdecode('Contact+Us+%28follow+up+page%29'),jdecode(''),'/1483/27301.html','false',[],'','']
	],'',''],
	['PAGE','17506',jdecode('Guestbook'),jdecode(''),'/17506/index.html','true',[ 
		['PAGE','17501',jdecode('Read+Guestbook'),jdecode(''),'/17506/17501.html','false',[],'','']
	],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Card';
theSitetree.paletteFamily='330099';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='427';
theSitetree.graphicsetId='475';
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: 			'Card',
				paletteFamily: 	'330099',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'427',
				graphicsetId: 	'475',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1002']=webappMappings['1002-17506aen010inl2y2']={
webappId:    '1002',
documentId:  '17506',
internalId:  '17506aen010inl2y2',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1201',
internalId:  '',
customField: '20091226-215613'
};
webappMappings['1003']=webappMappings['1003-aen010inl2y211bb3940ea6']={
webappId:    '1003',
documentId:  '17143',
internalId:  'aen010inl2y211bb3940ea6',
customField: 'en:US:'
};
webappMappings['7005']=webappMappings['7005-33']={
webappId:    '7005',
documentId:  '23922',
internalId:  '33',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '64301',
internalId:  '',
customField: '20091227-122745'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1252',
internalId:  '',
customField: '20091226-154556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1294',
internalId:  '',
customField: '20090613-224634'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23901',
internalId:  '',
customField: '20091008-212844'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1336',
internalId:  '',
customField: '20091008-210604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17101',
internalId:  '',
customField: '20091008-213527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1357',
internalId:  '',
customField: '20091226-134544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17143',
internalId:  '',
customField: '20080919-113707'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1462',
internalId:  '',
customField: '20091008-213115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23922',
internalId:  '',
customField: '20080919-114013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1315',
internalId:  '',
customField: '20090227-223544'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1483',
internalId:  '',
customField: '20090216-213703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27301',
internalId:  '',
customField: '20080903-002017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17506',
internalId:  '',
customField: '20080811-140221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20080811-140221'
};
webappMappings['7008']=webappMappings['7008-1534']={
webappId:    '7008',
documentId:  '1483',
internalId:  '1534',
customField: 'language:en;country:US;'
};
var canonHostname = 'wscwrk02.ehost-services.com';
var accountId     = 'AEN010INL2Y2';
var companyName   = 'The+International+Foundation+for+Performing+Arts+Medicine';
var htmlTitle	  = 'The+International+Foundation+for+Performing+Arts+Medicine';
var metaKeywords  = 'Repetitive+strain+injury%2C+tendon+injury%2C+performing+arts+medicine%2C+tendinitis%2C+vocal+cord+strain%2C+dancer%2C+strain%2C+muscle+injury%2C+music%2C+musician+injury%2C+therapy%2C+singers%2C+voice%2C+actor%2C+actress%2C+acting%2C+sound+engineers%2C+lighting+engineers%2C+repetitive+strain%2C+dance+injury%2C+musicians%2C+stage+performers%2C+health%2C+doctor%2C+international%2C+therapist%2C+clinic%2C+back+pain%2C+guitar%2C+special+effect+smoke%2C+fracture%2C+fatigue%2C+touring%2C+stage+safety';
var metaContents  = 'The+International+Foundation+for+Performing+Arts+Medicine%2C+is+a+non-profit+organization+created+to+help+individuals+engaged+in+any+aspect+of+the+performing+arts.++The+organization+is+a+resource+center+and+clearinghouse+of+information+pertaining+to+the+new+medical+specialty+of+performing+arts+medicine.++It+raises+funds+for+injury+prevention+education%2C+disseminates+information+to+all+artists+and+production+professionals%2C+and+provides+general+medical+guidance.++Those+who+can+benefit+include+musicians%2C+actors%2C+dancers%2C+lighting+and+sound+engineers%2C+home+studio+users%2C+singers+and+cosume+designers+to+name+a+few.++The+Foundation+provides+injury+prevention+workshops+and+out+web+site+contains+important+health+information.++In+an+effort+to+provide+individualized+help%2C+it+consults+with+numerous+artistic+advisors+from+all+of+the+arts+disciplines.';
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();
};
