/* [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','6101',jdecode('Home'),jdecode(''), jdecode('%2F6101.html'), 'true',[],'',''],
	['PAGE','6152',jdecode('About+Us'),jdecode(''), jdecode('%2F6152%2Findex.html'), 'true',[ 
		['PAGE','6446',jdecode('Testimonials'),jdecode(''), jdecode('%2F6152%2F6446.html'), 'true',[],'','']
	],'',''],
	['PAGE','39201',jdecode('Book+a+Trip%21'),jdecode(''), jdecode('%2F39201.html'), 'true',[],'',''],
	['PAGE','87923',jdecode('Book+AMSTAR+Excursions%21'),jdecode(''), jdecode('%2F87923.html'), 'true',[],'',''],
	['PAGE','6173',jdecode('Cruises'),jdecode(''), jdecode('%2F6173.html'), 'true',[],'',''],
	['PAGE','6236',jdecode('Destination+Weddings'),jdecode(''), jdecode('%2F6236%2Findex.html'), 'true',[ 
		['PAGE','60601',jdecode('Honeymoon+Registry'),jdecode(''), jdecode('%2F6236%2F60601.html'), 'true',[],'','']
	],'',''],
	['PAGE','6194',jdecode('Disney'),jdecode(''), jdecode('%2F6194.html'), 'true',[],'',''],
	['PAGE','6215',jdecode('Groups'),jdecode(''), jdecode('%2F6215.html'), 'true',[],'',''],
	['PAGE','6257',jdecode('Hot+Deals'),jdecode(''), jdecode('%2F6257.html'), 'true',[],'',''],
	['PAGE','45301',jdecode('Insurance'),jdecode(''), jdecode('%2F45301.html'), 'true',[],'',''],
	['PAGE','6425',jdecode('Photo+Album'),jdecode(''), jdecode('%2F6425.html'), 'true',[],'',''],
	['PAGE','6362',jdecode('Shoretrips+Excursions'),jdecode(''), jdecode('%2F6362.html'), 'true',[],'',''],
	['PAGE','6383',jdecode('Singles+Travel'),jdecode(''), jdecode('%2F6383.html'), 'true',[],'',''],
	['PAGE','6467',jdecode('Contact+Us'),jdecode(''), jdecode('%2F6467.html'), 'true',[],'',''],
	['PAGE','96834',jdecode('Join+Our+Mailing+List%21'),jdecode(''), jdecode('%2F96834.html'), 'true',[],'','']];
var siteelementCount=17;
theSitetree.topTemplateName='Nebula';
theSitetree.paletteFamily='245298';
theSitetree.keyvisualId='8806';
theSitetree.keyvisualName='kv_8806.jpg';
theSitetree.fontsetId='17095';
theSitetree.graphicsetId='12475';
theSitetree.contentColor='000000';
theSitetree.contentBGColor='6D93CC';
var localeDef={
  language: 'en',
  country: 'US'
};
var prodDef={
  wl_name: 'grp35-attweb',
  product: 'WSCSYSSSSLY0X9RC'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Nebula',
				paletteFamily: 	'245298',
				keyvisualId: 	'8806',
				keyvisualName: 	'kv_8806.jpg',
				fontsetId: 		'17095',
				graphicsetId: 	'12475',
				contentColor: 	'000000',
				contentBGColor: '6D93CC',
				a_color: 		'000000',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6101',
internalId:  '',
customField: '20120202-151027'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6152',
internalId:  '',
customField: '20120207-132031'
};
webappMappings['1501']=webappMappings['1501-5492746']={
webappId:    '1501',
documentId:  '6101',
internalId:  '5492746',
customField: '1501'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6173',
internalId:  '',
customField: '20120214-152346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6194',
internalId:  '',
customField: '20120105-181224'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6215',
internalId:  '',
customField: '20120214-144059'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6236',
internalId:  '',
customField: '20110630-153346'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6257',
internalId:  '',
customField: '20120214-143347'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '45301',
internalId:  '',
customField: '20110705-122139'
};
webappMappings['7008']=webappMappings['7008-21192']={
webappId:    '7008',
documentId:  '60601',
internalId:  '21192',
customField: 'language:en;country:US;'
};
webappMappings['7008']=webappMappings['7008-25138']={
webappId:    '7008',
documentId:  '96834',
internalId:  '25138',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6362',
internalId:  '',
customField: '20110922-161120'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6383',
internalId:  '',
customField: '20110705-120923'
};
webappMappings['7060']=webappMappings['7060-a5fb13c6a1181493d03e362cae65df0d']={
webappId:    '7060',
documentId:  '6425',
internalId:  'a5fb13c6a1181493d03e362cae65df0d',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6425',
internalId:  '',
customField: '20101028-135328'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6446',
internalId:  '',
customField: '20101102-122909'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '6467',
internalId:  '',
customField: '20110721-131038'
};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '6101',
internalId:  '1006',
customField: '1006'
};
webappMappings['7008']=webappMappings['7008-19969']={
webappId:    '7008',
documentId:  '6467',
internalId:  '19969',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '87923',
internalId:  '',
customField: '20110922-152510'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '39201',
internalId:  '',
customField: '20120214-152114'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '60601',
internalId:  '',
customField: '20101118-154441'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '96834',
internalId:  '',
customField: '20110621-142010'
};
var webAppHostname = 'diycgi.cluster.stngva01.us.diy-servers.net:80';
var canonHostname = 'diywk01.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVF340I7CZHV';
var companyName   = '%28847%29+639-3300+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++9+Jandus+Road++Cary++IL++60013';
var htmlTitle	  = 'Cary+Travel+Express';
var metaKeywords  = 'Cary+travel+agent%2C+travel%2C+travel+deals%2C+cruises%2C+trips%2C+vacations%2C+getaways%2C+discount+travel%2C+hotels%2C+vacation+specials%2C+vacation+deals%2C+honeymoon+trips%2C+destination+weddings%2C+skiing%2C+sports+events%2C+tours%2C+wine+tours%2C+weekend+deals%2C+group+travel%2C+group+travel+deals%2C+Europe%2C+Disney%2C+Disney+deals%2C+Mexico%2C+Apple+Vacations%2C+Carnival+Cruises%2C+Cancun%2C+Riviera+Maya%2C+Princess+Cruises%2C+Royal+Caribbean+Cruises%2C+Caribbean%2C+Hawaii%2C+England%2C+Ireland%2C+France%2C+River+Cruises%2C+China%2C+Jamaica%2C+Punta+Cana%2C+Las+Vegas%2C+Florida%2C+Alaska%2C+Alaskan+Cruise%2C+International+travel%2C+family+vacations%2C+California+wine+tours%2C+Neelie+Kruse%2C+Margaret+Skoulund%2C+vacation+packages%2C+Funjet+Vacations%2C+GoGo%2C+Globus+Tours%2C+Classic+Vacations%2C+Celebrity+Cruises%2C+Azamara+Cruises%2C+Cary+Travel+Express%2C++Cary+Travel%2C+Norwegian+Cruise+Line%2C+hot+travel+deals%2C+destination+wedding+specialists%2C+Secrets%2C+Dreams%2C+Huatulco%2C+';
var metaContents  = '';
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();
};

