/* [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','601',jdecode('HOME'),jdecode(''),'/601.html','true',[],'',''],
	['PAGE','4922',jdecode('ON-SITE+BUSINESS'),jdecode(''),'/4922.html','true',[],'',''],
	['PAGE','4943',jdecode('ON-SITE+LEGAL'),jdecode(''),'/4943.html','true',[],'',''],
	['PAGE','4964',jdecode('ON-SITE+SOCIAL'),jdecode(''),'/4964.html','true',[],'',''],
	['PAGE','5701',jdecode('VIDEO+EDITING'),jdecode(''),'/5701.html','true',[],'',''],
	['PAGE','5722',jdecode('DUPLICATION'),jdecode(''),'/5722.html','true',[],'',''],
	['PAGE','5764',jdecode('MOVIE+TRANSFERS'),jdecode(''),'/5764.html','true',[],'',''],
	['PAGE','5806',jdecode('PHOTOS%2FSLIDES'),jdecode(''),'/5806.html','true',[],'',''],
	['PAGE','5743',jdecode('STUDIO+PRODUCTIONS'),jdecode(''),'/5743.html','true',[],'',''],
	['PAGE','6201',jdecode('SPECIAL+SERVICES'),jdecode(''),'/6201.html','true',[],'',''],
	['PAGE','39648',jdecode('WEB+SERVICES'),jdecode(''),'/39648.html','true',[],'',''],
	['PAGE','6222',jdecode('LOCATION'),jdecode(''),'/6222.html','true',[],'',''],
	['PAGE','27701',jdecode('TESTIMONIALS'),jdecode(''),'/27701.html','true',[],'',''],
	['PAGE','6243',jdecode('E-MAIL+OSV'),jdecode(''),'/6243.html','true',[],'',''],
	['PAGE','33301',jdecode('BEHIND+THE+SCENES'),jdecode(''),'/33301.html','true',[],'',''],
	['PAGE','34301',jdecode('COUPONS'),jdecode(''),'/34301.html','true',[],'',''],
	['PAGE','39957',jdecode('VIDEO+PORTFOLIO'),jdecode(''),'/39957.html','true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Collage';
theSitetree.paletteFamily='6683B6';
theSitetree.keyvisualId='2449';
theSitetree.keyvisualName='computer.jpg';
theSitetree.fontsetId='408';
theSitetree.graphicsetId='461';
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: 			'Collage',
				paletteFamily: 	'6683B6',
				keyvisualId: 	'2449',
				keyvisualName: 	'computer.jpg',
				fontsetId: 		'408',
				graphicsetId: 	'461',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'6683B6',
				c_color: 		'FFFFFF',
				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:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20090202-112109'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39957',
internalId:  '',
customField: '20090325-141839'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4922',
internalId:  '',
customField: '20090327-160746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4943',
internalId:  '',
customField: '20081020-131556'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4964',
internalId:  '',
customField: '20090325-141220'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5701',
internalId:  '',
customField: '20090327-161122'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5722',
internalId:  '',
customField: '20090203-132106'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5764',
internalId:  '',
customField: '20090327-161422'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5806',
internalId:  '',
customField: '20090325-141547'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5743',
internalId:  '',
customField: '20090325-141641'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20090325-141722'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39648',
internalId:  '',
customField: '20090325-154226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6222',
internalId:  '',
customField: '20090203-133221'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27701',
internalId:  '',
customField: '20090325-141939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6243',
internalId:  '',
customField: '20090203-133356'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33301',
internalId:  '',
customField: '20081020-142522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34301',
internalId:  '',
customField: '20080806-182354'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INEQHX';
var companyName   = '+PROFESSIONAL+EDITING+%26+PRODUCTION';
var htmlTitle	  = 'DVD+VIDEO+PRODUCTION++EDITING+%7C+WEDDINGS+TO+BUSINESS';
var metaKeywords  = 'video+DVD+production%2C+social+events%2C+conventions%2C+seminars%2C+stage+productions%2C+tributes%2C+slide+transfer%2C+weddings%2C+legal+services%2C+corporate+commercials%2C+sales+demos%2C+sports+demos%2C+family+reunions%2C+anniversaries%2C+funerals%2C+professional+editing%2C+video%2C+DVD%2FCD+duplication++++++Video+Editing%2C+Photos%2C+Transfer+PAL+8mm+Film%2C+Audio';
var metaContents  = 'A+full+service%2C+professional+video%2FDVD+production+company%2C+specializing+in+business+training++marketing+to+social+events%2C+conventions%2C+seminars%2C+stage+productions%2C+tributes%2C+slide+transfer%2C+weddings++other+event+shooting.+Since+1979+we+have+been+trusted+for+legal+services%2C+corporate+commercials%2C+sales++sports+demos%2C+family+reunions%2C+wedding++anniversaries+to+funerals.+In+addition%2C+we+offer+basic+self-service++operator-assisted+professional+editing%2C+video++DVD%2FCD+duplication.++';
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();
};
