/* [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('NuGen+Music'),jdecode(''), jdecode('%2F601.html'), 'true',[],'',''],
	['PAGE','6101',jdecode('The+NuGen+Group'),jdecode(''), jdecode('%2F6101.html'), 'true',[],'',''],
	['PAGE','6122',jdecode('ARTISTS'),jdecode(''), jdecode('%2F6122%2Findex.html'), 'true',[ 
		['PAGE','6185',jdecode('Concerts'),jdecode(''), jdecode('%2F6122%2F6185.html'), 'true',[],'',''],
		['PAGE','84201',jdecode('Interviews'),jdecode(''), jdecode('%2F6122%2F84201.html'), 'true',[],'',''],
		['PAGE','100501',jdecode('Fotos+I'),jdecode(''), jdecode('%2F6122%2F100501.html'), 'true',[],'',''],
		['PAGE','106401',jdecode('Fotos+II'),jdecode(''), jdecode('%2F6122%2F106401.html'), 'true',[],'',''],
		['PAGE','101101',jdecode('Visual+Art+'),jdecode(''), jdecode('%2F6122%2F101101.html'), 'true',[],'',''],
		['PAGE','84222',jdecode('Contact'),jdecode(''), jdecode('%2F6122%2F84222.html'), 'true',[],'','']
	],'',''],
	['PAGE','6164',jdecode('MUSIC'),jdecode(''), jdecode('%2F6164.html'), 'true',[],'',''],
	['PAGE','111701',jdecode('DOWNLOADS'),jdecode(''), jdecode('%2F111701.html'), 'true',[],'',''],
	['PAGE','111722',jdecode('E+MAIL+ORDERS'),jdecode(''), jdecode('%2F111722.html'), 'true',[],'',''],
	['PAGE','121601',jdecode('CD+Mailorders'),jdecode(''), jdecode('%2F121601.html'), 'true',[],'',''],
	['PAGE','6227',jdecode('Ki+Media+on+line'),jdecode(''), jdecode('%2F6227%2Findex.html'), 'true',[ 
		['PAGE','58001',jdecode('Super+Store'),jdecode(''), jdecode('%2F6227%2F58001.html'), 'true',[],'',''],
		['PAGE','83443',jdecode('The+Health+Store'),jdecode(''), jdecode('%2F6227%2F83443.html'), 'true',[],'',''],
		['PAGE','83401',jdecode('Vintage+Music+'),jdecode(''), jdecode('%2F6227%2F83401.html'), 'true',[],'',''],
		['PAGE','83422',jdecode('Instruments'),jdecode(''), jdecode('%2F6227%2F83422.html'), 'true',[],'',''],
		['PAGE','83464',jdecode('Books+and+Mags'),jdecode(''), jdecode('%2F6227%2F83464.html'), 'true',[],'',''],
		['PAGE','83485',jdecode('DVDs+and+Misc.'),jdecode(''), jdecode('%2F6227%2F83485.html'), 'true',[],'','']
	],'',''],
	['PAGE','6248',jdecode('THE+KI+LABEL'),jdecode(''), jdecode('%2F6248.html'), 'true',[],'',''],
	['PAGE','87401',jdecode('THE+Ki+Forum'),jdecode(''), jdecode('%2F87401.html'), 'true',[],'','']];
var siteelementCount=22;
theSitetree.topTemplateName='Holz';
theSitetree.paletteFamily='C239A1';
theSitetree.keyvisualId='8818';
theSitetree.keyvisualName='KV_04.swf';
theSitetree.fontsetId='17185';
theSitetree.graphicsetId='12652';
theSitetree.contentColor='FFBEEF';
theSitetree.contentBGColor='262626';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'aplus',
  product: 'WSCSYSSSSLYTCPLQ'
};
var theTemplate={
				hasFlashNavigation: 'true',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'true',
				hasCompanyname: 'false',
				name: 			'Holz',
				paletteFamily: 	'C239A1',
				keyvisualId: 	'8818',
				keyvisualName: 	'KV_04.swf',
				fontsetId: 		'17185',
				graphicsetId: 	'12652',
				contentColor: 	'FFBEEF',
				contentBGColor: '262626',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'C039A3',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-1225666']={
webappId:    '1501',
documentId:  '601',
internalId:  '1225666',
customField: '1501'
};
webappMappings['4001']=webappMappings['4001-1449880']={
webappId:    '4001',
documentId:  '58001',
internalId:  '1449880',
customField: 'language:en;country:US;'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '601',
internalId:  '1006',
customField: '1006'
};
webappMappings['1003']=webappMappings['1003-aaplu0in2ww9110fbad9945']={
webappId:    '1003',
documentId:  '87401',
internalId:  'aaplu0in2ww9110fbad9945',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '601',
internalId:  '',
customField: '20110115-130532'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '121601',
internalId:  '',
customField: '20080716-061004'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6227',
internalId:  '',
customField: '20080716-075503'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6122',
internalId:  '',
customField: '20080716-053021'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111701',
internalId:  '',
customField: '20110111-073404'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '111722',
internalId:  '',
customField: '20080716-060551'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6164',
internalId:  '',
customField: '20080517-134313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20110115-131134'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6185',
internalId:  '',
customField: '20080204-135018'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84201',
internalId:  '',
customField: '20120106-084500'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '100501',
internalId:  '',
customField: '20120106-084645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '106401',
internalId:  '',
customField: '20080203-063855'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '101101',
internalId:  '',
customField: '20080201-084201'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '84222',
internalId:  '',
customField: '20070416-065522'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '58001',
internalId:  '',
customField: '20080716-075702'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83401',
internalId:  '',
customField: '20070306-190153'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83422',
internalId:  '',
customField: '20070307-131444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83443',
internalId:  '',
customField: '20070416-065930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83464',
internalId:  '',
customField: '20070416-070041'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '83485',
internalId:  '',
customField: '20070416-070146'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6248',
internalId:  '',
customField: '20110115-112358'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87401',
internalId:  '',
customField: '20080508-083650'
};
var webAppHostname = 'cm4all.aplus.net:80';
var canonHostname = 'cm4all01.carrierzone.com';
var accountId     = 'AAPLU0IN2WW9';
var companyName   = '';
var htmlTitle	  = 'nugenmusic.com';
var metaKeywords  = 'Michael+Allen+Perry+Michael+Allen+soul+Mp3+iphone+downloads+music+buy+nugen+Allen++nugenmusic.com+simple+thingscdMichaelsoulmemphisjazz++import+mailordersimple+things+kimediasuperstore++new+chilloutblack+widowhold+me+tightslow+dancebaritone++soul+singer%0AMemphis+R%26B+';
var metaContents  = 'Michael+Allen+Perry+Michael+Allen+ki+media+Mp3+Downloads+Allen+Simple+Things+Nugen+music+New+SOUL+%2F+JAZZ+Music%2C++new+European+indie+label-new+cd+from+NuGen+Music++The+Nugen+Group++Memphis+R%26B++';
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();
};

