/* [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','701',jdecode('Home'),jdecode(''),'/701.html','true',[],''],
	['PAGE','38335',jdecode('New+Stock+Just+Arrived'),jdecode(''),'/38335/index.html','true',[ 
		['PAGE','38348',jdecode('New+Stock+April%2C+2009'),jdecode(''),'/38335/38348.html','true',[],'']
	],''],
	['PAGE','7001',jdecode('About+us'),jdecode(''),'/7001/index.html','true',[ 
		['PAGE','7022',jdecode('The+team'),jdecode(''),'/7001/7022.html','true',[],'']
	],''],
	['PAGE','752',jdecode('Products'),jdecode(''),'/752/index.html','true',[ 
		['PAGE','8601',jdecode('Pavilions+-+Bales+....'),jdecode(''),'/752/8601.html','true',[],''],
		['PAGE','8901',jdecode('Thatching+-+Alang+Alang+....'),jdecode(''),'/752/8901.html','true',[],''],
		['PAGE','17501',jdecode('Carved+stone+statues'),jdecode(''),'/752/17501.html','true',[],''],
		['PAGE','794',jdecode('Carved+Timber+....'),jdecode(''),'/752/794.html','true',[],''],
		['PAGE','836',jdecode('Gift+and+Homewares+....'),jdecode(''),'/752/836.html','true',[],''],
		['PAGE','28801',jdecode('Furniture'),jdecode(''),'/752/28801.html','true',[],''],
		['PAGE','34401',jdecode('Water+feature'),jdecode(''),'/752/34401.html','true',[],'']
	],''],
	['PAGE','857',jdecode('News'),jdecode(''),'/857.html','true',[],''],
	['PAGE','878',jdecode('Info+%26+Contacts'),jdecode(''),'/878/index.html','true',[ 
		['PAGE','899',jdecode('Address+%26+Contact+Details'),jdecode(''),'/878/899.html','true',[],''],
		['PAGE','920',jdecode('How+to+find+us'),jdecode(''),'/878/920.html','true',[],''],
		['PAGE','38357',jdecode('Email+Us'),jdecode(''),'/878/38357.html','true',[],''],
		['PAGE','38366',jdecode('Guestbook'),jdecode(''),'/878/38366.html','true',[],'']
	],'']];
var siteelementCount=19;
theSitetree.topTemplateName='Caribic';
theSitetree.paletteFamily='7050FA';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10579';
theSitetree.graphicsetId='10707';
theSitetree.contentColor='FDFBA6';
theSitetree.contentBGColor='B63636';
var theTemplate={
				name: 			'Caribic',
				paletteFamily: 	'7050FA',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10579',
				graphicsetId: 	'10707',
				contentColor: 	'FDFBA6',
				contentBGColor: 'B63636',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['1501']=webappMappings['1501-874919']={
webappId:    '1501',
documentId:  '701',
internalId:  '874919',
customField: '1501'
};
webappMappings['7060']=webappMappings['7060-6850399a2fc6c7d4bb52f36c1e769eb7']={
webappId:    '7060',
documentId:  '17501',
internalId:  '6850399a2fc6c7d4bb52f36c1e769eb7',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-40ab051177b825050085529bc1470561']={
webappId:    '7060',
documentId:  '28801',
internalId:  '40ab051177b825050085529bc1470561',
customField: 'language:en;country:US;'
};
webappMappings['7060']=webappMappings['7060-de332ba89a44a4f421ec3e81e80fcecf']={
webappId:    '7060',
documentId:  '34401',
internalId:  'de332ba89a44a4f421ec3e81e80fcecf',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20090623-214731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7001',
internalId:  '',
customField: '20070404-001929'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7022',
internalId:  '',
customField: '20070404-002512'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '752',
internalId:  '',
customField: '20070403-211806'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8601',
internalId:  '',
customField: '20070404-023501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8901',
internalId:  '',
customField: '20070404-010115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '17501',
internalId:  '',
customField: '20070419-021648'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '794',
internalId:  '',
customField: '20070402-221709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20070402-221709'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '28801',
internalId:  '',
customField: '20071018-032744'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34401',
internalId:  '',
customField: '20080424-221113'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '857',
internalId:  '',
customField: '20071209-213851'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '878',
internalId:  '',
customField: '20080403-224658'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '899',
internalId:  '',
customField: '20070403-210141'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '920',
internalId:  '',
customField: '20070409-230629'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38335',
internalId:  '',
customField: '20090813-012236'
};
webappMappings['7008']=webappMappings['7008-3257']={
webappId:    '7008',
documentId:  '38357',
internalId:  '3257',
customField: 'language:en;country:US;'
};
webappMappings['1002']=webappMappings['1002-38366ahw050ine7uo']={
webappId:    '1002',
documentId:  '38366',
internalId:  '38366ahw050ine7uo',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38357',
internalId:  '',
customField: '20090512-222931'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38348',
internalId:  '',
customField: '20090514-013101'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '38366',
internalId:  '',
customField: '20090512-222833'
};
var canonHostname = 'wsc-worker02.chi.us.siteprotect.com';
var accountId     = 'AHW050INE7UO';
var companyName   = 'BaliGarden+-+Peace+and+Tranquility';
var htmlTitle	  = 'www.baligarden.com';
var metaKeywords  = 'thatching+balinese+thatching+www.baligarden.com.au+Bali+Garden+Baligarden+';
var metaContents  = 'Bali+Garden+190+Cattai+Ridge+Road+Maraylya+++NSW+++2765+0418203051+5+acres+dedicated+to+Bali.++Only+50+minutes+from+Sydney+along+the+M2.+Monday+to+Friday+9.00am+to+3.00pm+and+Saturday+and+Sunday+9.00am+to+5.00pm.++Balinese+Thatching';
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();
};
