/* [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 theSitetree=[ 
	['PAGE','301',jdecode('RoamingRVHotSpots'),jdecode(''),'/301.html','true',[],''],
	['PAGE','822',jdecode('Products+%26+Plans'),jdecode(''),'/822.html','true',[],''],
	['PAGE','864',jdecode('Contact+Us+for+a+Quote'),jdecode(''),'/864.html','true',[],''],
	['PAGE','10401',jdecode('Create+a+Hot+Spot+FREE+'),jdecode(''),'/10401.html','true',[],''],
	['PAGE','801',jdecode('About+StarBand+%26+us'),jdecode(''),'/801.html','true',[],''],
	['PAGE','5601',jdecode('BLOG+4+nomads+READ+it'),jdecode(''),'/5601.html','true',[],''],
	['PAGE','18201',jdecode('nomadOne.blogspot.com'),jdecode(''),'/18201.html','true',[],''],
	['PAGE','13301',jdecode('AMSOIL+of+New+England'),jdecode(''),'/13301.html','true',[],'']];
var siteelementCount=8;
theSitetree.topTemplateName='Stars';
theSitetree.paletteFamily='3C5284';
theSitetree.keyvisualId='-1';
theSitetree.keyvisualName='keyv.jpg';
theSitetree.fontsetId='10466';
theSitetree.graphicsetId='10913';
theSitetree.contentColor='FFFFFF';
theSitetree.contentBGColor='3C5284';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				name: 			'Stars',
				paletteFamily: 	'3C5284',
				keyvisualId: 	'-1',
				keyvisualName: 	'keyv.jpg',
				fontsetId: 		'10466',
				graphicsetId: 	'10913',
				contentColor: 	'FFFFFF',
				contentBGColor: '3C5284',
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				a_color: 		'3C5284',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'FFFFFF',
				e_color: 		'FFFFFF',
				f_color: 		'FFFFFF',
				hasCustomLogo: 	'false',
				contentFontFace:'Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '301',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '301',
internalId:  '',
customField: '20090210-213452'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '801',
internalId:  '',
customField: '20090205-003920'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '822',
internalId:  '',
customField: '20090205-003553'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '5601',
internalId:  '',
customField: '20090205-004008'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '864',
internalId:  '',
customField: '20090205-003743'
};
webappMappings['1501']=webappMappings['1501-12729600']={
webappId:    '1501',
documentId:  '301',
internalId:  '12729600',
customField: '1501'
};
webappMappings['7008']=webappMappings['7008-9633']={
webappId:    '7008',
documentId:  '864',
internalId:  '9633',
customField: 'language:en;country:US;'
};
webappMappings['7050']=webappMappings['7050-5699']={
webappId:    '7050',
documentId:  '5601',
internalId:  '5699',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '801',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '301',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '13301',
internalId:  '',
customField: '20090205-004247'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '18201',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '10401',
internalId:  '',
customField: '20090205-003833'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '822',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '864',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '5601',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '10401',
internalId:  '',
customField: 'language:en;country:US;'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '18201',
internalId:  '',
customField: '20090205-004055'
};
webappMappings['5001']=webappMappings['5001-']={
webappId:    '5001',
documentId:  '13301',
internalId:  '',
customField: 'language:en;country:US;'
};
var canonHostname = 'cmworker03.yourhostingaccount.com';
var accountId     = 'AENDU0INXLGL';
var companyName   = 'Roaming+RV+Hot+Spots+LLC.+%3CNO+FEES%21%3E';
var htmlTitle	  = 'FREE+Instant+WiFi+Hot+Spot+at+%240+Setup+charge+%240+Monthly+Fees+';
var metaKeywords  = 'starband%2C+nova%2C+nova+1000.+nova+1500%2C+satellite%2C+dish%2C+directv%2C+hughesnet%2C+tripod%2C+internet%2C+motor+home%2C+rv%2C+camping%2C+boondocking%2C+USA%2C+CANADA%2C+MEXICO%2C+training%2C+broadband%2C+wifi%2C+wimax%2C+free%2C+discounts%2C+websites%2C+travel%2C+gifts%2C+mobile%2C+mobility%2C+birdog%2C+meter%2C+resorts%2C+rv+resorts%2C+%24299.99%2C+%2469.99%2C+bandwidth%2C+modem%2C+uploads%2C+downloads%2C+ping%2C+latency%2C+cell+phone%2C+cell+towers%2C+sprint%2C+att%2C+verizon%2C+blackberry%2C+blue+tooth%2C+laptop%2C+wireless%2C+hotspot%2C+hot+spot%2C+wifi+hot+spot%2C+omni%2C+antenna%2C+LNB%2C+blog%2C+blogging%2C+spacenet.+joe+the+plummer%2C+joe+plummer%2C+John+Mccain%2C+Sarah+Palin%2C+Alaska%2C+Oboma%2C+Vote%2C+Acorn%2C+SKYPE%2C+VOIP%2C+%24200+rebate%2C+wifirv%2C+wifi+rv%2C+rvwifi%2C+rv+wifi%2C+roaming+rv+hot+spots+llc%2C+roaming+hot+spots%2C+telecomunication%2C+win%2C+loss%2C+taxes%2C+help%2C+usa%2C+canada%2C+mexico%2C+cable+tv%2C+HD+TV%2C+Campground+membership%2C+free+camping%2C+Instant+Hot+Spot+in-a-box+with+%240+Set+up+charges+and+%240+Monthly+Fees';
var metaContents  = '+Instant+WiFi+Hot+Spot+in-a-box+with+%240+Set+up+charges+and+%240+Monthly+Fees%21+Welcome+to+the+NEW+Roaming+RV+Hot+Spots+LLC+website%21+PLEASE+contact+us+for+SPECIAL+PRICING+on+our+Low+Cost+Portable+Systems%21Introducing+PortableSatellites4Less++StarBand+NOVA+Products...New+Line+of+StarBand+Nova+Satellite+Internet+Services+%E2%80%93+Nova+1000++1500++The+new+line+of+StarBand+Nova+services+%E2%80%93+Nova+1000+and+1500+%E2%80%93+offer+reliable%2C+high+performance%2C+always-on+broadband+satellite+Internet+for+small+office%2Fhome+office+%28SOHO%29+';
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();
};
