/* [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','55612',jdecode('Main'),jdecode(''),'/55612.html','true',[],'',''],
	['PAGE','134',jdecode('DJs'),jdecode(''),'/134/index.html','true',[ 
		['PAGE','28912',jdecode('Don+Tonic'),jdecode(''),'/134/28912.html','true',[],'',''],
		['PAGE','47812',jdecode('Enrique+Martinez'),jdecode(''),'/134/47812.html','true',[],'',''],
		['PAGE','48012',jdecode('Joe+Farley'),jdecode(''),'/134/48012.html','true',[],'',''],
		['PAGE','48033',jdecode('Mark+McAlister'),jdecode(''),'/134/48033.html','true',[],'',''],
		['PAGE','48054',jdecode('Matthew+Short'),jdecode(''),'/134/48054.html','true',[],'',''],
		['PAGE','48075',jdecode('Michael+Quarterman'),jdecode(''),'/134/48075.html','true',[],'',''],
		['PAGE','48096',jdecode('Michelle+Gonzalez'),jdecode(''),'/134/48096.html','true',[],'',''],
		['PAGE','48117',jdecode('Tim+Benter'),jdecode(''),'/134/48117.html','true',[],'','']
	],'',''],
	['PAGE','170',jdecode('Pricing'),jdecode(''),'/170.html','true',[],'',''],
	['PAGE','152',jdecode('FAQs+%28Questions%29'),jdecode(''),'/152.html','true',[],'',''],
	['PAGE','2209',jdecode('Free+DJ+Consultation'),jdecode(''),'/2209.html','true',[],'',''],
	['PAGE','9775',jdecode('Musicians'),jdecode(''),'/9775.html','true',[],'',''],
	['PAGE','4098',jdecode('7+Day+Guarantee'),jdecode(''),'/4098.html','true',[],'',''],
	['PAGE','143',jdecode('Music'),jdecode(''),'/143.html','true',[],'',''],
	['PAGE','2009',jdecode('Testimonials'),jdecode(''),'/2009.html','true',[],'',''],
	['PAGE','197',jdecode('Video+Projection'),jdecode(''),'/197.html','true',[],'',''],
	['PAGE','1275',jdecode('Discounts'),jdecode(''),'/1275.html','true',[],'',''],
	['PAGE','2453',jdecode('Locations+%26+Vendors'),jdecode(''),'/2453.html','true',[],'',''],
	['PAGE','3341',jdecode('Other+Events'),jdecode(''),'/3341.html','true',[],'',''],
	['PAGE','1219',jdecode('Contact'),jdecode(''),'/1219.html','true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Blossom';
theSitetree.paletteFamily='AC2E53';
theSitetree.keyvisualId='7103';
theSitetree.keyvisualName='kv_7103.jpg';
theSitetree.fontsetId='16395';
theSitetree.graphicsetId='12128';
theSitetree.contentColor='AC2E53';
theSitetree.contentBGColor='E5E2E2';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Blossom',
				paletteFamily: 	'AC2E53',
				keyvisualId: 	'7103',
				keyvisualName: 	'kv_7103.jpg',
				fontsetId: 		'16395',
				graphicsetId: 	'12128',
				contentColor: 	'AC2E53',
				contentBGColor: 'E5E2E2',
				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['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28912',
internalId:  '',
customField: '20100624-175507'
};
webappMappings['7008']=webappMappings['7008-8801']={
webappId:    '7008',
documentId:  '55612',
internalId:  '8801',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '170',
internalId:  '',
customField: '20091202-161935'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134',
internalId:  '',
customField: '20081108-012226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48012',
internalId:  '',
customField: '20100624-173832'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48033',
internalId:  '',
customField: '20100624-175637'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48054',
internalId:  '',
customField: '20100624-175747'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48075',
internalId:  '',
customField: '20100624-175843'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48096',
internalId:  '',
customField: '20100624-175947'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '48117',
internalId:  '',
customField: '20100624-190309'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9775',
internalId:  '',
customField: '20100624-183211'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2209',
internalId:  '',
customField: '20080109-211801'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4098',
internalId:  '',
customField: '20080221-074702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '152',
internalId:  '',
customField: '20100511-145236'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143',
internalId:  '',
customField: '20091008-192111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2009',
internalId:  '',
customField: '20100624-180807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '197',
internalId:  '',
customField: '20100624-180856'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55612',
internalId:  '',
customField: '20100707-161504'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '47812',
internalId:  '',
customField: '20100624-170350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1219',
internalId:  '',
customField: '20100614-182235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1275',
internalId:  '',
customField: '20100614-184332'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2453',
internalId:  '',
customField: '20090116-213353'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3341',
internalId:  '',
customField: '20100614-173854'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050IN3ZSS';
var companyName   = 'DJs+To+Go+Inc.';
var htmlTitle	  = 'DJs+To+Go+Inc.';
var metaKeywords  = 'weddings+wedding+DJ+DJs+To+Go+ceremony+entertainment+California+disc+jockey+music+Tim+Benter+Matthew+Short+Steve+Irons+Joe+Farley+musician+Los+Angeles+Redondo+Beach+South+Bay+California+upscale+elegant+Joe+Farley+party+birthday+promotion+special+event';
var metaContents  = 'Wedding+and+Special+Event+DJs+-+310+798+8711';
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();
};
