/* [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','5001',jdecode('Home'),jdecode(''), jdecode('%2F5001.html'), 'true',[],'',''],
	['PAGE','5052',jdecode('Our+Services'),jdecode(''), jdecode('%2F5052%2Findex.html'), 'true',[ 
		['PAGE','5073',jdecode('FREE+Analysis'),jdecode(''), jdecode('%2F5052%2F5073.html'), 'true',[],'',''],
		['PAGE','44034',jdecode('Business+Plan'),jdecode(''), jdecode('%2F5052%2F44034.html'), 'true',[],'',''],
		['PAGE','5178',jdecode('Cash+Flow'),jdecode(''), jdecode('%2F5052%2F5178.html'), 'true',[],'',''],
		['PAGE','5157',jdecode('Human+Resourcing'),jdecode(''), jdecode('%2F5052%2F5157.html'), 'true',[],'',''],
		['PAGE','12901',jdecode('C.A.B.'),jdecode(''), jdecode('%2F5052%2F12901.html'), 'true',[],'',''],
		['PAGE','5094',jdecode('Marketing'),jdecode(''), jdecode('%2F5052%2F5094.html'), 'true',[],'',''],
		['PAGE','5136',jdecode('Production'),jdecode(''), jdecode('%2F5052%2F5136.html'), 'true',[],'',''],
		['PAGE','5115',jdecode('Media+Buying'),jdecode(''), jdecode('%2F5052%2F5115.html'), 'true',[],'',''],
		['PAGE','9501',jdecode('The+Internet'),jdecode(''), jdecode('%2F5052%2F9501.html'), 'true',[],'','']
	],'',''],
	['PAGE','13901',jdecode('Cost'),jdecode(''), jdecode('%2F13901.html'), 'true',[],'',''],
	['PAGE','9901',jdecode('About+Us'),jdecode(''), jdecode('%2F9901%2Findex.html'), 'true',[ 
		['PAGE','51834',jdecode('Non+Disclosure+Agreement'),jdecode(''), jdecode('%2F9901%2F51834.html'), 'true',[],'','']
	],'',''],
	['PAGE','7301',jdecode('Contact+Info'),jdecode(''), jdecode('%2F7301.html'), 'true',[],'','']];
var siteelementCount=15;
theSitetree.topTemplateName='Startup';
theSitetree.paletteFamily='990000';
theSitetree.keyvisualId='1431';
theSitetree.keyvisualName='mischpult.jpg';
theSitetree.fontsetId='236';
theSitetree.graphicsetId='278';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'hps_testtown',
  product: 'WSCSYSSSSLY0XNM4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Startup',
				paletteFamily: 	'990000',
				keyvisualId: 	'1431',
				keyvisualName: 	'mischpult.jpg',
				fontsetId: 		'236',
				graphicsetId: 	'278',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'990000',
				b_color: 		'333333',
				c_color: 		'000000',
				d_color: 		'FF0000',
				e_color: 		'FF0000',
				f_color: 		'FF0000',
				hasCustomLogo: 	'true',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5001',
internalId:  '',
customField: '20110922-135342'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5052',
internalId:  '',
customField: '20110923-093008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5073',
internalId:  '',
customField: '20110923-114402'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5094',
internalId:  '',
customField: '20110922-152139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5115',
internalId:  '',
customField: '20110922-135945'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5136',
internalId:  '',
customField: '20110923-094533'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5157',
internalId:  '',
customField: '20110922-151512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5178',
internalId:  '',
customField: '20110922-155528'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7301',
internalId:  '',
customField: '20110920-151352'
};
webappMappings['7008']=webappMappings['7008-8501']={
webappId:    '7008',
documentId:  '7301',
internalId:  '8501',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5001',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20110922-153621'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20110922-141608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12901',
internalId:  '',
customField: '20110922-155858'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13901',
internalId:  '',
customField: '20110922-140012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44034',
internalId:  '',
customField: '20110922-135625'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '51834',
internalId:  '',
customField: '20110922-144206'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INZB0G';
var companyName   = 'Studio+Consulting+Group';
var htmlTitle	  = 'Studio+Consulting+Group';
var metaKeywords  = 'Brad+Jones+ingenuity+innovators+business+creative+business+Savannah+business+consult+consulting+creative+art+artist+artistic+audio+music+sound+photo+film+television+TV+radio+broadcast+broadcasting+production+consultant+retail+advertising+marketing+employee+media+advice+advise+help+business+grow+studio+recording+sound+video+film+post+Procomm+studio+services+Doppler+studios+Catspaw+productions+JBS+studios+Oakdale+Post+Audio+Atlanta+Georgia+Savannah+GA+help+guide+lead+grow+business+company+Brad+Jones+John+Brooks+Bill+Ebmeyer+Bill+Quinn+Bradford+B.+Jones+recording+engineer+producer+executive+sales+selling+money+business+retail+clients+customers+help+advisory+board+Entrepreneur+Ingenuity+creativity+creative+Brad+Jones+Business+Consultant+unique+intuitive+ingenuity+selling+growing+expand+expanding+employees+owner+cash-flow+cash+money';
var metaContents  = 'Welcome+to+Studio+Consulting+Group%21+Ingenuity+Innovators+We+help+small+businesses+become+more+efficient%2C+more+effective%2C+more+successful%2C+and+more+profitable.+We+work+with+recording+studios%2C+audio+post-production+houses%2C+video+editing+suites%2C+advertising+agencies%2C+production+companies%2C+filmmakers%2C+musicians%2C+singers%2C+songwriters%2C+bands%2C+artist%2C+designers%2C+talent+agents%2C+creative+directors%2C+voice+talent%2C+and+record+labels.+For+over+35-years+years+we+have+owned+and+managed+companies+that+sell+production+and+creative-services.+Our+knowledge+and+comprehensive+understanding+of+proven+business+practices%2C+provides+us+with+the+expertise+to+successfully+operate%2C+market%2C+and+grow+a+business+that+sells+an+innovative+product+or+service.';
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();
};

