/* [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','6001',jdecode('Home'),jdecode(''),'/6001.html','true',[],''],
	['PAGE','7901',jdecode('Equipment'),jdecode(''),'/7901.html','true',[],''],
	['PAGE','7922',jdecode('Credits'),jdecode(''),'/7922.html','true',[],''],
	['PAGE','10201',jdecode('Photo+Gallery'),jdecode(''),'/10201.html','true',[],''],
	['PAGE','10301',jdecode('Reels'),jdecode(''),'/10301.html','true',[],''],
	['PAGE','9201',jdecode('Contact'),jdecode(''),'/9201.html','true',[],''],
	['PAGE','10801',jdecode('Links'),jdecode(''),'/10801.html','false',[],'']];
var siteelementCount=7;
theSitetree.topTemplateName='Common';
theSitetree.paletteFamily='D40202';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='26633';
theSitetree.graphicsetId='13449';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Common',
				paletteFamily: 	'D40202',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'26633',
				graphicsetId: 	'13449',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				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:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7901',
internalId:  '',
customField: '20090103-140101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6001',
internalId:  '',
customField: '20090103-134556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7922',
internalId:  '',
customField: '20090103-152723'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20090103-134641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10201',
internalId:  '',
customField: '20090103-134620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10301',
internalId:  '',
customField: '20090103-134629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10801',
internalId:  '',
customField: '20080709-190009'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN233N';
var companyName   = 'Terry+Fitzpatrick+-+Sound+Mixer';
var htmlTitle	  = 'Terry+Fitzpatrick+-+Sound+Mixer+in+Atlanta%2C+GA+Specializing+in+Sync+Sound+for+Film+%26+Video+Production+-+aCamaeraCrew.com';
var metaKeywords  = 'a+camera+crew%2C+HD+24p+cameras%2C+sony+hdw+f900%2C+cinealta%2C+CineAlta%2C+24p%2C+avid+symphony+NT%2C+avid+900+series+nt%2C+macintosh+g-4%2C+media+composer%2C+final+cut+studio%2C+post+production%2C+crew%2C+freelance+camera+crew%2C+eng+crew%2C+Crew%2C+broadcast+video%2C+production%2C+PRODUCTION%2C+digital+beta%2C+Digital+Beta%2C+beta+sp%2CBeta+SP%2C+camera+operator%2C+Camera+Operator%2C+sound+mixer%2C+Sound+Mixer%2C+Director+of+Photography%2C+television+crews%2C+tv+crews%2C+videographer%2C+sound+man%2C+HDTV%2C+digibeta%2C+crews%2C+production%2C+DP%2C+documentaries%2C+dv+cam%2C+video+audio%2C+TV+producer%2C+TV+Director%2C+corporate+video%2C+camera+man%2C+sound+man%2C+high+definition%2C+Ikegami+cameras%2C+broadcast+cameras%2C+music+videos%2C+Videographer%2C+cameras%2C+digital%2C+high+definition+cameras%2C+beta+crews%2C+camera+crews%2C+magazine+shows%2C+news+production%2C+broadcast%2C+digital%2C+beta%2C+Beta%2C+tv%2C+sound%2C+Sound%2C+director%2C+Industrial%2C+sony%2C+Sony%2C+cassette%2C+tape%2C+video+tape%2C+record%2C+news+broadcast%2C+media%2C+transmit%2C+air%2C+show%2C+televise%2C+producer%2C+tv+producer%2C+crews+for+hire%2C+video%2C++television%2C+TV++production%2C+eng%2C+efp%2C+crew+for+hire%2C+remote+TV+facility%2C+location+TV%2C++cameraman%2C++camera+operator%2C+director+of+photography%2C++photojournalist%2C++television+facility%2C++videographer%2C+beta%2C+sp%2C+Sp%2C+SP%2Cnetwork%2C++broadcast%2C+broadcast+facility%2C++entertainment%2C+news%2C+network%2C+syndicated+shows%2C+services%2C+tv+producer%2C+manager%2C++video+production+facilities%2C+sony+600%2C+sony+790%2C+550%2C+90%2C+400a%2C+70is%2C+701s%2C+ikegami%2C+packages%2C++documentary%2C++sports%2C++corporate%2C+betacam%2C+Atlanta%2C+Georgia%2C+experience%2C+communications%2C+teleconference%2C+electronic+journalism%2C+rentals%2C+training%2C+point+of+purchase%2C+marketing%2C+sx+digital%2C+dvc%2C+pro%2C+PRO%2C+magazine+program%2C+celebrity+interviews%2C+music%2C+press+kits%2C+educational+films%2C+cable%2C+tabloid%2C+duplication%2C+editing%2C+cinematography%2C+cinematographer%2C+media%2C+remote+tv+truck%2CSound+Devices+744t%2C+Shoeps+Shotgun%2C+Lectro+411+wireless+Mics';
var metaContents  = 'Terry+Fitzpatrick+-+Locacation+Sound+Mixer+in+Atlanta%2C+GA.+Commercials%2C+Documentaries%2C+Reality+Shows.+Sound+Devices+744t%2C+Shoeps+Shotgun%2C+Lectro+411+wireless+Mics';
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();
};
