/* [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','6501',jdecode('Home'),jdecode(''),'/6501.html','true',[],''],
	['PAGE','6573',jdecode('Weddings'),jdecode(''),'/6573.html','true',[],''],
	['PAGE','6699',jdecode('Proms'),jdecode(''),'/6699.html','true',[],''],
	['PAGE','6615',jdecode('Class+Reunions'),jdecode(''),'/6615.html','true',[],''],
	['PAGE','6594',jdecode('Corporate+Events'),jdecode(''),'/6594.html','true',[],''],
	['PAGE','7801',jdecode('School+Dances'),jdecode(''),'/7801.html','true',[],''],
	['PAGE','6657',jdecode('Contact+Us'),jdecode(''),'/6657.html','true',[],''],
	['PAGE','8601',jdecode('Photo+Gallery'),jdecode(''),'/8601.html','true',[],''],
	['PAGE','6678',jdecode('Links'),jdecode(''),'/6678.html','true',[],'']];
var siteelementCount=9;
theSitetree.topTemplateName='Metal';
theSitetree.paletteFamily='A3CAFE';
theSitetree.keyvisualId='723';
theSitetree.keyvisualName='tanzen.jpg';
theSitetree.fontsetId='144';
theSitetree.graphicsetId='161';
theSitetree.contentColor='DDDDDD';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Metal',
				paletteFamily: 	'A3CAFE',
				keyvisualId: 	'723',
				keyvisualName: 	'tanzen.jpg',
				fontsetId: 		'144',
				graphicsetId: 	'161',
				contentColor: 	'DDDDDD',
				contentBGColor: '000000',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'A3CAFE',
				b_color: 		'87A7D2',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['7008']=webappMappings['7008-19595']={
webappId:    '7008',
documentId:  '6657',
internalId:  '19595',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6501',
internalId:  '',
customField: '20091007-225055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7801',
internalId:  '',
customField: '20090810-235420'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6573',
internalId:  '',
customField: '20090811-150235'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6657',
internalId:  '',
customField: '20090811-152244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20090811-161051'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6594',
internalId:  '',
customField: '20090812-124930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6699',
internalId:  '',
customField: '20090821-103640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6678',
internalId:  '',
customField: '20090811-153845'
};
webappMappings['1501']=webappMappings['1501-21143843']={
webappId:    '1501',
documentId:  '6501',
internalId:  '21143843',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6615',
internalId:  '',
customField: '20090811-151531'
};
var canonHostname = 'cmworker02.yourhostingaccount.com';
var accountId     = 'AENDU0IN3HD4';
var companyName   = 'Turntables+DJ+Service';
var htmlTitle	  = '';
var metaKeywords  = 'DJ%2C+Disc+Jockey%2C+Turntables+DJ+Service%2C+Turntables+Disc+Jockey+Service%2C+Weddings%2C+Class+Reunions%2C+Proms%2C+Corporate+Events%2C+Charlotte%2C+Lincolnton%2C+NC%2C+';
var metaContents  = 'Turntables+DJ+Srrvice+offers+25+year+experience+in+the+art+of+Disc+Jockey+Entertainment.+Pampered+treatment+from+the+first+phone+call+to+the+last+dance.+We+are+Simply+the+BEST+in+Mobile+Entertainment.+';
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();
};
