/* [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','3901',jdecode('Home'),jdecode(''), jdecode('%2F3901.html'), 'true',[],'',''],
	['PAGE','3952',jdecode('+2012+Expo+Dates'),jdecode(''), jdecode('%2F3952.html'), 'true',[],'',''],
	['PAGE','3973',jdecode('Programme+for+Show'),jdecode(''), jdecode('%2F3973.html'), 'true',[],'',''],
	['PAGE','8701',jdecode('Stallholder+Contract+FORM'),jdecode(''), jdecode('%2F8701.html'), 'true',[],'',''],
	['PAGE','4057',jdecode('NEW+AGE+BOOKSHOP'),jdecode(''), jdecode('%2F4057.html'), 'true',[],'',''],
	['PAGE','3994',jdecode('BOOK+A+PSYCHIC+READING'),jdecode(''), jdecode('%2F3994.html'), 'true',[],'',''],
	['PAGE','4015',jdecode('Advertising'),jdecode(''), jdecode('%2F4015.html'), 'true',[],'',''],
	['PAGE','4036',jdecode('Directory'),jdecode(''), jdecode('%2F4036.html'), 'true',[],'',''],
	['PAGE','21629',jdecode('Contact'),jdecode(''), jdecode('%2F21629.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Stars';
theSitetree.paletteFamily='3C5284';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10510';
theSitetree.graphicsetId='10913';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3C5284';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'fatcow',
  product: 'WSCSYSSSSLY0XRNC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Stars',
				paletteFamily: 	'3C5284',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10510',
				graphicsetId: 	'10913',
				contentColor: 	'FFFFFF',
				contentBGColor: '3C5284',
				a_color: 		'3C5284',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '3901',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3901',
internalId:  '',
customField: '20120201-070350'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3952',
internalId:  '',
customField: '20120110-170610'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3973',
internalId:  '',
customField: '20120201-071645'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8701',
internalId:  '',
customField: '20120110-171034'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '21629',
internalId:  '',
customField: '20110322-173109'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '3901',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '3994',
internalId:  '',
customField: '20110831-015713'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4015',
internalId:  '',
customField: '20100623-071419'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4036',
internalId:  '',
customField: '20090106-212455'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '4057',
internalId:  '',
customField: '20110120-165848'
};
webappMappings['7008']=webappMappings['7008-28240']={
webappId:    '7008',
documentId:  '21629',
internalId:  '28240',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '3952',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '3973',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '8701',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4057',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '3994',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4015',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '4036',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '21629',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-36912130']={
webappId:    '1501',
documentId:  '3901',
internalId:  '36912130',
customField: '1501'
};
var webAppHostname = 'cgiwsc.enhancedsitebuilder.com:80';
var canonHostname = 'cmworker01.yourhostingaccount.com';
var accountId     = 'AENDU0INEE9P';
var companyName   = 'Welcome+to+UNIVERSAL+INSIGHTS+EXPOS';
var htmlTitle	  = 'UNIVERSAL+INSIGHTS%3A+Victoria%27s+Longest+Running+NEW+AGE+Healing+%26+Psychic+EXPO%21';
var metaKeywords  = 'new+age%2C+healing%2C++psychic%2C+expo%2C+melbourne%2C+ringwood%2C+australia%2C+cowes%2C+wonthaggi%2C+bendigo%2C+geelong%2C+warragul%2C+Geomancy%2C+Sick+Building+Syndrome%2C+Feng+Shui%2C+Candle%2C+Magick%2C+Rituals%2C+wiccan%2C+Invoking+the+Light%2C+Connecting+with+Angels%2C+Heal+Your+Life%2C+massage%2C+Reiki%2C+Bowen+Therapy%2C+Emmett+Technique%2C+Shiatsu%2C+professional%2C+therapists%2C+therapy%2C+medium%2C+mediums%2C+messages%2C+spiritual+groups+offering+free+counselling%2C+kundalini+raising%2C+stress+tests%2C+tarot%2C+astrology%2C+numerology%2C+crystal+ball%2C+psychometry+and+mediumship%2C+visionary%2C+artist%2C++Aura%2C+Aura+Photography%2C+Full+Body+Image%2C+spirit+guide+drawing%2C+demonstrations%2C+workshops%2C+lectures%2C+entertainment%2C+belly+dancing%2C++Heal+Your+Life+techniques%2C+Louise+Hay%2C+teachings%2C+Native+American%2C+Drum+Healing%2C+Shamanic+Healing%2C+Meditations%2C+Spiritual%2C+groups%2C+professional%2C+therapists%2C+healers%2C+talented.+';
var metaContents  = 'Universal+Insights+is+a+new+age+healing+and+psychic+expo+based+in+Melbourne%2C+Australia.+We+offer+a+monthly+expo+which+travels+to+venues+all+over+Victoria.+At+the+expo%2C+you+can+enjoy+a+leisurely+browse+through+a+range+of+stalls+offering+unique+products+such+as+crystals%2C+salt+lamps%2C+alternatively+health+products%2C+goji+juice%2C+xango+juice+and+noni+juice%2C+jewellery%2C+candles%2C+incense+and+wiccan+products.+There+are+a+number+of+spiritual+groups+offering+free+counselling%2C+kundalini+raising%2C+stress+tests+and+more.+There+are+also+massage+therapists%2C+alternative+healing+professionals+such+as+Reiki%2C+Bowen+Therapy%2C+Emmett+Technique%2C+Shiatsu+and+others.+All+treatments+are+offered+at+show+prices+with+discounts+on+normal+treatments.+Then+there+are+more+than+fifteen+psychics+and+mediums+to+choose+a+reading+from%21+They+use+tarot%2C+astrology%2C+numerology%2C+crystal+ball%2C+psychometry+and+mediumship+to+access+information+for+their+readings.+There+is+a+free%2C+all+day%2C+workshop+programme+which+runs+from+10am+to+5pm+and+includes+guest+speakers+as+well+as+Mediums+at+Midday+and+3pm.+The+mediums+give+live+demonstrations+and+provide+evidence+of+survival+in+the+afterlife+and+messages+from+beyond.+You+can+have+your+Aura+Photographed%2C+or+a+Full+Body+Image+or+have+your+spirit+guide+drawn+by+our+Visionary+Artists.+There+are+also+workshops+on+Geomancy%2C+Sick+Building+Syndrome%2C+Feng+Shui%2C+Candle+Magick%2C+Rituals%2C+Invoking+the+Light%2C+Connecting+with+Angels%2C+Heal+Your+Life+techniques+based+on+Louise+Hay%27s+teachings%2C+Native+American+Drum+Healing%2C+Shamanic+Healing%2C+Meditations+and+much+more.+Enjoy+a+day+out+and+give+yourself+some+TLC+and+personal+time%21';
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();
};

