/* [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','801',jdecode('Home'),jdecode(''),'/801/index.html','true',[ 
		['PAGE','5901',jdecode('Home+%28follow+up+page%29'),jdecode(''),'/801/5901.html','false',[],'',''],
		['PAGE','13201',jdecode('History'),jdecode(''),'/801/13201.html','true',[],'',''],
		['PAGE','25601',jdecode('The+Team'),jdecode(''),'/801/25601.html','true',[],'',''],
		['PAGE','27801',jdecode('Awards'),jdecode(''),'/801/27801.html','true',[],'','']
	],'',''],
	['PAGE','852',jdecode('Courses'),jdecode(''),'/852/index.html','true',[ 
		['PAGE','12601',jdecode('Diploma'),jdecode(''),'/852/12601.html','true',[],'',''],
		['PAGE','12622',jdecode('Cert+IV'),jdecode(''),'/852/12622.html','true',[],'',''],
		['PAGE','12643',jdecode('Cert+III'),jdecode(''),'/852/12643.html','true',[],'',''],
		['PAGE','12664',jdecode('Cert+II'),jdecode(''),'/852/12664.html','true',[],'',''],
		['PAGE','27843',jdecode('How+to+Enrol'),jdecode(''),'/852/27843.html','true',[],'','']
	],'',''],
	['PAGE','12685',jdecode('Short+Courses'),jdecode(''),'/12685.html','true',[],'',''],
	['PAGE','29701',jdecode('Holiday+Activities'),jdecode(''),'/29701.html','true',[],'',''],
	['PAGE','27822',jdecode('Calendar'),jdecode(''),'/27822.html','true',[],'',''],
	['PAGE','25622',jdecode('Salon'),jdecode(''),'/25622/index.html','true',[ 
		['PAGE','873',jdecode('Treatment+Price+List'),jdecode(''),'/25622/873.html','true',[],'',''],
		['PAGE','25643',jdecode('Products'),jdecode(''),'/25622/25643.html','true',[],'','']
	],'',''],
	['PAGE','25664',jdecode('Contact'),jdecode(''),'/25664/index.html','true',[ 
		['PAGE','27201',jdecode('Contact+%28follow+up+page%29'),jdecode(''),'/25664/27201.html','false',[],'','']
	],'',''],
	['PAGE','34401',jdecode('Legal+Notices'),jdecode(''),'/34401.html','true',[],'','']];
var siteelementCount=20;
theSitetree.topTemplateName='Seifenblase';
theSitetree.paletteFamily='C8E2FF';
theSitetree.keyvisualId='2366';
theSitetree.keyvisualName='krankengymnastik3.jpg';
theSitetree.fontsetId='379';
theSitetree.graphicsetId='427';
theSitetree.contentColor='555555';
theSitetree.contentBGColor='FFFFFF';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Seifenblase',
				paletteFamily: 	'C8E2FF',
				keyvisualId: 	'2366',
				keyvisualName: 	'krankengymnastik3.jpg',
				fontsetId: 		'379',
				graphicsetId: 	'427',
				contentColor: 	'555555',
				contentBGColor: 'FFFFFF',
				a_color: 		'FFFFFF',
				b_color: 		'FFFFFF',
				c_color: 		'FFFFFF',
				d_color: 		'6666CC',
				e_color: 		'3333CC',
				f_color: 		'9999CC',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '801',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-764']={
webappId:    '7008',
documentId:  '25664',
internalId:  '764',
customField: 'language:en;country:US;'
};
webappMappings['1501']=webappMappings['1501-11105340']={
webappId:    '1501',
documentId:  '801',
internalId:  '11105340',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20090111-193930'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '852',
internalId:  '',
customField: '20100302-185115'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12601',
internalId:  '',
customField: '20100302-185603'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12622',
internalId:  '',
customField: '20100302-185618'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12643',
internalId:  '',
customField: '20090203-191831'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12664',
internalId:  '',
customField: '20090203-191731'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '12685',
internalId:  '',
customField: '20091012-180037'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5901',
internalId:  '',
customField: '20070925-010036'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13201',
internalId:  '',
customField: '20081215-223306'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25601',
internalId:  '',
customField: '20080527-003939'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27801',
internalId:  '',
customField: '20081215-223017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27843',
internalId:  '',
customField: '20080109-184646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '29701',
internalId:  '',
customField: '20100105-041734'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27822',
internalId:  '',
customField: '20091012-180739'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25622',
internalId:  '',
customField: '20080706-181246'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '873',
internalId:  '',
customField: '20091012-175854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25643',
internalId:  '',
customField: '20071208-000017'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '25664',
internalId:  '',
customField: '20071208-000614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '27201',
internalId:  '',
customField: '20071208-000431'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '34401',
internalId:  '',
customField: '20081215-223759'
};
webappMappings['7008']=webappMappings['7008-763']={
webappId:    '7008',
documentId:  '801',
internalId:  '763',
customField: 'language:en;country:US;'
};
var canonHostname = 'wscwrk01.ehost-services.com';
var accountId     = 'AEN010IN3FMY';
var companyName   = 'Gr%C3%A9+College+for+Scientific+Beauty+Culture';
var htmlTitle	  = 'Beauty+Therapy+Training+and+Courses%2C+The+Gre+College%2C+Sydney';
var metaKeywords  = 'College+Beauty+Therapy+eckstein+kosmetik+accredited+training+train+salon+course+certificate+diploma+professional+galyer+qualification+gre+kogarah+sydney';
var metaContents  = 'Accredited+training+in+Beauty+Therapy+located+in+Kogarah%2C+Sydney.++Diploma%2C+Certificate+and+short+courses+available.';
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();
};
