/* [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','1901',jdecode('Home'),jdecode(''),'/1901.html','true',[],''],
	['PAGE','1952',jdecode('SERVICES+AVAILABLE'),jdecode(''),'/1952.html','true',[],''],
	['PAGE','7801',jdecode('WEDDING+RECEPTIONS'),jdecode(''),'/7801.html','true',[],''],
	['PAGE','4301',jdecode('ROCK+BAND'),jdecode(''),'/4301.html','true',[],''],
	['PAGE','30001',jdecode('ROCK+BAND+VIDEO'),jdecode(''),'/30001.html','true',[],''],
	['PAGE','22122',jdecode('POINTS+STANDINGS'),jdecode(''),'/22122.html','true',[],''],
	['PAGE','39601',jdecode('ROCK+BAND+MUSIC+LIST'),jdecode(''),'/39601.html','true',[],''],
	['PAGE','22101',jdecode('ROCK+BAND+PHOTO+PAGE'),jdecode(''),'/22101.html','true',[],''],
	['PAGE','6201',jdecode('OUR+DISC+JOCKEYS'),jdecode(''),'/6201.html','true',[],''],
	['PAGE','1973',jdecode('PHOTO+GALLERY'),jdecode(''),'/1973.html','true',[],''],
	['PAGE','25101',jdecode('GUESTBOOK'),jdecode(''),'/25101.html','true',[],''],
	['PAGE','53301',jdecode('REFERENCES'),jdecode(''),'/53301.html','true',[],''],
	['PAGE','1994',jdecode('ABOUT+US'),jdecode(''),'/1994.html','true',[],''],
	['PAGE','2015',jdecode('CONTACT+US'),jdecode(''),'/2015.html','true',[],''],
	['PAGE','27201',jdecode('OUR+FAVORITE+VENDORS'),jdecode(''),'/27201.html','true',[],'']];
var siteelementCount=15;
theSitetree.topTemplateName='Citylights';
theSitetree.paletteFamily='333366';
theSitetree.keyvisualId='10436';
theSitetree.keyvisualName='kv_10436.jpg';
theSitetree.fontsetId='26577';
theSitetree.graphicsetId='13401';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='333366';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Citylights',
				paletteFamily: 	'333366',
				keyvisualId: 	'10436',
				keyvisualName: 	'kv_10436.jpg',
				fontsetId: 		'26577',
				graphicsetId: 	'13401',
				contentColor: 	'FFFFFF',
				contentBGColor: '333366',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'3E3535',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1901',
internalId:  '',
customField: '20100526-084908'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1973',
internalId:  '',
customField: '20090122-192449'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1952',
internalId:  '',
customField: '20090518-201453'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1994',
internalId:  '',
customField: '20081223-233845'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2015',
internalId:  '',
customField: '20081221-210502'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4301',
internalId:  '',
customField: '20090213-110443'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53301',
internalId:  '',
customField: '20100322-161915'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20100322-162128'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7801',
internalId:  '',
customField: '20090518-202141'
};
webappMappings['1501']=webappMappings['1501-14773682']={
webappId:    '1501',
documentId:  '1901',
internalId:  '14773682',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22122',
internalId:  '',
customField: '20090420-105746'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22101',
internalId:  '',
customField: '20100405-183027'
};
webappMappings['1002']=webappMappings['1002-25101aendu0inesbj']={
webappId:    '1002',
documentId:  '25101',
internalId:  '25101aendu0inesbj',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25101',
internalId:  '',
customField: '20090121-112743'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27201',
internalId:  '',
customField: '20100526-085336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30001',
internalId:  '',
customField: '20090124-202831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39601',
internalId:  '',
customField: '20090213-130855'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0INESBJ';
var companyName   = 'PARTY+ON+DISC+JOCKEY+SERVICES';
var htmlTitle	  = 'Party+On+DJ%27s';
var metaKeywords  = 'DJ%2C+Disc+Jockey%2C+Indiana%2C+Anderson%2C+Muncie%2C+Elwood%2C+Indianapolis%2C+Pendleton%2C+Alexandria%2C+Lapel%2C+Noblesville%2C+Chesterfield%2C+Cicero%2C+Carmel%2C+Weddings%2C+Wedding+DJ%2C+Wedding+Disc+Jockeys%2C+Reunions%2C+Corporate+Events%2C+Birthdays%2C+Anniversary';
var metaContents  = 'Indianas+Award+winning+Disc+Jockeys%21+Others+claim+they+are+the+best%2C+well+we+are%21+Book+your+event+today%21+Call+today%21';
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();
};
