/* [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','1501',jdecode('Home'),jdecode(''),'/1501.html','true',[],'',''],
	['PAGE','1552',jdecode('Travel+offers'),jdecode(''),'/1552.html','true',[],'',''],
	['PAGE','1594',jdecode('Service'),jdecode(''),'/1594/index.html','true',[ 
		['PAGE','1615',jdecode('Rental+Car-+Discount+rental+codes+for+the+lowest+cost+car+rental'),jdecode(''),'/1594/1615.html','true',[],'','']
	],'',''],
	['PAGE','1657',jdecode('Online+request+email+actsone%40hawaiiantel.net'),jdecode(''),'/1657.html','true',[],'',''],
	['PAGE','1678',jdecode('Contact+actsone%40hawaiiantel.net+or+fax+808-874-6415+or+phone+808-298-4282'),jdecode(''),'/1678.html','true',[],'',''],
	['PAGE','1699',jdecode('Terms+%26+conditions-Visa+and+MasterCard+accepted'),jdecode(''),'/1699.html','true',[],'',''],
	['PAGE','1720',jdecode('About+us'),jdecode(''),'/1720/index.html','true',[ 
		['PAGE','1741',jdecode('How+to+find+us-Telephone%2C+Fax+or+Email'),jdecode(''),'/1720/1741.html','true',[],'','']
	],'',''],
	['PAGE','1762',jdecode('Contact'),jdecode(''),'/1762/index.html','true',[ 
		['PAGE','1783',jdecode('Adresses'),jdecode(''),'/1762/1783.html','true',[],'','']
	],'','']];
var siteelementCount=11;
theSitetree.topTemplateName='Metal';
theSitetree.paletteFamily='A3CAFE';
theSitetree.keyvisualId='768';
theSitetree.keyvisualName='panne.jpg';
theSitetree.fontsetId='145';
theSitetree.graphicsetId='161';
theSitetree.contentColor='A3CAFE';
theSitetree.contentBGColor='000000';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Metal',
				paletteFamily: 	'A3CAFE',
				keyvisualId: 	'768',
				keyvisualName: 	'panne.jpg',
				fontsetId: 		'145',
				graphicsetId: 	'161',
				contentColor: 	'A3CAFE',
				contentBGColor: '000000',
				a_color: 		'A3CAFE',
				b_color: 		'87A7D2',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'false'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '1501',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1501',
internalId:  '',
customField: '20100610-202938'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1594',
internalId:  '',
customField: '20071123-134922'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1615',
internalId:  '',
customField: '20071123-135057'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1552',
internalId:  '',
customField: '20100610-210301'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1657',
internalId:  '',
customField: '20071123-135558'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1678',
internalId:  '',
customField: '20070108-171854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1699',
internalId:  '',
customField: '20071123-135758'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1720',
internalId:  '',
customField: '20071123-140003'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1741',
internalId:  '',
customField: '20070108-171854'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1762',
internalId:  '',
customField: '20071123-140144'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '1783',
internalId:  '',
customField: '20070108-171854'
};
var canonHostname = 'wsc-worker01.chi.us.siteprotect.com';
var accountId     = 'AHW050INEAI4';
var companyName   = 'ACTS+ONE+TRAVEL';
var htmlTitle	  = 'Hawaii%2C+TRAVEL+AGENCY-AIR%2C+TRANSPORTATION%2C+HOTEL%2C+VACATION+RENTAL%2C+KIHEI%2C+MAUI%2C+HAWAII+DISCOUNT';
var metaKeywords  = 'HAWAII+TRAVEL%2C+MAUI+VACATIONS%2C+KIHEI+VACATION+RENTALS%2C+ALAMO+CAR+RENTAL%2C+DISCOUNT+CAR+RENTAL%2C+KIHEI+HOTELS%2C+MAUI+HOTELS%2C+MAUI+ACCOMODATIONS%2C+MAUI+BED+AND+BREAKFAST%2C+DISCOUNT+MAUI+TRAVEL%2C+GO+AIRLINES%2C+HAWAIIAN+AIRLINES%2C+ALOHA+AIRLINES%2C+PEARL+HARBOR%2C+SNORKELING%2C+WHALE+WATCHING%2C+DISCOUNT+AIR+TO+HAWAII';
var metaContents  = 'Hawaii+vacation+rentals';
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();
};
