/* [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+and+contact'),jdecode(''),'/201.html','true',[],''],
	['PAGE','217',jdecode('Current+Work'),jdecode(''),'/217.html','true',[],''],
	['PAGE','207',jdecode('The+Studio'),jdecode(''),'/207.html','true',[],''],
	['PAGE','212',jdecode('Commissions+and+Projects'),jdecode(''),'/212.html','true',[],''],
	['PAGE','5101',jdecode('Catalogue+for+sale'),jdecode(''),'/5101.html','true',[],''],
	['PAGE','15901',jdecode('Research%3A+Shiny+Shiny+World'),jdecode(''),'/15901.html','true',[],'']];
var siteelementCount=6;
theSitetree.topTemplateName='Fragment';
theSitetree.paletteFamily='AFD5C8';
theSitetree.keyvisualId='3448';
theSitetree.keyvisualName='kv_3448.jpg';
theSitetree.fontsetId='10430';
theSitetree.graphicsetId='10761';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Fragment',
				paletteFamily: 	'AFD5C8',
				keyvisualId: 	'3448',
				keyvisualName: 	'kv_3448.jpg',
				fontsetId: 		'10430',
				graphicsetId: 	'10761',
				contentColor: 	'000000',
				contentBGColor: 'FFFFFF',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'AFD5C8',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'508E79',
				e_color: 		'508E79',
				f_color: 		'508E79',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '201',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '201',
internalId:  '',
customField: '20090901-180809'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '15901',
internalId:  '',
customField: '20090901-183120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '217',
internalId:  '',
customField: '20090901-180011'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '207',
internalId:  '',
customField: '20051202-051020'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '212',
internalId:  '',
customField: '20060621-203648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5101',
internalId:  '',
customField: '20090901-182902'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010IN2MMV';
var companyName   = 'Dr+Lisa+Anderson.++Visual+Artist%2C+public+sites+and+private+stories';
var htmlTitle	  = 'Dr+Lisa+Anderson+-+Visual+Artist.';
var metaKeywords  = 'public+art%3B+neon%3B+sound+art%3B+painting%3B+drawing%3B+eternity%3B+archeology%3B+memory%3B+historic+sites%3B+war+memorials%3B+doctorate%3B+consultation%3B+education%3B+research%3B+Opera+House%3B+Sydney%3B+chandeliers%3B+lustres%3B+love%3B+roses%3B+gems%3B+pearls%3Bgold+leaf%3B+public+space%3B+Doctorate%3B+COFA%3B+NSW%3B+Sydney%3B+Australian+Museum.+Woven%3B+projection%3B+Jon+Drummond%3B+artspace%3B+womens+art+register%3B+statues%3B+Institute+of+Modern+Art%3B+UTS+Collection%3B+Artbank+Collection%3B+Writing+the+City%3B+Midnight+Ice';
var metaContents  = 'Lisa+Anderson+is+a+visual+artist+who+has+projected+images+on+the+Opera+House%2C+Observatory+Hill+and+built+large+scale+sculptures+and+public+art+works%2C+uses+animated+neon+and+inflatables%2C+has+worked+with+sound+pieces+with+Jon+Drummond.+Her+paintings%2C+drawings+and+photographs+have+been+included+in+major+collections+while+her+work+has+travelled+nationally+and+internationally.+She+works+with+memory%2C+eternity%2C+engagement%2C+participation+and+architecture+through+simple+images+and+materials+of+roses%2C+love%2C+chandeleirs%2C+lights%2C++pearls%2C+gems%2C+cystals+and+gold+leaf.+Lisa+has+researched+areas+of+public+archive+and+personal+memory+through+her+Doctorate+at+Uni+of+Wollongong+and+her+Masters+of+Visual+Art+from+City+Art+Institute+%28now+COFA%29+relied+on+dream+imagery.+Current+research+works+with+the+evects+of+mega-events+on+social+interaction+and+laws+that+govern+interaction+in+public+spaces.+Lisa+is+a+recipient+of+many+awards+including+the+NSW+Women+and+the+Arts+Award+and+the+inaugural+Artist+in+Residence+at+the+Australian+Museum.';
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();
};
