/* [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','201',jdecode('Home'),jdecode(''),'/201.html','true',[],''],
	['PAGE','401',jdecode('About+us'),jdecode(''),'/401.html','true',[],''],
	['PAGE','422',jdecode('New+Releases'),jdecode(''),'/422.html','true',[],''],
	['PAGE','75801',jdecode('Fania'),jdecode(''),'/75801.html','true',[],''],
	['PAGE','53801',jdecode('Classic+Salsa'),jdecode(''),'/53801.html','true',[],''],
	['PAGE','88201',jdecode('Salsa+80%26%23x27%3Bs-90%26%23x27%3Bs'),jdecode(''),'/88201.html','true',[],''],
	['PAGE','53843',jdecode('Bachata'),jdecode(''),'/53843.html','true',[],''],
	['PAGE','102387',jdecode('RADIO+STATION'),jdecode(''),'/102387.html','true',[],''],
	['PAGE','93001',jdecode('Merengue'),jdecode(''),'/93001.html','true',[],''],
	['PAGE','93022',jdecode('Reggeaton'),jdecode(''),'/93022.html','true',[],''],
	['PAGE','103206',jdecode('Lucha+Libre+Masks'),jdecode(''),'/103206.html','true',[],''],
	['PAGE','63101',jdecode('Christian+Music'),jdecode(''),'/63101.html','true',[],''],
	['PAGE','53885',jdecode('DVDS'),jdecode(''),'/53885.html','true',[],''],
	['PAGE','68001',jdecode('Conj.+Clasico'),jdecode(''),'/68001.html','true',[],''],
	['PAGE','53906',jdecode('Order'),jdecode(''),'/53906.html','true',[],''],
	['PAGE','54301',jdecode('Store+Events'),jdecode(''),'/54301.html','true',[],''],
	['PAGE','54406',jdecode('Guestbook'),jdecode(''),'/54406/index.html','true',[ 
		['PAGE','54401',jdecode('Read+Guestbook'),jdecode(''),'/54406/54401.html','false',[],'']
	],''],
	['PAGE','54501',jdecode('Journal'),jdecode(''),'/54501.html','true',[],''],
	['PAGE','61901',jdecode('Trio'),jdecode(''),'/61901.html','true',[],''],
	['PAGE','61922',jdecode('Latin+Jazz'),jdecode(''),'/61922.html','true',[],''],
	['PAGE','61943',jdecode('Budget'),jdecode(''),'/61943.html','true',[],''],
	['PAGE','71301',jdecode('Map'),jdecode(''),'/71301.html','true',[],''],
	['PAGE','102610',jdecode('CONTACT+US'),jdecode(''),'/102610.html','true',[],'']];
var siteelementCount=24;
theSitetree.topTemplateName='Akropolis';
theSitetree.paletteFamily='4A587F';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10553';
theSitetree.graphicsetId='10449';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='4A587F';
var theTemplate={
				name: 			'Akropolis',
				paletteFamily: 	'4A587F',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10553',
				graphicsetId: 	'10449',
				contentColor: 	'FFFFFF',
				contentBGColor: '4A587F',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'4A587F',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC24M']={
webappId:    '5003',
documentId:  '201',
internalId:  'tid:1;pid:WSCSYSSSSLYTC24M',
customField: 'en:US:'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '201',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-26465']={
webappId:    '1501',
documentId:  '201',
internalId:  '26465',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201',
internalId:  '',
customField: '20091214-100208'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '401',
internalId:  '',
customField: '20090216-002305'
};
webappMappings['1002']=webappMappings['1002-54406AHW050INXSXR']={
webappId:    '1002',
documentId:  '54406',
internalId:  '54406AHW050INXSXR',
customField: 'icq=false'
};
webappMappings['7050']=webappMappings['7050-391']={
webappId:    '7050',
documentId:  '54501',
internalId:  '391',
customField: 'language:en;country:US;'
};
webappMappings['2001']=webappMappings['2001-location']={
webappId:    '2001',
documentId:  '71301',
internalId:  'location',
customField: 'language:en;country:US;isIncluded:false;'
};
webappMappings['7060']=webappMappings['7060-c596d49a448fc851cc1bc5924f06c285']={
webappId:    '7060',
documentId:  '54301',
internalId:  'c596d49a448fc851cc1bc5924f06c285',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102387',
internalId:  '',
customField: '20090219-000050'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '422',
internalId:  '',
customField: '20080809-122700'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '75801',
internalId:  '',
customField: '20080401-120215'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53801',
internalId:  '',
customField: '20091214-100012'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '88201',
internalId:  '',
customField: '20080328-092543'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53843',
internalId:  '',
customField: '20080325-134237'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93001',
internalId:  '',
customField: '20080402-115925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '93022',
internalId:  '',
customField: '20080402-115925'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '63101',
internalId:  '',
customField: '20080325-114310'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53885',
internalId:  '',
customField: '20080809-121830'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '68001',
internalId:  '',
customField: '20080325-193336'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53906',
internalId:  '',
customField: '20090217-233009'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54301',
internalId:  '',
customField: '20080513-093328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54406',
internalId:  '',
customField: '20080327-063136'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54401',
internalId:  '',
customField: '20080321-143444'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '54501',
internalId:  '',
customField: '20090104-110456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61901',
internalId:  '',
customField: '20080325-172347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61922',
internalId:  '',
customField: '20080407-064456'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '61943',
internalId:  '',
customField: '20080322-131250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71301',
internalId:  '',
customField: '20080324-144154'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '102610',
internalId:  '',
customField: '20090207-114703'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '103206',
internalId:  '',
customField: '20091214-103042'
};
var canonHostname = 'wsc-worker04.chi.us.siteprotect.com';
var accountId     = 'AHW050INXSXR';
var companyName   = 'L%26E+MUSIC+169+White+Street+Springfield+MA.+01108';
var htmlTitle	  = 'LE+MUSIC';
var metaKeywords  = 'SALSA+MUSIC+CDS+MERENGUE+BACHATA+REGGEATON';
var metaContents  = 'CDS+DVDS+CASSETTES+LPS+';
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();
};
