/* [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','13201',jdecode('The+Hurricane+Session+2008'),jdecode(''),'/13201.html','true',[],'',''],
	['PAGE','138',jdecode('Home'),jdecode(''),'/138.html','true',[],'',''],
	['PAGE','11801',jdecode('2010+Projects'),jdecode(''),'/11801.html','true',[],'',''],
	['PAGE','15801',jdecode('2009+Projects'),jdecode(''),'/15801.html','true',[],'',''],
	['PAGE','1407',jdecode('2008+projects'),jdecode(''),'/1407.html','true',[],'',''],
	['PAGE','159',jdecode('2007+projects'),jdecode(''),'/159.html','true',[],'',''],
	['PAGE','177',jdecode('Tracks+to+Wax+Records'),jdecode(''),'/177.html','true',[],'',''],
	['PAGE','186',jdecode('LINKS'),jdecode(''),'/186.html','true',[],'',''],
	['PAGE','168',jdecode('Watts+up%3F'),jdecode(''),'/168.html','true',[],'',''],
	['PAGE','751',jdecode('Guestbook'),jdecode(''),'/751/index.html','true',[ 
		['PAGE','750',jdecode('Read+Guestbook'),jdecode(''),'/751/750.html','false',[],'','']
	],'',''],
	['PAGE','922',jdecode('Move+over....'),jdecode(''),'/922.html','true',[],'',''],
	['PAGE','1857',jdecode('studio'),jdecode(''),'/1857.html','true',[],'',''],
	['PAGE','1769',jdecode('studio+gear'),jdecode(''),'/1769.html','true',[],'',''],
	['PAGE','1112',jdecode('mics'),jdecode(''),'/1112.html','true',[],'',''],
	['PAGE','1327',jdecode('preamps'),jdecode(''),'/1327.html','true',[],'',''],
	['PAGE','10401',jdecode('Security'),jdecode(''),'/10401.html','true',[],'',''],
	['PAGE','9601',jdecode('Blue+Meanie+Guitar+project'),jdecode(''),'/9601.html','true',[],'','']];
var siteelementCount=18;
theSitetree.topTemplateName='Antigua';
theSitetree.paletteFamily='978B5C';
theSitetree.keyvisualId='6916';
theSitetree.keyvisualName='kv_6916.jpg';
theSitetree.fontsetId='11217';
theSitetree.graphicsetId='12039';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='B4A87B';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Antigua',
				paletteFamily: 	'978B5C',
				keyvisualId: 	'6916',
				keyvisualName: 	'kv_6916.jpg',
				fontsetId: 		'11217',
				graphicsetId: 	'12039',
				contentColor: 	'FFFFFF',
				contentBGColor: 'B4A87B',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '138',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-1363664']={
webappId:    '1501',
documentId:  '138',
internalId:  '1363664',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1407',
internalId:  '',
customField: '20081126-165355'
};
webappMappings['1002']=webappMappings['1002-751AHW050IN3CL8']={
webappId:    '1002',
documentId:  '751',
internalId:  '751AHW050IN3CL8',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '138',
internalId:  '',
customField: '20090218-203058'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '159',
internalId:  '',
customField: '20080124-024652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '177',
internalId:  '',
customField: '20081125-213807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '186',
internalId:  '',
customField: '20090128-205501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '168',
internalId:  '',
customField: '20080809-083222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '751',
internalId:  '',
customField: '20071103-013655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '750',
internalId:  '',
customField: '20071103-013655'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '922',
internalId:  '',
customField: '20080124-024618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1857',
internalId:  '',
customField: '20080531-225353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1769',
internalId:  '',
customField: '20081104-214155'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1112',
internalId:  '',
customField: '20081104-213850'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1327',
internalId:  '',
customField: '20081110-192132'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9601',
internalId:  '',
customField: '20090925-212136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10401',
internalId:  '',
customField: '20081126-165200'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20100601-193027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20100601-190011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15801',
internalId:  '',
customField: '20091205-224244'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3CL8';
var companyName   = 'SPOCKSTUDIO+SOUND+SPECIALISTS';
var htmlTitle	  = 'SpockStudio+and+Tracks+to+Wax+Records';
var metaKeywords  = 'RECORDING%2C+recording+services+in+new+york%2C+new+york+recording+studios%2C+neve%2C+pultec%2C+fairchild%2C+universal+audio%2C+neumann%2C+akg%2C+audio%2C+music%2C+local+bands%2C+long+island+bands%2C+hot%2C+long+island%2C+music%2C+guitar';
var metaContents  = 'RECORDING%2C+ENGINEERING%2C+STUDIO%2C+NEVE%2C+NEUMANN%2C+AUDIO%2C+SSL%2C+SOLID+STATE+LOGIC%2C+RECORD+LABEL%2C+BLUES%2C+ROCK%2C+NEW+YORK+BANDS%2C+TELEFUNKEN%2C+TASCAM%2C+MIXING%2C+MASTERING';
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();
};
