/* [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','701',jdecode('Home'),jdecode(''),'/701.html','true',[],'',''],
	['PAGE','836',jdecode('Show+Room'),jdecode(''),'/836.html','true',[],'',''],
	['PAGE','857',jdecode('Contact+Us'),jdecode(''),'/857.html','true',[],'','']];
var siteelementCount=3;
theSitetree.topTemplateName='Vienna';
theSitetree.paletteFamily='D6D2C5';
theSitetree.keyvisualId='11880';
theSitetree.keyvisualName='kv_11880.jpg';
theSitetree.fontsetId='33187';
theSitetree.graphicsetId='14088';
theSitetree.contentColor='696146';
theSitetree.contentBGColor='ebe8df';
var localeDef={
  language: 'en',
  country: 'US'
};
var theTemplate={
				hasFlashNavigation: 'false',
				hasFlashLogo: 	'false',
				hasFlashCompanyname: 'false',
				hasFlashElements: 'false',
				hasCompanyname: 'false',
				name: 			'Vienna',
				paletteFamily: 	'D6D2C5',
				keyvisualId: 	'11880',
				keyvisualName: 	'kv_11880.jpg',
				fontsetId: 		'33187',
				graphicsetId: 	'14088',
				contentColor: 	'696146',
				contentBGColor: 'ebe8df',
				a_color: 		'EBE8DF',
				b_color: 		'000000',
				c_color: 		'000000',
				d_color: 		'000000',
				e_color: 		'000000',
				f_color: 		'000000',
				hasCustomLogo: 	'true',
				contentFontFace:'Verdana, Arial, Helvetica, sans-serif',
				contentFontSize:'12',
				useFavicon:     'true'
			  };
var webappMappings = {};
webappMappings['1006']=webappMappings['1006-1006']={
webappId:    '1006',
documentId:  '701',
internalId:  '1006',
customField: '1006'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '701',
internalId:  '',
customField: '20100526-193646'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '836',
internalId:  '',
customField: '20100525-202013'
};
webappMappings['5000']=webappMappings['5000-']={
webappId:    '5000',
documentId:  '857',
internalId:  '',
customField: '20100525-202035'
};
var canonHostname = 'diywk00.verio.stngva01.us.diy-servers.net';
var accountId     = 'AVEC10INV56E';
var companyName   = 'FJP+Signature+Limousine+LLC.';
var htmlTitle	  = 'FJP+Signature+Limousine+LLC.';
var metaKeywords  = 'limo%2Climos%2Ccar+service%2Cstretches%2Cexcursion%2Cweddings%2Cproms%2Cspecial+events%2Cnight+on+the+town%2Cflemington%2Cnew+jersey%2Cflemington+nj%2Chunterdon+county%2Chunterdon+county+nj%2Cwhitehouse%2Cwhitehouse+nj%2Ctewksbury+nj%2Cbridgewater+nj%2Csomerville+nj%2Ccalifon+nj%2Cthree+bridges+nj%2Cmiddlesex+county+nj%2Cclinton+nj%2Cannandale+nj%2C+bloomsbury+nj%2Cchester+nj%2C+frenchtown+nj%2Cglen+gardner+nj%2Champton+nj%2Chigh+bridge+nj%2Chopewell+nj%2Clambertville+nj%2Clebanon+nj%2Clong+valley+nj%2Cmilford+nj%2Cwarren+county+nj%2Coldwick+nj%2Cstockton+nj%2C+surrounding+areas+nj%2Clocal+nj%2Cbranchburg+nj%2Cprinceton+nj%2Cairport%2Cnewark+airport%2CJFK+airport%2CKennedy+airport%2CLaguardia+airport%2Cphiladelphia+airport%2Cphilly+airport%2Cstadiums%2Cconcerts%2Canniversary%2Canniversaries%2Cbirthday%2Csweet+16%2C6+passenger+stretch%2C6pax+limo%2C8+passenger+stretch%2C8pax+limo%2C+10+passenger+stretch%2C10pax+limo%2CSUV%2CSUV+stretch%2Cexotic+vehicles%2Clincoln+towncar%2Cvans%2Clarge+passenger+vans%2C14+passenger+van%2C14pax+van%2C6+passenger+van%2C6pax+van%2C8+passenger+van%2C8pax+van%2CNY%2CNew+York+City%2CNew+York%2CPA%2CNJ%2CManhattan%2CFJP+Signature+Limousine+Service%2Climo+service%2CFJP+Limo%2Climousine+service%2Climousine+rentals%2Cwedding+services%2Cparty+planning%2Caffordable+limousine+service%2Ccar+service%2Ccorporate+travel%2CNavigator+limo%2Clocal+limo+service%2Ccentral+jersey%2Climo+service+hunterdon+county%2Climo+service+warren+county%2Climo+service+middlesex+county%2Cbride%2Cgroom%2Cbridemaid%2Cgroomsmen%2Cmaid+of+honor%2Cbest+man%2Crolls+royce+weddings+limousine%2Cclassic+cars%2CSUV+limousines%2C4X4%2Cparty+bus%2Cluxury+limousine%2Climo+bus%2Cmini+bus+airports%2Cpiers%2CAtlantic+city%2Cnyc%2Ctransportation+corporate+car+service%2Con+time+service%2Cdiscounts+wedding+fridays%2Cdiscounts+wedding+sundays%2Creception%2Csunday+discount+banquet+hall%2C+hotel%2Ctuxedos%2Cwedding+gowns%2Cwedding+cakes%2Cflorist%2Cphotographers%2Ccar+service%2Cvan+service%2Climo+service%2Cprom+limo%2Celegant+chauffeur%2Cchauffeur%2Cchauffeurs%2Cblack+tie%2Cprofessional+service%2Clivery%2Clong+island%2CLGA%2CEWR%2CHummer+stretch%2Cfunerals%2Cexcalibur%2Cshuttles%2Cairport+trans%2Cairport+shuttle%2Cground+transportation%2Cparties%2Cgirls+night+out%2Cguys+night+out%2Cfancy+limo%2Cwhite+vehicles%2Cexcellent+service%2Cexperienced+limo%2Cexperienced+chauffeur%2Cred+carpet+events%2Cred+carpet%2Ctransportation%2Chigh+school+prom%2Cjunior+prom%2Csenior+prom%2Cprom+dresses%2Ctravel+agents%2Cvacation%2Cleisure%2Cride%2Cairport+rides%2C';
var metaContents  = 'FJP+Signature+Limousine+specializing+in+Wedding%2CProms%2CAll+Special+Events+and+Airport+Service.+We+are+a+professional+Limousine+Company+committed+to+being+on-time+ALL+THE+TIME';
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();
};
