/* [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','32',jdecode('Home'),jdecode(''),'/32.html','true',[],''],
	['PAGE','22301',jdecode('NEWS+%2F+BLOG'),jdecode(''),'/22301.html','true',[],''],
	['PAGE','53',jdecode('InsyX+the+DJ'),jdecode(''),'/53/index.html','true',[ 
		['PAGE','62',jdecode('Clubs+I+Play+At'),jdecode(''),'/53/62.html','true',[],''],
		['PAGE','71',jdecode('Music+Styles'),jdecode(''),'/53/71.html','true',[],''],
		['PAGE','1154',jdecode('Family+%3A%29'),jdecode(''),'/53/1154.html','true',[],''],
		['PAGE','7547',jdecode('LoveBirds+Insy%26MB'),jdecode(''),'/53/7547.html','true',[],''],
		['PAGE','7737',jdecode('Lovable+Son+Bret'),jdecode(''),'/53/7737.html','true',[],''],
		['PAGE','42901',jdecode('VOW+RENEWAL%21%21'),jdecode(''),'/53/42901.html','true',[],'']
	],''],
	['PAGE','89',jdecode('AquA+FunPlex'),jdecode(''),'/89.html','true',[],''],
	['PAGE','23643',jdecode('Aqua+Resorts'),jdecode(''),'/23643.html','true',[],''],
	['PAGE','134',jdecode('CW+DesignZ'),jdecode(''),'/134.html','true',[],''],
	['PAGE','7862',jdecode('CW+DesignZ+Studios'),jdecode(''),'/7862.html','true',[],''],
	['PAGE','143',jdecode('DJ+World'),jdecode(''),'/143.html','true',[],''],
	['PAGE','7417',jdecode('TAC%21%21'),jdecode(''),'/7417.html','true',[],''],
	['PAGE','2276',jdecode('Guestbook'),jdecode(''),'/2276/index.html','true',[ 
		['PAGE','2275',jdecode('Read+Guestbook'),jdecode(''),'/2276/2275.html','false',[],'']
	],''],
	['PAGE','6405',jdecode('Contact'),jdecode(''),'/6405.html','true',[],''],
	['PAGE','6634',jdecode('LINKS'),jdecode(''),'/6634.html','true',[],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Easy';
theSitetree.paletteFamily='000000';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='49';
theSitetree.graphicsetId='51';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var theTemplate={
				name: 			'Easy',
				paletteFamily: 	'000000',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'49',
				graphicsetId: 	'51',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'FFFFFF',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22301',
internalId:  '',
customField: '20100224-034632'
};
webappMappings['1002']=webappMappings['1002-2276AHW050INXS6P']={
webappId:    '1002',
documentId:  '2276',
internalId:  '2276AHW050INXS6P',
customField: 'icq=false'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '32',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-17965']={
webappId:    '1501',
documentId:  '32',
internalId:  '17965',
customField: '1501'
};
webappMappings['1003']=webappMappings['1003-ahw050inxs6p11c04bdb907']={
webappId:    '1003',
documentId:  '22301',
internalId:  'ahw050inxs6p11c04bdb907',
customField: 'en:US:'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '32',
internalId:  '',
customField: '20100224-034857'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '53',
internalId:  '',
customField: '20091030-015920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '62',
internalId:  '',
customField: '20090728-072314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '71',
internalId:  '',
customField: '20091209-080331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '89',
internalId:  '',
customField: '20100224-034728'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42901',
internalId:  '',
customField: '20090106-060711'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23643',
internalId:  '',
customField: '20100208-230652'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7862',
internalId:  '',
customField: '20080803-174103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '134',
internalId:  '',
customField: '20100224-025055'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '143',
internalId:  '',
customField: '20090728-074936'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7417',
internalId:  '',
customField: '20080521-075957'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1154',
internalId:  '',
customField: '20090806-032229'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7547',
internalId:  '',
customField: '20080515-174031'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7737',
internalId:  '',
customField: '20080521-081033'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2276',
internalId:  '',
customField: '20080510-152428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '2275',
internalId:  '',
customField: '20080510-152428'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6405',
internalId:  '',
customField: '20080511-132902'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6634',
internalId:  '',
customField: '20100224-034805'
};
webappMappings['5003']=webappMappings['5003-tid:1;pid:WSCSYSSSSLYTC245']={
webappId:    '5003',
documentId:  '32',
internalId:  'tid:1;pid:WSCSYSSSSLYTC245',
customField: 'en:US::;language:en;country:US;'
};
var canonHostname = 'wsc-worker03.chi.us.siteprotect.com';
var accountId     = 'AHW050INXS6P';
var companyName   = '%3D%3D%3DDJ+INSYX%3D%3D%3D';
var htmlTitle	  = 'DJ+INSYX+WEB+HOME';
var metaKeywords  = 'music%2C+sound%2C+dj%2C+dee+jay%2C+disk+jockey%2C+insyx%2C+cockwood%2C+design%2C+clothing%2C+jeans%2C+shirts%2C+pants%2C+dance%2C+rock%2C+pop%2C+mixing%2C+world%2C+family%2C+aqua%2C+lounge%2C+club%2C+beach%2C+second%2C+life%2C+global%2C+home%2C+information%2C+booking%2C+schedule%2C+contact%2C+acts%2C+real%2C+alternative%2C+techno%2C+trance%2C+ambient%2C+house%2C+tunes%2C+banging%2C+mountain%2C+bear%2C+kaj%2C+sasch%2C+play%2C+beyond%2C+hype%2C+rythum%2C+explain%2C+biography%2C+';
var metaContents  = 'dj+insyx+website+dedicated+to+all+that+is+dj+insyx%2C+from+booking+gigs%2C+schedules%2C+my+organizations%2C+music%2C+and+information.';
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();
};

