/* [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','301',jdecode('Home'),jdecode(''),'/301.html','true',[],'',''],
	['PAGE','30403',jdecode('About+us'),jdecode(''),'/30403/index.html','true',[ 
		['PAGE','79601',jdecode('Our+team'),jdecode(''),'/30403/79601.html','true',[],'','']
	],'',''],
	['PAGE','30544',jdecode('Video+Production+'),jdecode(''),'/30544/index.html','true',[ 
		['PAGE','63101',jdecode('Rates'),jdecode(''),'/30544/63101.html','true',[],'','']
	],'',''],
	['PAGE','98801',jdecode('Auto+Service+Videos'),jdecode(''),'/98801.html','true',[],'',''],
	['PAGE','89201',jdecode('Radio+Advertising'),jdecode(''),'/89201.html','true',[],'',''],
	['PAGE','7422',jdecode('Community+Service'),jdecode(''),'/7422/index.html','true',[ 
		['PAGE','77101',jdecode('Community+Calendar'),jdecode(''),'/7422/77101.html','true',[],'','']
	],'',''],
	['PAGE','73801',jdecode('Testimonials'),jdecode(''),'/73801.html','true',[],'',''],
	['PAGE','30412',jdecode('Blog'),jdecode(''),'/30412.html','true',[],'',''],
	['PAGE','7506',jdecode('Jobs'),jdecode(''),'/7506.html','true',[],'',''],
	['PAGE','30567',jdecode('Contact'),jdecode(''),'/30567.html','true',[],'',''],
	['PAGE','30647',jdecode('Free+Info-Services'),jdecode(''),'/30647.html','true',[],'',''],
	['PAGE','79622',jdecode('Guestbook'),jdecode(''),'/79622.html','true',[],'',''],
	['PAGE','123812',jdecode('Games'),jdecode(''),'/123812.html','true',[],'','']];
var siteelementCount=16;
theSitetree.topTemplateName='Easy';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='49';
theSitetree.graphicsetId='51';
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: 			'Easy',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'49',
				graphicsetId: 	'51',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24M']={
webappId:    '5003',
documentId:  '301',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24M',
customField: 'en:US:'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20100902-191248'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7422',
internalId:  '',
customField: '20100803-194529'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7506',
internalId:  '',
customField: '20100708-133131'
};
webappMappings['7050']=webappMappings['7050-1400']={
webappId:    '7050',
documentId:  '30412',
internalId:  '1400',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30412',
internalId:  '',
customField: '20100331-232501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30403',
internalId:  '',
customField: '20100902-183702'
};
webappMappings['7060']=webappMappings['7060-0c1a7485f8055e74f515b32836074d84']={
webappId:    '7060',
documentId:  '30544',
internalId:  '0c1a7485f8055e74f515b32836074d84',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30544',
internalId:  '',
customField: '20100901-183715'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30567',
internalId:  '',
customField: '20100708-133154'
};
webappMappings['7008']=webappMappings['7008-4428']={
webappId:    '7008',
documentId:  '30647',
internalId:  '4428',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30647',
internalId:  '',
customField: '20100708-133303'
};
webappMappings['1501']=webappMappings['1501-5583406']={
webappId:    '1501',
documentId:  '301',
internalId:  '5583406',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-a033055012902a4d4885db834da1f89e']={
webappId:    '7060',
documentId:  '301',
internalId:  'a033055012902a4d4885db834da1f89e',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63101',
internalId:  '',
customField: '20100903-141333'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '73801',
internalId:  '',
customField: '20100803-194930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '77101',
internalId:  '',
customField: '20100402-100128'
};
webappMappings['1002']=webappMappings['1002-79622ahw050inxxeh']={
webappId:    '1002',
documentId:  '79622',
internalId:  '79622ahw050inxxeh',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79601',
internalId:  '',
customField: '20100902-184835'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '79622',
internalId:  '',
customField: '20100708-133322'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89201',
internalId:  '',
customField: '20100803-190207'
};
webappMappings['7060']=webappMappings['7060-f010a205194395037486eb78abf5ae5c']={
webappId:    '7060',
documentId:  '98801',
internalId:  'f010a205194395037486eb78abf5ae5c',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98801',
internalId:  '',
customField: '20100803-184035'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '30567',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:true;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '123812',
internalId:  '',
customField: '20100903-162544'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXXEH';
var companyName   = 'Video+and+Audio+Production';
var htmlTitle	  = 'Total+Broadcasting-+video+and+audio+production';
var metaKeywords  = 'video+production+company%2C+video+production+services%2C+video+post+production%2C+film+and+video+production%2C+in+Seattle%2C+in+Renton%2C+in+Bellevue%2C+web+video+production%2C+video+production+business%2C+film+video+production%2C+multimedia+production%2C+advertising+strategies%2C+website+videos%2C+flash+website+video%2C+email+marketing%2C+marketing+tools%2C+marketing+online%2C+search+engine+marketing%2C+internet+marketing+video%2C+internet+video+marketing%2C+videographers';
var metaContents  = 'Affordable+video+production+in+Seattle+and+available+nationwide.+Specializing+in+still+image+video+and+motion+picture+video+production+and+professional+voice+talent+and+scripting.+';
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();
};
