/* [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','5501',jdecode('Home'),jdecode(''), jdecode('%2F5501.html'), 'true',[],'',''],
	['PAGE','5552',jdecode('Contact'),jdecode(''), jdecode('%2F5552.html'), 'true',[],'',''],
	['PAGE','9501',jdecode('Resume'),jdecode(''), jdecode('%2F9501%2Findex.html'), 'true',[ 
		['PAGE','5594',jdecode('listen'),jdecode(''), jdecode('%2F9501%2F5594.html'), 'true',[],'',''],
		['PAGE','21482',jdecode('look'),jdecode(''), jdecode('%2F9501%2F21482.html'), 'true',[],'',''],
		['PAGE','27974',jdecode('Logic+stuff'),jdecode(''), jdecode('%2F9501%2F27974.html'), 'true',[],'','']
	],'',''],
	['PAGE','5615',jdecode('Photographs'),jdecode(''), jdecode('%2F5615%2Findex.html'), 'true',[ 
		['PAGE','9901',jdecode('home%3F+%28and+yours+truly...%29'),jdecode(''), jdecode('%2F5615%2F9901.html'), 'true',[],'',''],
		['PAGE','12257',jdecode('my+art'),jdecode(''), jdecode('%2F5615%2F12257.html'), 'true',[],'',''],
		['PAGE','12776',jdecode('sketchy'),jdecode(''), jdecode('%2F5615%2F12776.html'), 'true',[],'','']
	],'',''],
	['PAGE','5636',jdecode('News'),jdecode(''), jdecode('%2F5636.html'), 'true',[],'',''],
	['PAGE','5573',jdecode('Links'),jdecode(''), jdecode('%2F5573%2Findex.html'), 'true',[ 
		['PAGE','12797',jdecode('art'),jdecode(''), jdecode('%2F5573%2F12797.html'), 'true',[],'',''],
		['PAGE','22082',jdecode('actors'),jdecode(''), jdecode('%2F5573%2F22082.html'), 'true',[],'',''],
		['PAGE','22103',jdecode('opera'),jdecode(''), jdecode('%2F5573%2F22103.html'), 'true',[],'',''],
		['PAGE','22124',jdecode('dancers'),jdecode(''), jdecode('%2F5573%2F22124.html'), 'true',[],'',''],
		['PAGE','22145',jdecode('musicians'),jdecode(''), jdecode('%2F5573%2F22145.html'), 'true',[],'',''],
		['PAGE','17482',jdecode('film'),jdecode(''), jdecode('%2F5573%2F17482.html'), 'true',[],'',''],
		['PAGE','23682',jdecode('design'),jdecode(''), jdecode('%2F5573%2F23682.html'), 'true',[],'',''],
		['PAGE','14768',jdecode('youtube'),jdecode(''), jdecode('%2F5573%2F14768.html'), 'true',[],'','']
	],'',''],
	['PAGE','7401',jdecode('Midget%2FHorse+Porn'),jdecode(''), jdecode('%2F7401.html'), 'true',[],'',''],
	['PAGE','13868',jdecode('Poems'),jdecode(''), jdecode('%2F13868%2Findex.html'), 'true',[ 
		['PAGE','13889',jdecode('if+i+were+a+wind'),jdecode(''), jdecode('%2F13868%2F13889.html'), 'true',[],'',''],
		['PAGE','13910',jdecode('porcelain'),jdecode(''), jdecode('%2F13868%2F13910.html'), 'true',[],'',''],
		['PAGE','13931',jdecode('artaud'),jdecode(''), jdecode('%2F13868%2F13931.html'), 'true',[],'',''],
		['PAGE','20982',jdecode('depression'),jdecode(''), jdecode('%2F13868%2F20982.html'), 'true',[],'',''],
		['PAGE','13952',jdecode('cub'),jdecode(''), jdecode('%2F13868%2F13952.html'), 'true',[],'',''],
		['PAGE','13973',jdecode('the+street'),jdecode(''), jdecode('%2F13868%2F13973.html'), 'true',[],'',''],
		['PAGE','21003',jdecode('last+breath'),jdecode(''), jdecode('%2F13868%2F21003.html'), 'true',[],'','']
	],'',''],
	['PAGE','33496',jdecode('Vocal+Rep+List'),jdecode(''), jdecode('%2F33496.html'), 'true',[],'','']];
var siteelementCount=30;
theSitetree.topTemplateName='Metal';
theSitetree.paletteFamily='A3CAFE';
theSitetree.keyvisualId='780';
theSitetree.keyvisualName='uhr.jpg';
theSitetree.fontsetId='142';
theSitetree.graphicsetId='161';
theSitetree.contentColor='F00000';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'fatcow',
  product: 'WSCSYSSSSLY0XRN4'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Metal',
				paletteFamily: 	'A3CAFE',
				keyvisualId: 	'780',
				keyvisualName: 	'uhr.jpg',
				fontsetId: 		'142',
				graphicsetId: 	'161',
				contentColor: 	'F00000',
				contentBGColor: '000000',
				a_color: 		'A3CAFE',
				b_color: 		'87A7D2',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5501',
internalId:  '',
customField: '20111003-222308'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5552',
internalId:  '',
customField: '20080828-005439'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5573',
internalId:  '',
customField: '20080830-192156'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5615',
internalId:  '',
customField: '20080923-011313'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5594',
internalId:  '',
customField: '20101015-120946'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7401',
internalId:  '',
customField: '20090211-211640'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5636',
internalId:  '',
customField: '20110830-200314'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9501',
internalId:  '',
customField: '20101219-182657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9901',
internalId:  '',
customField: '20080828-010650'
};
webappMappings['7060']=webappMappings['7060-1e2ccf510d46af4bbb44be8d72595af5']={
webappId:    '7060',
documentId:  '9901',
internalId:  '1e2ccf510d46af4bbb44be8d72595af5',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-f3756ecb14ea896a458b470210550b88']={
webappId:    '7060',
documentId:  '12257',
internalId:  'f3756ecb14ea896a458b470210550b88',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12257',
internalId:  '',
customField: '20080828-190133'
};
webappMappings['7060']=webappMappings['7060-21dc6a7631464de6d3db4ae2704e2fec']={
webappId:    '7060',
documentId:  '12776',
internalId:  '21dc6a7631464de6d3db4ae2704e2fec',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12776',
internalId:  '',
customField: '20080828-193734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13868',
internalId:  '',
customField: '20080830-192010'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13910',
internalId:  '',
customField: '20080829-004911'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13889',
internalId:  '',
customField: '20080904-204139'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13931',
internalId:  '',
customField: '20080829-004822'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13952',
internalId:  '',
customField: '20080829-005020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13973',
internalId:  '',
customField: '20080829-011140'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '14768',
internalId:  '',
customField: '20110831-000222'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12797',
internalId:  '',
customField: '20091011-232756'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17482',
internalId:  '',
customField: '20090209-144905'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '20982',
internalId:  '',
customField: '20080903-143442'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21003',
internalId:  '',
customField: '20080904-204219'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21482',
internalId:  '',
customField: '20101006-184056'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22082',
internalId:  '',
customField: '20110830-235956'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22103',
internalId:  '',
customField: '20090209-144226'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22124',
internalId:  '',
customField: '20090209-144305'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '22145',
internalId:  '',
customField: '20110831-000304'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '23682',
internalId:  '',
customField: '20090209-145051'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27974',
internalId:  '',
customField: '20101015-122657'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '33496',
internalId:  '',
customField: '20110830-235015'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '5501',
internalId:  '1006',
customField: '1006'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0IN2VAS';
var companyName   = 'Alexander+Rovang%2C+pianist';
var htmlTitle	  = '';
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();
};

