/* [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','501',jdecode('Home%2FNews'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','25901',jdecode('Upcoming+Shows'),jdecode(''),'/25901.html','true',[],'',''],
	['PAGE','22901',jdecode('The+13+Commandments'),jdecode(''),'/22901.html','true',[],'',''],
	['PAGE','16864',jdecode('Biography'),jdecode(''),'/16864.html','true',[],'',''],
	['PAGE','9201',jdecode('The+Band'),jdecode(''),'/9201/index.html','true',[ 
		['PAGE','9222',jdecode('Johan+Edlund'),jdecode(''),'/9201/9222.html','true',[],'',''],
		['PAGE','9243',jdecode('Thomas+Wyreson'),jdecode(''),'/9201/9243.html','true',[],'',''],
		['PAGE','9264',jdecode('Anders+Iwers'),jdecode(''),'/9201/9264.html','true',[],'',''],
		['PAGE','9285',jdecode('Lars+Sk%C3%B6ld'),jdecode(''),'/9201/9285.html','true',[],'','']
	],'',''],
	['PAGE','9306',jdecode('Discography'),jdecode(''),'/9306/index.html','true',[ 
		['PAGE','9327',jdecode('Sumerian+Cry'),jdecode(''),'/9306/9327.html','true',[],'',''],
		['PAGE','14001',jdecode('A+Winter+Shadow'),jdecode(''),'/9306/14001.html','true',[],'',''],
		['PAGE','9348',jdecode('The+Astral+Sleep'),jdecode(''),'/9306/9348.html','true',[],'',''],
		['PAGE','9369',jdecode('Clouds'),jdecode(''),'/9306/9369.html','true',[],'',''],
		['PAGE','14022',jdecode('The+Sleeping+Beauty'),jdecode(''),'/9306/14022.html','true',[],'',''],
		['PAGE','14043',jdecode('Wildhoney'),jdecode(''),'/9306/14043.html','true',[],'',''],
		['PAGE','14064',jdecode('Gaia'),jdecode(''),'/9306/14064.html','true',[],'',''],
		['PAGE','16501',jdecode('The+Musical+History'),jdecode(''),'/9306/16501.html','true',[],'',''],
		['PAGE','14085',jdecode('Cold+Seed'),jdecode(''),'/9306/14085.html','true',[],'',''],
		['PAGE','14106',jdecode('A+Deeper+Kind+Of+Slumber'),jdecode(''),'/9306/14106.html','true',[],'',''],
		['PAGE','14601',jdecode('Brighter+Than+The+Sun'),jdecode(''),'/9306/14601.html','true',[],'',''],
		['PAGE','14622',jdecode('Skeleton+Skeletron'),jdecode(''),'/9306/14622.html','true',[],'',''],
		['PAGE','14643',jdecode('For+Her+Pleasure'),jdecode(''),'/9306/14643.html','true',[],'',''],
		['PAGE','14664',jdecode('Vote+For+Love'),jdecode(''),'/9306/14664.html','true',[],'',''],
		['PAGE','14685',jdecode('Judas+Christ'),jdecode(''),'/9306/14685.html','true',[],'',''],
		['PAGE','14706',jdecode('Cain'),jdecode(''),'/9306/14706.html','true',[],'',''],
		['PAGE','14727',jdecode('Prey'),jdecode(''),'/9306/14727.html','true',[],'',''],
		['PAGE','14748',jdecode('Church+Of+Tiamat'),jdecode(''),'/9306/14748.html','true',[],'',''],
		['PAGE','14769',jdecode('Commandments'),jdecode(''),'/9306/14769.html','true',[],'',''],
		['PAGE','14790',jdecode('Amanethes'),jdecode(''),'/9306/14790.html','true',[],'','']
	],'',''],
	['PAGE','17501',jdecode('Gallery'),jdecode(''),'/17501/index.html','true',[ 
		['PAGE','42601',jdecode('Slumber+Promoshots'),jdecode(''),'/17501/42601.html','true',[],'',''],
		['PAGE','42201',jdecode('Judas+Christ+Promoshots'),jdecode(''),'/17501/42201.html','true',[],'',''],
		['PAGE','43901',jdecode('Prey+Promoshots'),jdecode(''),'/17501/43901.html','true',[],'',''],
		['PAGE','40801',jdecode('Amanethes+Promoshots'),jdecode(''),'/17501/40801.html','true',[],'','']
	],'',''],
	['PAGE','30701',jdecode('Interviews'),jdecode(''),'/30701/index.html','true',[ 
		['PAGE','36801',jdecode('Megalomaniac+1997'),jdecode(''),'/30701/36801.html','true',[],'',''],
		['PAGE','36001',jdecode('Megalomaniac+1999'),jdecode(''),'/30701/36001.html','true',[],'',''],
		['PAGE','37801',jdecode('Darkside+2003'),jdecode(''),'/30701/37801.html','true',[],'',''],
		['PAGE','38301',jdecode('The+Pernod+Files+2005'),jdecode(''),'/30701/38301.html','true',[],'',''],
		['PAGE','36401',jdecode('Nocturnal+Euphony+2007'),jdecode(''),'/30701/36401.html','true',[],'',''],
		['PAGE','44501',jdecode('Lords+Of+Metal+2008'),jdecode(''),'/30701/44501.html','true',[],'','']
	],'',''],
	['PAGE','16822',jdecode('Links'),jdecode(''),'/16822.html','true',[],'',''],
	['PAGE','16801',jdecode('Contact'),jdecode(''),'/16801.html','true',[],'',''],
	['PAGE','16843',jdecode('Imprint'),jdecode(''),'/16843.html','true',[],'','']];
var siteelementCount=45;
theSitetree.topTemplateName='NewYork';
theSitetree.paletteFamily='660000';
theSitetree.keyvisualId='974';
theSitetree.keyvisualName='schmuck.jpg';
theSitetree.fontsetId='169';
theSitetree.graphicsetId='197';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'NewYork',
				paletteFamily: 	'660000',
				keyvisualId: 	'974',
				keyvisualName: 	'schmuck.jpg',
				fontsetId: 		'169',
				graphicsetId: 	'197',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				a_color: 		'000000',
				b_color: 		'660000',
				c_color: 		'000000',
				d_color: 		'990000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1501']=webappMappings['1501-12532526']={
webappId:    '1501',
documentId:  '501',
internalId:  '12532526',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-961d69ee602e6a81119507a033d9977e']={
webappId:    '7060',
documentId:  '40801',
internalId:  '961d69ee602e6a81119507a033d9977e',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-d81f608fd09fe092bf5c9f29be88247f']={
webappId:    '7060',
documentId:  '42201',
internalId:  'd81f608fd09fe092bf5c9f29be88247f',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-aa8394111dadd7ed6389827d4323819c']={
webappId:    '7060',
documentId:  '42601',
internalId:  'aa8394111dadd7ed6389827d4323819c',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-4c56732ae23473cc0483ce979b724eb0']={
webappId:    '7060',
documentId:  '43901',
internalId:  '4c56732ae23473cc0483ce979b724eb0',
customField: 'language:en;country:US;'
};
webappMappings['7005']=webappMappings['7005-43']={
webappId:    '7005',
documentId:  '9306',
internalId:  '43',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20100519-045354'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25901',
internalId:  '',
customField: '20100519-044807'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22901',
internalId:  '',
customField: '20080418-103419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16864',
internalId:  '',
customField: '20080307-182937'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9201',
internalId:  '',
customField: '20080419-072408'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9222',
internalId:  '',
customField: '20080425-032317'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9243',
internalId:  '',
customField: '20080418-125448'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9264',
internalId:  '',
customField: '20081024-071834'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9285',
internalId:  '',
customField: '20080425-032640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9306',
internalId:  '',
customField: '20080426-065515'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9327',
internalId:  '',
customField: '20080308-102244'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14001',
internalId:  '',
customField: '20080308-101725'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9348',
internalId:  '',
customField: '20080308-125620'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9369',
internalId:  '',
customField: '20080308-102449'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14022',
internalId:  '',
customField: '20080506-082654'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14043',
internalId:  '',
customField: '20080418-101714'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14064',
internalId:  '',
customField: '20080418-102037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16501',
internalId:  '',
customField: '20080418-102303'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14085',
internalId:  '',
customField: '20080308-130258'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14106',
internalId:  '',
customField: '20080418-102916'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14601',
internalId:  '',
customField: '20080308-130603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14622',
internalId:  '',
customField: '20080308-130732'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14643',
internalId:  '',
customField: '20080308-130909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14664',
internalId:  '',
customField: '20080308-131105'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14685',
internalId:  '',
customField: '20080308-104447'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14706',
internalId:  '',
customField: '20080418-102740'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14727',
internalId:  '',
customField: '20080308-104757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14748',
internalId:  '',
customField: '20080308-132535'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14769',
internalId:  '',
customField: '20080308-131541'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14790',
internalId:  '',
customField: '20080506-082247'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20080419-070415'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42601',
internalId:  '',
customField: '20080419-110717'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '42201',
internalId:  '',
customField: '20080419-110644'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '43901',
internalId:  '',
customField: '20080419-112347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '40801',
internalId:  '',
customField: '20080419-070115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '30701',
internalId:  '',
customField: '20080419-072250'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36801',
internalId:  '',
customField: '20080418-150724'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36001',
internalId:  '',
customField: '20080418-150806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '37801',
internalId:  '',
customField: '20080418-160413'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38301',
internalId:  '',
customField: '20080419-051433'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '36401',
internalId:  '',
customField: '20080418-150923'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '44501',
internalId:  '',
customField: '20080419-140742'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16822',
internalId:  '',
customField: '20080308-184213'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16801',
internalId:  '',
customField: '20080418-120131'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '16843',
internalId:  '',
customField: '20080418-120204'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010INL08G';
var companyName   = 'Join+Now%21+The+Church+of+TIAMAT';
var htmlTitle	  = 'Church+of+TIAMAT';
var metaKeywords  = '';
var metaContents  = '';
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();
};
