/* [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','6201',jdecode('Home+%26+News+'),jdecode(''), jdecode('%2F6201.html'), 'true',[],'',''],
	['PAGE','6252',jdecode('Bellydancer+Yurie'),jdecode(''), jdecode('%2F6252.html'), 'true',[],'',''],
	['PAGE','6294',jdecode('Beginners+Classes+%28Chch%29'),jdecode(''), jdecode('%2F6294.html'), 'true',[],'',''],
	['PAGE','55612',jdecode('Intermediate+%26+Advanced+Classes%28Chch%29'),jdecode(''), jdecode('%2F55612.html'), 'true',[],'',''],
	['PAGE','6378',jdecode('Rangiora+Bellydance+Classes'),jdecode(''), jdecode('%2F6378.html'), 'true',[],'',''],
	['PAGE','6336',jdecode('Timetable%2C+Fees+%26+Enrolment'),jdecode(''), jdecode('%2F6336.html'), 'true',[],'',''],
	['PAGE','8401',jdecode('Tuitions+%26+Workshops'),jdecode(''), jdecode('%2F8401.html'), 'true',[],'',''],
	['PAGE','6273',jdecode('Bellydance+Entertainment+'),jdecode(''), jdecode('%2F6273.html'), 'true',[],'',''],
	['PAGE','6357',jdecode('Photo+Gallery'),jdecode(''), jdecode('%2F6357.html'), 'true',[],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Inspiration';
theSitetree.paletteFamily='CCCC99';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='103';
theSitetree.graphicsetId='120';
theSitetree.contentColor='464646';
theSitetree.contentBGColor='CCCC99';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp32-tnz',
  product: 'WSCVWLSSSLYTC2IW'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Inspiration',
				paletteFamily: 	'CCCC99',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'103',
				graphicsetId: 	'120',
				contentColor: 	'464646',
				contentBGColor: 'CCCC99',
				a_color: 		'CCCC99',
				b_color: 		'99667A',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6201',
internalId:  '',
customField: '20120118-191331'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6252',
internalId:  '',
customField: '20111121-193649'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6273',
internalId:  '',
customField: '20111121-191948'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6294',
internalId:  '',
customField: '20120118-191757'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '55612',
internalId:  '',
customField: '20111121-185959'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6378',
internalId:  '',
customField: '20111121-190224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6336',
internalId:  '',
customField: '20120118-192638'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6357',
internalId:  '',
customField: '20110921-185614'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '8401',
internalId:  '',
customField: '20120124-194333'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVFL30INH5TY';
var companyName   = 'Bellydancer+Yurie+%26+El+Yasmine+Bellydance+';
var htmlTitle	  = 'Bellydancer+Yurie';
var metaKeywords  = 'bellydance%2C+belly+dance%2C+hens+night%2C+birthday+party%2C+entertainment%2C+entertainer%2C+perfromance%2C+party%2C+conference%2C+event%2C+Arabic+theme%2C+Oriental%2C+Oriental+dance%2C+Middle+Eastern%2C+Egypt%2C+cultural+dance%2C+handmade+bellydance+costume%2C+bellydancing%2C+Meddel+Eastern+folkloric+dance%2C+belly+dance+costume+maker%2CHand+made+belly+dance+costume%2C+Hand+made+belly+dance+costume+blog%2C+bellydance+%2Ccostume+blog%2C+Egyptian%2C+Hawaiian+Hula%2C+Christchurch+bellydancer%2C+Japanese+bellydancer%2C+bellydance+teacher%2C+belly+dance+tutor%2C+Culture+Galore%2C+community+event%2C+Middle+Eastern+folkloric+dancer%2C+Yurie%2C+Japan%2C+Japanese%2C+Yuries+bellydance+blog%2C+Oriental+dancer';
var metaContents  = 'Christchuch+based+bellydancer+Yuries+website.+Bellydancer+Yurie+provides+bellydance+entertainment+%2F+performance+for+Hens+Nights%2C+Birthday+parties%2C+private+and+business+functions%2C+conference+and+events.';
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();
};

