/* [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','32',jdecode('Home'),jdecode(''), jdecode('%2F32.html'), 'true',[],'',''],
	['PAGE','2711',jdecode('References'),jdecode(''), jdecode('%2F2711.html'), 'true',[],'',''],
	['PAGE','18001',jdecode('Weddings'),jdecode(''), jdecode('%2F18001.html'), 'true',[],'',''],
	['PAGE','12301',jdecode('Request+a+quote'),jdecode(''), jdecode('%2F12301.html'), 'true',[],'',''],
	['PAGE','53',jdecode('About+us'),jdecode(''), jdecode('%2F53%2Findex.html'), 'true',[ 
		['PAGE','62',jdecode('The+team'),jdecode(''), jdecode('%2F53%2F62.html'), 'true',[],'','']
	],'',''],
	['PAGE','13801',jdecode('Winter+2011%2F2012'),jdecode(''), jdecode('%2F13801.html'), 'true',[],'',''],
	['PAGE','10801',jdecode('St.+Patrick%26%23x27%3Bs+Day%21'),jdecode(''), jdecode('%2F10801.html'), 'true',[],'',''],
	['PAGE','21001',jdecode('Pearl+River+Day+2011'),jdecode(''), jdecode('%2F21001.html'), 'true',[],'',''],
	['PAGE','71',jdecode('Products'),jdecode(''), jdecode('%2F71%2Findex.html'), 'true',[ 
		['PAGE','80',jdecode('Christenings%2FCommunions%2FBirthdays'),jdecode(''), jdecode('%2F71%2F80.html'), 'true',[],'',''],
		['PAGE','89',jdecode('Weddings%2FAnniversaries'),jdecode(''), jdecode('%2F71%2F89.html'), 'true',[],'',''],
		['PAGE','98',jdecode('Holidays%2FSpecial+Events'),jdecode(''), jdecode('%2F71%2F98.html'), 'true',[],'','']
	],'',''],
	['PAGE','2720',jdecode('Bar+Packages'),jdecode(''), jdecode('%2F2720.html'), 'true',[],'',''],
	['PAGE','116',jdecode('Contact'),jdecode(''), jdecode('%2F116.html'), 'true',[],'',''],
	['PAGE','143',jdecode('Tips+%26+Tricks'),jdecode(''), jdecode('%2F143%2Findex.html'), 'true',[ 
		['PAGE','22601',jdecode('Locations'),jdecode(''), jdecode('%2F143%2F22601.html'), 'true',[],'','']
	],'',''],
	['PAGE','107',jdecode('Offers'),jdecode(''), jdecode('%2F107.html'), 'true',[],'',''],
	['PAGE','19501',jdecode('Patch'),jdecode(''), jdecode('%2F19501.html'), 'true',[],'',''],
	['PAGE','19201',jdecode('Fundraisers+-+Join+me%21'),jdecode(''), jdecode('%2F19201.html'), 'true',[],'',''],
	['PAGE','2729',jdecode('Halloween'),jdecode(''), jdecode('%2F2729.html'), 'true',[],'','']];
var siteelementCount=21;
theSitetree.topTemplateName='Enjoy';
theSitetree.paletteFamily='93A6CC';
theSitetree.keyvisualId='2228';
theSitetree.keyvisualName='hochzeit4.jpg';
theSitetree.fontsetId='365';
theSitetree.graphicsetId='415';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='93A6CC';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'optimum',
  product: 'WSCSYSSSSLYTC245'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Enjoy',
				paletteFamily: 	'93A6CC',
				keyvisualId: 	'2228',
				keyvisualName: 	'hochzeit4.jpg',
				fontsetId: 		'365',
				graphicsetId: 	'415',
				contentColor: 	'FFFFFF',
				contentBGColor: '93A6CC',
				a_color: 		'93A6CC',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Times New Roman, Times, serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '32',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20111022-214317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2729',
internalId:  '',
customField: '20111024-101654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10801',
internalId:  '',
customField: '20111023-065034'
};
webappMappings['7060']=webappMappings['7060-1b96365820d8bbc9d6d98faeb35625d9']={
webappId:    '7060',
documentId:  '18001',
internalId:  '1b96365820d8bbc9d6d98faeb35625d9',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '107',
internalId:  '',
customField: '20111024-101452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20111024-101256'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62',
internalId:  '',
customField: '20071002-182906'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2711',
internalId:  '',
customField: '20110114-143639'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71',
internalId:  '',
customField: '20110315-211941'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '80',
internalId:  '',
customField: '20070604-140727'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89',
internalId:  '',
customField: '20111024-101344'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '98',
internalId:  '',
customField: '20070604-141149'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '116',
internalId:  '',
customField: '20111024-101409'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19201',
internalId:  '',
customField: '20111024-101604'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '19501',
internalId:  '',
customField: '20110520-125527'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143',
internalId:  '',
customField: '20110315-212713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2720',
internalId:  '',
customField: '20110315-212608'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13801',
internalId:  '',
customField: '20111022-213759'
};
webappMappings['7008']=webappMappings['7008-5141']={
webappId:    '7008',
documentId:  '12301',
internalId:  '5141',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12301',
internalId:  '',
customField: '20110722-155034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18001',
internalId:  '',
customField: '20111023-064505'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21001',
internalId:  '',
customField: '20110725-152433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22601',
internalId:  '',
customField: '20111025-195051'
};
var webAppHostname = 'cgi-wsc.chi.us.siteprotect.com:80';
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXXOU';
var companyName   = 'PJ+the+DJ';
var htmlTitle	  = 'PJ+the+DJ+Holt+Entertainment++Rockland+County+New+York+Disc+Jockey+Sweet+16+sixteen+Irish';
var metaKeywords  = 'Disc+Jockey%2C+DJ%2C+Pearl+River%2C+Hibernian%2C+Catering%2C+Birthday%2C+Communion%2C+COnfirmation%2C+Sweet+16%2C+Anniversary%2C+Pearl+River%2C+Nanuet%2C+Bergen+County%2C+Westchester+COunty%2C+Nyack%2C+New+City%2C+Conger%2C+Valley+Cottage%2C+Parade%2C+Feis%2C+catering+bergen%2C+catering+rockland%2C+catering+orange%2C+catering+westchester%2C+graduation+westchester%2C+graduation+rockland%2C+Anniversary+DJ%2C+Wedding+DJ%2C+';
var metaContents  = 'Dj%2C+DJ%2C+dj%2C+Disc+Jockey%2C+Feis%2C+Pearl+River%2C+IRish%2C+Celtic%2C+Halloween+DJ%2C+Manhattan+DJ%2C+Bergen+County+DJ%2C+BErgen+County+Disc+Jockey%2C+Sweet+16+New+York+DJ%2C+Park+Ridge+DJ%2C+Park+Ridge+Disc+Jockey%2C+Westwood+DJ%2C+Westwood+Disc+Jockey%2C+Feis+New+York%2C+IRish+Dance+New+York%2C+Hibernian+New+York%2C+AOH+DJ%2C+AOH+Disc+Jockey%2C+Fund-raising+DJ%2C+Fundraising+DJ%2C+Fundraising+NEw+York%2C+Street+Fair+New+York%2C+';
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();
};

