/* [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','501',jdecode('Home'),jdecode(''),'/501.html','true',[],'',''],
	['PAGE','6601',jdecode('Apartment+R1'),jdecode(''),'/6601.html','true',[],'',''],
	['PAGE','7101',jdecode('+Location+'),jdecode(''),'/7101.html','true',[],'',''],
	['PAGE','9301',jdecode('Facilities'),jdecode(''),'/9301.html','true',[],'',''],
	['PAGE','9322',jdecode('Activities+'),jdecode(''),'/9322.html','true',[],'',''],
	['PAGE','9343',jdecode('Contact+Us'),jdecode(''),'/9343.html','true',[],'',''],
	['PAGE','18801',jdecode('Book+your+flight'),jdecode(''),'/18801.html','true',[],'',''],
	['PAGE','11806',jdecode('Guestbook'),jdecode(''),'/11806/index.html','true',[ 
		['PAGE','11801',jdecode('Read+Guestbook'),jdecode(''),'/11806/11801.html','false',[],'','']
	],'','']];
var siteelementCount=9;
theSitetree.topTemplateName='Occasions';
theSitetree.paletteFamily='1752B4';
theSitetree.keyvisualId='6662';
theSitetree.keyvisualName='kv_6662.jpg';
theSitetree.fontsetId='11192';
theSitetree.graphicsetId='12002';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='1752B4';
var localeDef={
  language: 'en',
  country: 'GB'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Occasions',
				paletteFamily: 	'1752B4',
				keyvisualId: 	'6662',
				keyvisualName: 	'kv_6662.jpg',
				fontsetId: 		'11192',
				graphicsetId: 	'12002',
				contentColor: 	'FFFFFF',
				contentBGColor: '1752B4',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '501',
internalId:  '',
customField: '20080106-174753'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6601',
internalId:  '',
customField: '20080109-232411'
};
webappMappings['1002']=webappMappings['1002-11806anbt10in27uk']={
webappId:    '1002',
documentId:  '11806',
internalId:  '11806anbt10in27uk',
customField: 'icq=false'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '7101',
internalId:  '',
customField: '20080109-231111'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18801',
internalId:  '',
customField: '20080111-224045'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9301',
internalId:  '',
customField: '20080109-234059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9322',
internalId:  '',
customField: '20080106-173121'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '9343',
internalId:  '',
customField: '20080106-164103'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11806',
internalId:  '',
customField: '20080106-173231'
};
webappMappings['7008']=webappMappings['7008-7845']={
webappId:    '7008',
documentId:  '9343',
internalId:  '7845',
customField: 'language:en;country:GB;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '11801',
internalId:  '',
customField: '20080106-155359'
};
var canonHostname = 'coucm4all01.netbenefit.co.uk';
var accountId     = 'ANBT10IN27UK';
var companyName   = 'Nicholas+Gardens+Apartments';
var htmlTitle	  = 'St+Nicholas+Gardens+Aartments+Hisaronu+Turkey';
var metaKeywords  = 'Hisaronu%2CTurkey%2C2+bed+apartment%2CFamily+holiday%2Capartment%2CTurkish+baths%2CTurkey+holidays%2COlu+Deniz%2CDalaman%2CFethiye%2CNicholas%2CNicholas+Gardens%2CGap+bar%2CTime+out%2CBarrumba%2CRobin+hood%2Chisaronu+hotel%2Cholidays+to+hisaronu%2Capartments+for+rent+hisaronu+turkey%2Chisaronu+online%2Chisaronu+turkey+holiday%2Cturkey+hisaronu+hotels%2Choliday+accommodation+hisaronu%2Caccommodation+hisaronu%2Choliday+activities+hisaronu+turkey%2Choliday+activities+hisaronu%2Choliday+accommodation+hisaronu+turkey%2Chisaronu+turkey%2Cvillas+for+rent%2C+hisaronu%2Capartments+for+rent+hisaronu%2Cturkey+hotel+apartments%2Cturkey+holiday+apartments%2Cluxury+apartments+turkey%2Crent+apartment+turkey%2Capartments+to+rent+in+turkey%2Cprivate+holiday+apartment+turkey%2Cturkey+hotel+apartment+photos%2Cvillas+and+apartments+in+turkey%2Cbargain+holidays+turkey%2Cturkey+holidays+special+offers%2Cturkey+holiday+rentals%2Choliday+homes+turkey%2C+www.turkey-hisaronu.co.uk';
var metaContents  = 'This+privately+owned+two+bedroom+apartment+is+in+a+block+of+6%2C+and+is+situated+in+the+grounds+of++the+ever+popular+St+Nicholas+Gardens+Complex.+Located+250+meters+from+the+centre+of+Hisaronu.++++++*+sleeps+up+to+6+people+++++*+has+a+well+equiped+kitchen+++++*+a+modern+bathroom+++++*+private+balcony+that+overlooks+the+communal+pool+and+baby+pool+++++*+steps+down+to+poolside+from+the+balcony+++++*+safety+deposit+box+situated+in+master+bedroom+++++*+air+conditioning+in+matser+bedroom%2C+second+bedroom+and+living%2Fkitchen+area';
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();
};

