/* [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 theSitetree=[ 
	['PAGE','75',jdecode('Home'),jdecode(''),'/75.html','true',[],''],
	['PAGE','4029',jdecode('Vocalists+Package+'),jdecode(''),'/4029.html','true',[],''],
	['PAGE','1546',jdecode('Current+course+offering'),jdecode(''),'/1546/index.html','true',[ 
		['PAGE','3118',jdecode('music+theory+101'),jdecode(''),'/1546/3118.html','true',[],''],
		['PAGE','3127',jdecode('basic+to+intermediate+midi+sequencing'),jdecode(''),'/1546/3127.html','true',[],''],
		['PAGE','3668',jdecode('Writing+with+technology'),jdecode(''),'/1546/3668.html','true',[],''],
		['PAGE','3415',jdecode('Contemorary+writing+and+production'),jdecode(''),'/1546/3415.html','true',[],''],
		['PAGE','3292',jdecode('Commerical+songwritng+for+television'),jdecode(''),'/1546/3292.html','true',[],''],
		['PAGE','3550',jdecode('Hip+Hop+writng+and+production+I+'),jdecode(''),'/1546/3550.html','true',[],''],
		['PAGE','3605',jdecode('Hip+Hop+writing+and+production+II'),jdecode(''),'/1546/3605.html','true',[],'']
	],''],
	['PAGE','1480',jdecode('Features%2Finterviews'),jdecode(''),'/1480.html','true',[],''],
	['PAGE','4616',jdecode('Television+%26+Film+Music'),jdecode(''),'/4616.html','true',[],''],
	['PAGE','2092',jdecode('artist+release'),jdecode(''),'/2092.html','true',[],''],
	['PAGE','2101',jdecode('stress+management'),jdecode(''),'/2101.html','true',[],''],
	['PAGE','2381',jdecode('photos'),jdecode(''),'/2381.html','true',[],''],
	['PAGE','2278',jdecode('Bio'),jdecode(''),'/2278.html','true',[],''],
	['PAGE','2188',jdecode('Orders'),jdecode(''),'/2188.html','true',[],''],
	['PAGE','1555',jdecode('Contact'),jdecode(''),'/1555.html','true',[],'']];
var siteelementCount=18;
theSitetree.topTemplateName='Amaze';
theSitetree.paletteFamily='0A2447';
theSitetree.keyvisualId='2425';
theSitetree.keyvisualName='mp3.jpg';
theSitetree.fontsetId='396';
theSitetree.graphicsetId='444';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='0A2447';
var theTemplate={
				name: 			'Amaze',
				paletteFamily: 	'0A2447',
				keyvisualId: 	'2425',
				keyvisualName: 	'mp3.jpg',
				fontsetId: 		'396',
				graphicsetId: 	'444',
				contentColor: 	'FFFFFF',
				contentBGColor: '0A2447',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'0A2447',
				b_color: 		'081B35',
				c_color: 		'3268E2',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '75',
internalId:  '1006',
customField: '1006'
};
webappMappings['7060']=webappMappings['7060-5c5fdcd1ef0b15f2f8e080677ad52a37']={
webappId:    '7060',
documentId:  '2381',
internalId:  '5c5fdcd1ef0b15f2f8e080677ad52a37',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75',
internalId:  '',
customField: '20100204-165259'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4029',
internalId:  '',
customField: '20080111-204930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1546',
internalId:  '',
customField: '20071129-222333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3118',
internalId:  '',
customField: '20060519-004124'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3127',
internalId:  '',
customField: '20060519-014000'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3668',
internalId:  '',
customField: '20060519-012808'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3415',
internalId:  '',
customField: '20060519-005641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3292',
internalId:  '',
customField: '20060519-004623'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3550',
internalId:  '',
customField: '20060519-014152'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3605',
internalId:  '',
customField: '20060519-013335'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1480',
internalId:  '',
customField: '20100204-165718'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4616',
internalId:  '',
customField: '20091215-130938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2092',
internalId:  '',
customField: '20081207-122838'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2101',
internalId:  '',
customField: '20060829-180440'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2381',
internalId:  '',
customField: '20060509-150627'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2278',
internalId:  '',
customField: '20100204-164349'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2188',
internalId:  '',
customField: '20091209-140303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1555',
internalId:  '',
customField: '20091019-115221'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050IN31UK';
var companyName   = 'HMI+';
var htmlTitle	  = 'mikehamilton.net';
var metaKeywords  = 'Music%2C+BET%2C+interviews%2C+relaxation%2C+hip+hop%2C+teaching%2C+neyo%2C+RB%2C+music+institute%2C+higher+learning%2C+music+CD%2C+music+software%2C+audio+sequencing+programs%2C+music+theory%2C+touring%2C+TV+show%2C+Saxophone%2C+bass%2C+keyboards%2C+pop+music%2C+contemporary+jazz%2C+clinics%2C+seminars%2C+demonstrations+++';
var metaContents  = 'Website+offering+a+wide+range+of+music+training+including+writing++production%2C+theory%2C+and+arranging+using+todays+most+popular+music+software+sequencing+programs.+Courses+taught+by+and+original+music+available+by+songwiter%2C+arranger%2C+producer+Mike+Hamilton.';
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();
};
