amtrak 2.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -0
  3. data/README.markdown +184 -2
  4. data/amtrak.gemspec +3 -4
  5. data/lib/amtrak.rb +2 -3
  6. data/lib/amtrak/train_fetcher.rb +25 -28
  7. data/lib/amtrak/train_parser.rb +30 -86
  8. data/lib/amtrak/version.rb +1 -1
  9. data/spec/amtrak/train_fetcher_spec.rb +26 -22
  10. data/spec/amtrak/train_parser_spec.rb +8 -64
  11. data/spec/amtrak_spec.rb +1 -2
  12. data/spec/fixtures/json/_get.json +223 -28
  13. data/spec/fixtures/json/_parse.json +211 -42
  14. data/spec/fixtures/json/pvd_to_bby.json +1131 -0
  15. data/spec/fixtures/vcr/Amtrak/_get/returns_a_list_of_train_times.yml +1160 -1250
  16. data/spec/fixtures/vcr/Amtrak_TrainFetcher/_get/does_the_same_as_get.yml +1159 -1628
  17. data/spec/fixtures/vcr/Amtrak_TrainFetcher/_get/given_a_valid_date_and_invalid_train_stations/does_not_include_various_keys_and_includes_an_error.yml +66 -0
  18. data/spec/fixtures/vcr/Amtrak_TrainFetcher/_get/given_a_valid_date_and_train_stations/includes_various_keys.yml +1181 -0
  19. data/spec/fixtures/vcr/Amtrak_TrainFetcher/_get/given_an_invalid_date_and_valid_train_stations/does_not_include_various_keys_and_includes_an_error.yml +66 -0
  20. metadata +22 -54
  21. data/lib/amtrak/train_fetcher/main_page.rb +0 -83
  22. data/lib/amtrak/train_fetcher/train_page.rb +0 -52
  23. data/spec/amtrak/train_fetcher/main_page_spec.rb +0 -53
  24. data/spec/amtrak/train_fetcher/train_page_spec.rb +0 -18
  25. data/spec/fixtures/html/pvd_to_bby.html +0 -2596
  26. data/spec/fixtures/html/pvd_to_bby_cancelled.html +0 -2671
  27. data/spec/fixtures/json/_parse_cancelled.json +0 -132
  28. data/spec/fixtures/vcr/Amtrak_TrainFetcher/_get/given_a_valid_date_and_invalid_train_stations/does_not_include_various_classes_and_includes_an_error.yml +0 -1073
  29. data/spec/fixtures/vcr/Amtrak_TrainFetcher/_get/given_a_valid_date_and_train_stations/includes_various_classes.yml +0 -1650
  30. data/spec/fixtures/vcr/Amtrak_TrainFetcher/_get/given_an_invalid_date_and_valid_train_stations/does_not_include_various_classes_and_includes_an_error.yml +0 -1071
  31. data/spec/fixtures/vcr/Amtrak_TrainFetcher_MainPage/_session_id/pulls_the_session_id_from_the_cookies.yml +0 -1071
  32. data/spec/fixtures/vcr/Amtrak_TrainFetcher_MainPage/_total_pages/when_more_than_one_page_exists_on_the_website/returns_2.yml +0 -1263
  33. data/spec/fixtures/vcr/Amtrak_TrainFetcher_MainPage/_total_pages/when_only_one_page_exists_on_the_website/returns_1.yml +0 -1154
  34. data/spec/fixtures/vcr/Amtrak_TrainFetcher_TrainPage/_get/when_it_works/includes_various_classes.yml +0 -198
@@ -1,2671 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
-
4
-
5
- <!--
6
- "Amtrak Release 6.22.02a"
7
- -->
8
- <html xmlns="http://www.w3.org/1999/xhtml">
9
-
10
- <meta content="IE=edge" http-equiv="X-UA-Compatible" />
11
-
12
-
13
-
14
- <head ><title>Amtrak - Train Status - Details</title>
15
- <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
16
- <meta name="robots" content="noindex,nofollow" />
17
- <meta http-equiv="imagetoolbar" content="no" />
18
- <style type="text/css">
19
- <!--
20
- @import url(/css/amtrak.css);
21
- -->
22
- </style>
23
-
24
- <!-- IE8 renders as IE7 to spare ourselves another column in the compatability matrix -->
25
- <style type="text/css">
26
- <!--
27
- @import url(/css/base.css);
28
- @import url(/css/base_screen.css);
29
- @import url(/css/basic_booking.css);
30
- @import url(/css/special_booking.css);
31
- @import url(/css/basic_booking_screen.css);
32
- @import url(/css/ib_misc.css);
33
- @import url(/css/popup.css);
34
- @import url(/css/profile.css);
35
- @import url(/css/amtrak_autocomplete.css);
36
- -->
37
- </style>
38
- <!-- Diginet script(when USE_ESI=true) introduces 'c_root' form and this is causing orange bar to display on all pages.
39
- Following lines are added to get rid of the orange bar.-->
40
- <style type="text/css">
41
- form#c_root {
42
- display: none;
43
- }
44
- </style>
45
- <link href="/css/basic_booking_print.css" rel="stylesheet" type="text/css" media="print" />
46
- <link href="/css/base_print.css" rel="stylesheet" type="text/css" media="print" />
47
- <script type="text/javascript">
48
- var _gaq = _gaq || [];
49
- _gaq.push(['_setAccount', 'UA-23218774-1']);
50
- _gaq.push(['_setDomainName', '.amtrak.com']);
51
- _gaq.push(['_trackPageview']);
52
- (function() {
53
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
54
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
55
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
56
- })();
57
- </script>
58
- </head>
59
-
60
-
61
- <body class="site">
62
-
63
- <link href="/css/header.css" rel="stylesheet" type="text/css" />
64
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/prototype.js"></script>
65
- <div id="top_nav_wrapper">
66
- <div id="top_nav_left_cover">&nbsp;</div>
67
- <div id="top_navigation_body"></div>
68
- </div>
69
- <script language="JavaScript" type="text/javascript">
70
- <!--
71
- var url = "/" + "itd/amtrak" + "/DisplayCmsContent";
72
- var functionName = 'topNavigation';
73
-
74
- new Ajax.Request(url,
75
- { method: 'post',
76
- parameters: {'functionName': functionName},
77
- onSuccess: function (transport) {
78
- if(transport.responseText!='') {
79
- $('top_navigation_body').update(transport.responseText);
80
- } else {
81
- $('top_nav_wrapper').hide();
82
- }
83
- },
84
- onFailure: function (transport) {
85
- $('top_nav_wrapper').hide();
86
- }
87
- }
88
- );
89
- //-->
90
- </script>
91
-
92
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/prototype.js"></script>
93
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/scriptaculous.js"></script>
94
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/effects.js"></script>
95
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/controls.js"></script>
96
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/formutils.js"></script>
97
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/popups.js"></script>
98
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/profile_rewrite.js"></script>
99
- <script type="text/javascript" src="/itd/project/scripts/en/external/yui/2.7.0/yahoo-dom-event.js"></script>
100
- <script type="text/javascript" src="/itd/project/scripts/en/external/yui/2.7.0/calendar-min.js"></script>
101
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/yuicalendar.js"></script>
102
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/calendar_farefinder.js"></script>
103
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/farefinderrequest.js"></script>
104
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/header.js"></script>
105
- <script type="text/javascript" src="/itd/project/scripts/en/motionpoint/motionpoint.js"></script>
106
- <script type="text/javascript">
107
- <!--
108
- var pageName='amtrak/rail/trainstatus/trainstatusresponse.jsp';
109
- /* if the subPageName has been defined use it to prefix the page name */
110
- if (typeof subPageName != 'undefined'){
111
- var path=pageName.substr(0,pageName.lastIndexOf("/")+1);
112
- var page=pageName.substr(pageName.lastIndexOf("/")+1);
113
- pageName=path+subPageName+page;
114
- }
115
- //-->
116
- </script>
117
- <script type="text/javascript" src="/itd/project/scripts/en/amtrak/jquery-1.4.2.min.js"></script>
118
- <script type="text/javascript">
119
- jQuery.noConflict();
120
- </script>
121
-
122
- <div id="outer_wrapper_confirmation">
123
- <div id="top_level_wrapper_confirmation">
124
- <div id="lower_wrapper_confirmation">
125
- <div style="position: relative;"><div id="shoulder">&nbsp;</div></div>
126
- <div id="top_bar">&nbsp;</div>
127
-
128
- <div id="left_column_wrapper_confirmation">
129
-
130
-
131
- <style type="text/css">
132
- <!--
133
- @import url(/css/base.css);
134
- -->
135
- </style>
136
- <script language="JavaScript" type="text/javascript" src="/itd/project/scripts/en/amtrak/base.js"></script>
137
- <script language="JavaScript" type="text/javascript" src="/itd/project/scripts/en/amtrak/basic_booking_left.js"></script>
138
- <link rel="stylesheet" type="text/css" href="/css/external/yui/2.7.0/calendar.css?nocache=v3_50_000" media="screen" />
139
- <link rel="stylesheet" type="text/css" href="/css/external/yui/2.7.0/container.css?nocache=v3_50_000" media="screen" />
140
- <link rel="stylesheet" type="text/css" href="/css/amtrak-calendar.css" media="screen" />
141
-
142
-
143
- <div id="persistent_info_wrapper">
144
-
145
-
146
-
147
- <ul id="pi_actions_list">
148
- <li><a href="javascript:LoginPopout.show()">Login</a></li>
149
- <li><a href="https://tickets.amtrak.com/itd/amtrak/Register">Register</a></li>
150
- </ul>
151
-
152
-
153
-
154
- <script type="text/javascript">
155
- document.observe('dom:loaded', function() {
156
- $("login_popout").hide();
157
- });
158
- </script>
159
- <div class="popout" id="login_popout" style="display: block">
160
-
161
-
162
-
163
- <style type="text/css">
164
- #loading {
165
- position: fixed;
166
- top: 30%;
167
- left: 25%;
168
- background:url(/images/en/superpnr/image_loader_blue.gif) no-repeat center #fff;
169
- padding:7px;
170
- }
171
- #overlay {
172
- background-color:#EEE;
173
- }
174
- .link_item {
175
- float:left;
176
- width:65%;
177
- }
178
- </style>
179
- <style type="text/css">
180
- .submit_image {
181
- float:right;
182
- vertical-align:top;
183
- background-color: transparent;
184
- border: none;
185
- font-size:1px;
186
- width: 70px;
187
- height: 24px;
188
- background-image: url(/images/en/btn_login.gif);
189
- background-repeat: no-repeat;
190
- }
191
- </style>
192
- <script>
193
- function enterKeyPress(event) {
194
- if (Event.KEY_RETURN == event.keyCode) {
195
- // do something usefull
196
- LoginPopout.doLogon();
197
- return false;
198
- }
199
- return true;
200
- }
201
- </script>
202
-
203
-
204
- <div id="loading"></div>
205
- <script>
206
- $('loading').hide();
207
- </script>
208
- <div id="overlay" style="background-color: white;">
209
- <div class="popout_inner" id="login_popout_inner">
210
- <a href="javascript:LoginPopout.hide()" class="close_btn button"><img alt="X" src="/images/en/btn_closeXorange.gif" /></a>
211
- <div id="login_form_header"><h3 style="margin-top:0px;">Log In to Amtrak.com</h3></div>
212
-
213
- <div class="form_holder" id="login_form_holder">
214
- <form class="std_form clearfix" onsubmit="doRegularLogon(); return true;" id="login_ajax_form" action="https://tickets.amtrak.com/itd/amtrak" method="post"><input type="hidden" name="requestor" value="amtrak.presentation.handler.page.rail.AmtrakRailGetTrainStatusPageHandler" />
215
- <div class="form_line">
216
- <div class="form_label"><label for="login_email_address">E-Mail Address</label></div>
217
- <div class="form_item"><input type="hidden" name="xwdf_username" value="/sessionWorkflow/userWorkflow/profileAccountRequirements/userName" /><input class="text" autocomplete="off" type="text" id="login_email_address" maxlength="64" name="wdf_username" /></div>
218
- </div>
219
- <div class="form_line">
220
- <div class="form_label"><label for="login_password">Password</label></div>
221
- <div class="form_item"><input type="hidden" name="xwdf_password" value="/sessionWorkflow/userWorkflow/profileAccountRequirements/password" /><input class="text password" type="password" id="login_password" maxlength="20" name="wdf_password" /></div>
222
- </div>
223
- <div class="form_line" id="login_go">
224
- <div class="link_item submit_item">
225
- <a class="forgot_pass" title="Click here to request your Password" href="javascript:fieldName='wdf_RequestUserID'; openRequestUserID();">Forgot password?</a>
226
- </div>
227
-
228
- <input class="submit_image" type="submit" name="_handler=amtrak.presentation.handler.request.profile.AmtrakProfileLogonRequestHandler/_xpath=/sessionWorkflow/userWorkflow/profileAccountRequirements" value="" />
229
- </div>
230
- </form>
231
- </div>
232
- </div>
233
- <hr/>
234
- <div class="popout_inner">
235
- <div><img src="/images/en/linkaccounts_Popup.gif" /></div>
236
-
237
- <h4 style="color:#1375B3">Link your Amtrak.com and Amtrak Guest Rewards accounts</h4>
238
- <p> Make your booking experience even easier by linking your accounts - you&#39;ll be able to navigate between both sites without having to log in twice.</p>
239
- </div>
240
- </div>
241
-
242
-
243
-
244
-
245
- </div>
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
-
258
-
259
- <script type="text/javascript">
260
- areCookiesEnabled();
261
- function createCookie(name, value, days) {
262
- var expires;
263
- if (days) {
264
- var date = new Date();
265
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
266
- expires = "; expires=" + date.toGMTString();
267
- }
268
- else expires = "";
269
- document.cookie = name + "=" + value + expires + "; path=/";
270
- }
271
- function readCookie(name) {
272
- var nameEQ = name + "=";
273
- var ca = document.cookie.split(';');
274
- for (var i = 0; i < ca.length; i++) {
275
- var c = ca[i];
276
- while (c.charAt(0) == ' ') c = c.substring(1, c.length);
277
- if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
278
- }
279
- return null;
280
- }
281
- function eraseCookie(name) {
282
- createCookie(name, "", -1);
283
- }
284
- function areCookiesEnabled() {
285
- createCookie("test", "Hello", 1);
286
- if (readCookie("test") == null) {
287
- // No stored cookie, therefore client cannot (or will not) accept
288
- // cookies - display error msg
289
- var output = '<tr class="errorrow">'
290
- + '<td class="error">'
291
- + '<table cellspacing="0" cellpadding="0" border="0" class="errorimagetable">'
292
- + '<tr class="errorimagerow">'
293
- + '<td class="errorimagecell">'
294
- + '<img class="errorimage" src="/images/en/warn.gif" />'
295
- + '</td>'
296
- + '<td class="errortextcell" >'
297
- + '<span class="error">'
298
- + 'Cookies Must Be Enabled: To use advanced features of Amtrak.com, your browser must be capable of accepting session cookies. Please <a href="javascript:var child=window.open(\'http://www.amtrak.com/servlet/ContentServer?pagename=am/AM_Snippet_C/IBLegacy&help=cookies\',\'help\',\'directories=0,dependent=1,menubar=0,top=20,left=20,width=680,height=600,scrollbars=1\');child.focus();">click here</a> to learn more about how to accept cookies.'
299
- + '</span></td></tr>'
300
- + '</table>'
301
- + '</td></tr>'
302
- + '<tr><td>&nbsp;</td></tr>';
303
- document.write(output);
304
- }
305
- eraseCookie("test");
306
- }
307
- </script>
308
-
309
-
310
-
311
-
312
-
313
-
314
- <!--[if IE]>
315
- <script type="text/javascript">
316
- function isCalendarEvent(e) {
317
- var element = Event.element(e);
318
- var names = element.classNames();
319
- if (names.include('selector')) {
320
- return true;
321
- }
322
- if (names.include('calnavright')) {
323
- return true;
324
- }
325
- if (names.include('calnavleft')) {
326
- return true;
327
- }
328
- if (names.include('link-close')) {
329
- return true;
330
- }
331
- return false;
332
- }
333
- function addFormSubmitEvent(form) {
334
- form.onkeydown = function(e) {
335
- e = e || window.event;
336
- if (e.keyCode == 13) {
337
- // If this is a Calendar return key entry then do not
338
- // call form.submit()
339
- if (isCalendarEvent(e)) {
340
- return;
341
- }
342
- if (form.name == 'ff_status_form') {
343
- if(CheckMandatoryTrainStatusFields(form)) {
344
- form.submit();
345
- return true;
346
- }
347
- return false;
348
- }
349
- if (form.name == 'mytrip_acct') {
350
- if (CheckMandatoryLoginFields(form)) {
351
- form.submit();
352
- return false;
353
- }
354
- return true;
355
- }
356
- if (form.name == 'mytrip_res') {
357
- if (CheckMandatoryMyTripFields(form)) {
358
- form.submit();
359
- return false;
360
- }
361
- return true;
362
- }
363
- if (form.name == 'ff_schedules_form') {
364
- if (CheckMandatoryScheduleFields(form)) {
365
- form.submit();
366
- return false;
367
- }
368
- return true;
369
- }
370
- }
371
- };
372
- }
373
- document.observe('dom:loaded', function() {
374
- var forms = document.getElementsByTagName('form');
375
- for (var i=0;i < forms.length;i++) {
376
- if (forms[i].name == 'mytrip_res' || forms[i].name == 'mytrip_acct' || forms[i].name == 'ff_schedules_form' || forms[i].name == 'ff_status_form') {
377
- addFormSubmitEvent(forms[i]);
378
- }
379
- }
380
- });
381
- </script>
382
- <![endif]-->
383
- <!-- Begin HTML for Fare Finder -->
384
- <div id="farefinder">
385
- <div id="ff_tabbar">
386
- <div class="active" id="ff_tabbar_tickets">Tickets<span onclick="compare_dates('wdfdate1');show_ff_tab('tickets');showHideRedeemTabBarSection('ff_sub_tabbar', true);"></span></div>
387
- <div id="ff_tabbar_status">Status<span onclick="set_status_date('wdfdate10');set_status_date('wdfdate11');show_ff_tab('status');setDepartOrArrivalFieldVisibility();switchToStatusByTrain();"></span></div>
388
- <div id="ff_tabbar_schedules">Schedules<span onclick="compare_dates('wdfdate5');show_ff_tab('schedules');"></span></div>
389
- <div id="ff_tabbar_mytrip">My Trip<span onclick="show_ff_tab('mytrip');"></span></div>
390
- </div>
391
-
392
-
393
-
394
-
395
- <div id="ff_sub_tabbar" class="show_section">
396
- <div class="active" id="ff_sub_tabbar_bookatrip">Book<span onclick="show_ff_sub_tab('bookatrip');"></span></div>
397
- <div id="ff_sub_tabbar_redeem">Redeem<span onclick="show_ff_sub_tab('redeem');"></span></div>
398
- <div id="ff_sub_tabbar_traveloptions">Travel Options<span onclick="show_ff_sub_tab('traveloptions');"></span></div>
399
- </div>
400
-
401
-
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
- <div id="farefinder_tabbody_tickets" class="farefinder_tabbody ff_active">
410
- <form name="form" action="http://tickets.amtrak.com/itd/amtrak" method="post"><input type="hidden" name="requestor" value="amtrak.presentation.handler.page.rail.AmtrakRailFareFinderPageHandler" />
411
- <input type="hidden" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/@bookpath" value="farefamilies" />
412
- <input type="hidden" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/allJourneyRequirements/@ff_tab_selected" value="bookatrip" />
413
- <h2>Tickets</h2>
414
-
415
- <div id="ff_tickets_tt_cities_subdiv" class="subdiv level6">
416
- <div id="tickets_trip_type"><p>
417
- <input type="hidden" name="xwdf_TripType" value="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/tripType" /><input type="radio" id="oneway" name="wdf_TripType" value="OneWay" onclick="javascript:blankReturnDate(false)" />&nbsp;<label for="oneway">One-Way</label>
418
- <input type="hidden" name="xwdf_TripType" value="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/tripType" /><input type="radio" id="return" name="wdf_TripType" value="Return" onclick="javascript:setReturnDate(false)" />&nbsp;<label for="return">Round-Trip</label>
419
- <a href="/itd/amtrak/ComplexRail">Multi-City</a> &gt;</p>
420
- </div>
421
- <div id="tickets_dep_city" class="ff_city_wrapper">
422
- <label for="departs">From</label>
423
- <input type="hidden" name="xwdf_origin" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/departLocation/search" /><input type="text" autocomplete="off" id="departs" maxlength="150" name="wdf_origin" value="Providence, RI (PVD)" />
424
- <p><span class="find_a_station"><a title="Click for a list of stations." href="javascript:fieldName='departs'; openStationList();">Find a Station</a></span></p>
425
- </div>
426
- <div id="tickets_arr_city" class="ff_city_wrapper level3">
427
- <label for="arrives">To</label>
428
- <input type="hidden" name="xwdf_destination" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/arriveLocation/search" /><input type="text" autocomplete="off" id="arrives" maxlength="150" name="wdf_destination" value="Boston - Back Bay, MA (BBY)" />
429
- <p><span class="find_a_station"><a title="Click for a list of stations." href="javascript:fieldName='arrives'; openStationList();">Find a Station</a></span></p>
430
- </div>
431
- <div id="autocomplete_availability_from" class="autocomplete level5" style="display:none"></div>
432
- <div id="autocomplete_availability_to" class="autocomplete level5" style="display:none"></div>
433
- </div>
434
- <div id="ff_tickets_dep_ret_date_subdiv" class="subdiv level3" style="position:static;">
435
- <div id="tickets_dep_date_time" class="level5">
436
- <div class="ff_date_wrapper">
437
- <label for="tickets_dep_date">Departs</label>
438
-
439
-
440
- <input class="wdfDate" onfocus="dateChangedTimer(1)" type="text" size="22" id="wdfdate1" maxlength="22" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departDate.date" onblur="dateChangedComplete(1,1)" value="Wed, Jan 28, 2015" readonly="readonly" /><script language="JavaScript" type="text/javascript">
441
- <!--
442
- document.write('<a class="calLink noloading" id="calLink1">&nbsp;</a>');//-->
443
- </script>
444
- <br /><div id="calContainer1" class="calContainer" ></div></div><div class="ff_time_wrapper"><label for="wdftime1"><b>Time</b></label><select onfocus="updateTimeState()" onchange="timeChanged(1);updateDayDropDownListTrainStatusWithOffsets()" id="wdftime1" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departTime.hourmin"><option value="">Anytime</option><option value="07:00">Morning</option><option value="14:00">Afternoon</option><option value="19:00">Evening</option><option value="23:59">Midnight</option><option value="01:00">1 AM</option><option value="02:00">2 AM</option><option value="03:00">3 AM</option><option value="04:00">4 AM</option><option value="05:00">5 AM</option><option value="06:00">6 AM</option><option value="07:00">7 AM</option><option value="08:00">8 AM</option><option value="09:00">9 AM</option><option value="10:00">10 AM</option><option value="11:00">11 AM</option><option value="12:00">Noon</option><option value="13:00">1 PM</option><option value="14:00">2 PM</option><option value="15:00">3 PM</option><option value="16:00">4 PM</option><option value="17:00">5 PM</option><option value="18:00">6 PM</option><option value="19:00">7 PM</option><option value="20:00">8 PM</option><option value="21:00">9 PM</option><option value="22:00">10 PM</option><option value="23:00">11 PM</option></select>
445
-
446
- </div>
447
- </div>
448
-
449
-
450
- <div id="tickets_ret_date_time" class="hide_section level4">
451
- <div class="ff_date_wrapper">
452
-
453
- <label for="tickets_ret_date">Returns</label>
454
-
455
-
456
- <input class="wdfDate" onfocus="dateChangedTimer(2)" type="text" size="22" id="wdfdate2" maxlength="22" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[2]/departDate.date" onblur="dateChangedComplete(2,1)" readonly="readonly" /><script language="JavaScript" type="text/javascript">
457
- <!--
458
- document.write('<a class="calLink noloading" id="calLink2">&nbsp;</a>');//-->
459
- </script>
460
- <br /><div id="calContainer2" class="calContainer" ></div></div><div class="ff_time_wrapper"><label for="wdftime2"><b>Time</b></label><select onfocus="updateTimeState()" onchange="timeChanged(2);updateDayDropDownListTrainStatusWithOffsets()" id="wdftime2" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[2]/departTime.hourmin"><option value="">Anytime</option><option value="07:00">Morning</option><option value="14:00">Afternoon</option><option value="19:00">Evening</option><option value="23:59">Midnight</option><option value="01:00">1 AM</option><option value="02:00">2 AM</option><option value="03:00">3 AM</option><option value="04:00">4 AM</option><option value="05:00">5 AM</option><option value="06:00">6 AM</option><option value="07:00">7 AM</option><option value="08:00">8 AM</option><option value="09:00">9 AM</option><option value="10:00">10 AM</option><option value="11:00">11 AM</option><option value="12:00">Noon</option><option value="13:00">1 PM</option><option value="14:00">2 PM</option><option value="15:00">3 PM</option><option value="16:00">4 PM</option><option value="17:00">5 PM</option><option value="18:00">6 PM</option><option value="19:00">7 PM</option><option value="20:00">8 PM</option><option value="21:00">9 PM</option><option value="22:00">10 PM</option><option value="23:00">11 PM</option></select>
461
-
462
- </div>
463
- </div>
464
-
465
- </div>
466
- <div id="ff_tickets_passengers_subdiv" class="subdiv level1">
467
- <div id="tickets_passengers">
468
-
469
-
470
-
471
- <div id="ff_adults_wrapper">
472
- <label style="line-height:1.1;" for="ff_adults"><a href="javascript:var child=window.open('http://www.amtrak.com/servlet/Satellite?SnippetName=IBLegacy&pagename=am/AM_Snippet_C/SnippetWrapper&pass=Adult','pass','directories=0,dependent=1,menubar=0,top=20,left=20,width=680,height=600,scrollbars=1');child.focus();" CLASS="smallblue">Adults</a><br /> (13-61)</label>
473
- <select onchange="javascript:discounttype('adult')" id="oth_adults" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/allJourneyRequirements/numberOfTravellers[@key='Adult']"><option value="0">0</option><option value="1" selected="selected">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option></select>
474
- </div>
475
- <div id="ff_seniors_wrapper">
476
- <label style="line-height:1.1;" for="ff_seniors"><a href="javascript:var child=window.open('http://www.amtrak.com/servlet/Satellite?SnippetName=IBLegacy&pagename=am/AM_Snippet_C/SnippetWrapper&pass=Senior','pass','directories=0,dependent=1,menubar=0,top=20,left=20,width=680,height=600,scrollbars=1');child.focus();" CLASS="smallblue">Seniors</a><br /> (62+)</label>
477
- <select onchange="javascript:discounttype('senior')" id="oth_seniors" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/allJourneyRequirements/numberOfTravellers[@key='Senior']"><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option></select>
478
- </div>
479
-
480
-
481
-
482
- <div id="ff_kids_wrapper">
483
- <label style="line-height:1.1;" for="ff_kids"><a href="javascript:var child=window.open('http://www.amtrak.com/servlet/Satellite?SnippetName=IBLegacy&pagename=am/AM_Snippet_C/SnippetWrapper&pass=Child','pass','directories=0,dependent=1,menubar=0,top=20,left=20,width=680,height=600,scrollbars=1');child.focus();" CLASS="smallblue">Children</a><br /> (2-12)</label>
484
- <select onchange="showChildPopup(this.options[this.selectedIndex].value, document.getElementById('oth_infants').options[document.getElementById('oth_infants').selectedIndex].value, 'oth_child_popup'),discounttype('child')" id="oth_children" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/allJourneyRequirements/numberOfTravellers[@key='Child']"><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select>
485
- </div>
486
- <div id="ff_infants_wrapper">
487
- <label style="line-height:1.1;" for="ff_infants"><a href="javascript:var child=window.open('http://www.amtrak.com/servlet/Satellite?SnippetName=IBLegacy&pagename=am/AM_Snippet_C/SnippetWrapper&pass=Infant','pass','directories=0,dependent=1,menubar=0,top=20,left=20,width=680,height=600,scrollbars=1');child.focus();" CLASS="smallblue">Infants</a><br /> (under 2)</label>
488
- <select onchange="showChildPopup(this.options[this.selectedIndex].value, document.getElementById('oth_children').options[document.getElementById('oth_children').selectedIndex].value, 'oth_child_popup'),discounttype('infant')" id="oth_infants" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/allJourneyRequirements/numberOfTravellers[@key='Infant']"><option value="0" selected="selected">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option></select>
489
- </div>
490
- </div>
491
- <br>
492
-
493
-
494
-
495
- <div id="oth_child_popup" class="info_childpopup_ff hide_section">Children and infants must travel with an adult who is at least 18 years or older.</div>
496
-
497
-
498
-
499
- <div class="subdiv unaccompaniedminor_link"><a href="javascript:var child=window.open('http://www.amtrak.com/servlet/Satellite?SnippetName=IBLegacy&pagename=am/AM_Snippet_C/SnippetWrapper&ibsref=unaccompaniedMinor_FareFinder','ibsref','directories=0,dependent=1,menubar=0,top=20,left=20,width=680,height=600,scrollbars=1');child.focus();" CLASS="smallblue">Children 13-15 traveling alone</a></div>
500
- <style>
501
- .info_childpopup_ff {
502
- margin-bottom: 10px;
503
- }
504
- .unaccompaniedminor_link{
505
- font-size:11px;
506
- padding-bottom:5px;
507
- }
508
- </style>
509
-
510
- </div>
511
-
512
- <div id="ff_submit_button" class="subdiv">
513
-
514
-
515
- <input type="image" alt="Click to Find Tickets" name="_handler=amtrak.presentation.handler.request.rail.farefamilies.AmtrakRailFareFamiliesSearchRequestHandler/_xpath=/sessionWorkflow/productWorkflow[@product='Rail']" onclick="javascript:return ( preFareFinderSubmitActions('The following information is needed to process your request:', 'Problem Pricing the Itinerary: Atlantic City Express Service offers adult fares only for all passengers. Please modify your selection to continue. \n[Error ID: 1121S]'))" src="/images/en/btn_ff_findTrains.gif" border="0" />
516
-
517
- </div>
518
-
519
- <div id="ff_promocode" class="subdiv oth_promocode">
520
- <input type="hidden" name="xwdf_promoCode" value="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/couponRequirements/coupon/code" /><input onfocus="focuspromotext();" type="text" size="15" id="ff_disc_promoCode" maxlength="10" name="wdf_promoCode" onblur="blurpromotext();" />
521
- </div>
522
- <script>
523
- var promocode = 'Promo Code';
524
- function blurpromotext(){
525
- if(document.getElementById('ff_disc_promoCode').value == '') {
526
- document.getElementById('ff_disc_promoCode').value = promocode;
527
- }
528
- }
529
- function focuspromotext(){
530
- if(document.getElementById('ff_disc_promoCode').value == promocode) {
531
- document.getElementById('ff_disc_promoCode').value = "";
532
- }
533
- }
534
- </script>
535
- <script type="text/javascript">
536
- //<![CDATA[
537
- Element.observe(window, 'load', function(){
538
- if(document.getElementById('ff_disc_promoCode').value == '') {
539
- document.getElementById('ff_disc_promoCode').value = promocode;
540
- }
541
- });
542
- //]]>
543
- </script>
544
-
545
- <div class="clear_both"></div>
546
-
547
-
548
- <div id="ff_disctype" class="subdiv" >
549
-
550
- </div>
551
- <div id="discountsrules" class="subdiv"><a href="javascript:var child=window.open('http://www.amtrak.com/servlet/Satellite?SnippetName=IBLegacy&pagename=am/AM_Snippet_C/SnippetWrapper&ibsref=preffare','ibsref','directories=0,dependent=1,menubar=0,top=20,left=20,width=680,height=600,scrollbars=1');child.focus();" CLASS="smallblue">Passenger type/discount rules</a></div>
552
-
553
-
554
- <script type="text/javascript">
555
- //<![CDATA[
556
- Element.observe(window, 'load', function(){
557
- discounttype("adult");
558
- jQuery("#adult_select0 option[value='Adult']").attr("selected", "selected");
559
- });
560
- //]]>
561
- </script>
562
-
563
-
564
-
565
-
566
-
567
- </form>
568
- </div>
569
- <script>
570
- if( $('ff_sub_tabbar_bookatrip').hasClassName("active") ){
571
- show_ff_sub_tab('bookatrip');
572
- } else if( $('ff_sub_tabbar_redeem').hasClassName("active") ){
573
- show_ff_sub_tab('redeem');
574
- }
575
- function discounttype(passtype) {
576
- var totaladults = jQuery('#oth_adults').val();
577
- var totalseniors = jQuery('#oth_seniors').val();
578
- var totalchilds = jQuery('#oth_children').val();
579
- var totalinfants = jQuery('#oth_infants').val();
580
- var totaladperson = parseInt(totaladults) + parseInt(totalseniors) ;
581
- var dischtml='';
582
- var count=0;
583
- var sencount =0;
584
- var adtcount= 0;
585
- var j=0;
586
- var k=0;
587
- if ( totaladperson != 0 ){
588
- for ( var i=0; i<totaladperson; i++) {
589
- count++;
590
- var adultopts= "<option value='Default'>Select</option><option value='Adult'>Adult</option><option value='Senior'>Senior</option><option value='ADAPaxType_Adult'>Passenger with Disability (PWD)</option><option value='ADAPaxType_Companion'>Companion (Book with PWD)</option><option value='AAA Adult'>AAA Adult</option><option value='NARP'>NARP</option><option value='Military'>Military Adult (Active)</option><option value='Veterans Advantage'>Veterans Advantage</option><option value='Student Advantage'>Student Advantage</option><option value='ISIC'>ISIC</option>";
591
- var senopts= "<option value='Default'>Select</option><option value='Adult'>Adult</option><option value='Senior' selected='selected'>Senior</option><option value='ADAPaxType_Adult'>Passenger with Disability (PWD)</option><option value='ADAPaxType_Companion'>Companion (Book with PWD)</option><option value='AAA Adult'>AAA Adult</option><option value='NARP'>NARP</option><option value='Military'>Military Adult (Active)</option><option value='Veterans Advantage'>Veterans Advantage</option><option value='Student Advantage'>Student Advantage</option><option value='ISIC'>ISIC</option>";
592
- var adtlabel="Adult";
593
- if (jQuery('#adult_select'+i).val()) {
594
- var curadtval = "value='"+jQuery('#adult_select'+i).val()+"'";
595
- var newadtval = "value='"+jQuery('#adult_select'+i).val()+"' selected='selected'";
596
- if (curadtval == "value='Senior'" && sencount<totalseniors ){
597
- adtlabel = "Senior";
598
- sencount++;
599
- adultopts = adultopts.replace(curadtval, newadtval);
600
- } else {
601
- if (curadtval == "value='Senior'" && sencount>=totalseniors ){
602
- if (j==0) {
603
- j=i;
604
- } else {
605
- j=j+1;
606
- }
607
- while (j<=totaladperson) {
608
- if (jQuery('#adult_select'+(j+1)).val() != 'Senior') {
609
- var ncuradtval = "value='"+jQuery('#adult_select'+(j+1)).val()+"'";
610
- var nnewadtval = "value='"+jQuery('#adult_select'+(j+1)).val()+"' selected='selected'";
611
- adultopts = adultopts.replace(ncuradtval, nnewadtval);
612
- break;
613
- }
614
- j++;
615
- }
616
- } else {
617
- if (curadtval != "value='Senior'" && adtcount<totaladults ){
618
- adtcount++;
619
- adultopts = adultopts.replace(curadtval, newadtval);
620
- } else {
621
- if (curadtval != "value='Senior'" && adtcount>=totaladults ){
622
- if (k==0) {
623
- k=i;
624
- } else {
625
- k=k+1;
626
- }
627
- while (k<=totaladperson) {
628
- if (jQuery('#adult_select'+(k+1)).val() == 'Senior') {
629
- var ncuradtval = "value='"+jQuery('#adult_select'+(k+1)).val()+"'";
630
- var nnewadtval = "value='"+jQuery('#adult_select'+(k+1)).val()+"' selected='selected'";
631
- adultopts = adultopts.replace(ncuradtval, nnewadtval);
632
- adtlabel = "Senior";
633
- break;
634
- }
635
- k++;
636
- }
637
- } else {
638
- adultopts = adultopts.replace(curadtval, newadtval);
639
- }
640
- }
641
- }
642
- }
643
- } else {
644
- if (passtype== 'senior' || passtype== 'Senior') {
645
- adultopts=senopts;
646
- adtlabel ="Senior";
647
- }
648
- }
649
- dischtml += '<div id ="pass'+count+'" class="'+adtlabel+'"><div class="ff_disc_passenger"><label id="label'+count+'" for="disc_passenger'+count+'">Passenger #'+count+' ('+adtlabel+')</label><br/><input type="hidden" value="/sessionWorkflow/productWorkflow[@product=\'Rail\']/tripRequirements/allJourneyRequirements/person['+count+']/personType" name="xwdf_person_type'+count+'"><select onfocus="this.oldvalue = this.value;" onchange="totalpass(this,'+count+');this.oldvalue = this.value;" name="wdf_person_type'+count+'" id="adult_select'+i+'" class="disc_passenger_select">'+adultopts+'</select></div></div>';
650
- }
651
- }
652
- if ( totalchilds != 0) {
653
- for ( var i=0; i<totalchilds; i++) {
654
- count++;
655
- var childopts= "<option value='Default'>Select</option><option value='Child'>Child (Ages 2-12)</option><option value='ADAPaxType_Child'>Passenger with Disability (PWD)</option><option value='AAA Child'>AAA Child (Ages 2-12)</option><option value='Military Child'>Military Child (Ages 2-12)</option>";
656
- if (jQuery('#child_select'+i).val()) {
657
- var curchival = "value='"+jQuery('#child_select'+i).val()+"'";
658
- var newchival = "value='"+jQuery('#child_select'+i).val()+"' selected='selected'";
659
- childopts = childopts.replace(curchival, newchival);
660
- }
661
- dischtml += '<div id ="pass'+count+'" class="ff_disc_passenger"><label for="disc_passenger'+count+'">Passenger #'+count+' (Child)</label><br/><input type="hidden" value="/sessionWorkflow/productWorkflow[@product=\'Rail\']/tripRequirements/allJourneyRequirements/person['+count+']/personType" name="xwdf_person_type'+count+'"><select name="wdf_person_type'+count+'" id="child_select'+i+'" class="disc_passenger_select">'+childopts+'</select></div>';
662
- }
663
- }
664
- if ( totalinfants != 0 ) {
665
- for ( var i=0; i<totalinfants; i++) {
666
- count++;
667
- dischtml += '<div id ="pass'+count+'" class="ff_disc_passenger"><label for="disc_passenger'+count+'">Passenger #'+count+' (Infant)</label><br/><p>Infant (Under age 2)</p><input type="hidden" value="Infant" name="/sessionWorkflow/productWorkflow[@product=\'Rail\']/tripRequirements/allJourneyRequirements/person['+count+']/personType"></div>';
668
- }
669
- }
670
- document.getElementById('ff_disctype').innerHTML = dischtml;
671
- if ( count != 0) {
672
- document.getElementById("ff_disctype" ).style.display = 'block';
673
- } else {
674
- document.getElementById("ff_disctype" ).style.display = 'none';
675
- }
676
- }
677
- function validatePassDiscountSelect(){
678
- var totaladults = jQuery('#oth_adults').val();
679
- var totalseniors = jQuery('#oth_seniors').val();
680
- var totaladperson = parseInt(totaladults) + parseInt(totalseniors) ;
681
- var totalchilds = jQuery('#oth_children').val();
682
- var errorMsg = "";
683
- if ( totaladperson != 0 ){
684
- for (i = 0; i < totaladperson; i++) {
685
- if (jQuery('#adult_select'+i).val() == 'Default') {
686
- errorMsg = 'Please make sure you have selected a passenger type for all of the members in your traveling party.';
687
- }
688
- }
689
- }
690
- if ( totalchilds != 0 ){
691
- for (i = 0; i < totalchilds; i++) {
692
- if (jQuery('#child_select'+i).val() == 'Default') {
693
- errorMsg = 'Please make sure you have selected a passenger type for all of the members in your traveling party.';
694
- }
695
- }
696
- }
697
- if (errorMsg!=""){
698
- alert(errorMsg);
699
- return false;
700
- } else {
701
- return true;
702
- }
703
- }
704
- function totalpass(id, ct) {
705
- var oldvalue = id.oldvalue;
706
- var newvalue = id.value;
707
- var newlabel = "label"+ct;
708
- if (oldvalue == 'Senior' || newvalue == 'Senior') {
709
- if (oldvalue == 'Senior' && newvalue != 'Senior') {
710
- var tadt = parseInt(document.getElementById("oth_adults").value);
711
- var tsen = parseInt(document.getElementById("oth_seniors").value);
712
- tadt += 1;
713
- tsen -= 1;
714
- document.getElementById("oth_adults").value = tadt;
715
- document.getElementById("oth_seniors").value = tsen;
716
- var res = document.getElementById(newlabel).innerHTML.replace("Senior","Adult");
717
- document.getElementById(newlabel).innerHTML =res;
718
- } else {
719
- if (newvalue == 'Senior' && oldvalue != 'Senior') {
720
- var tadt = parseInt(document.getElementById("oth_adults").value);
721
- var tsen = parseInt(document.getElementById("oth_seniors").value);
722
- tadt -= 1;
723
- tsen += 1;
724
- document.getElementById("oth_adults").value = tadt;
725
- document.getElementById("oth_seniors").value = tsen;
726
- var res = document.getElementById(newlabel).innerHTML.replace("Adult","Senior");
727
- document.getElementById(newlabel).innerHTML =res;
728
- }
729
- }
730
- }
731
- }
732
- function closeAlertBox() {
733
- var $j = jQuery.noConflict();
734
- $j(".ui-dialog-content").dialog("close");
735
- }
736
- </script>
737
- <style>
738
- .disc_passenger_select {
739
- margin-top:2px;
740
- margin-left:0px;
741
- }
742
- </style>
743
-
744
-
745
-
746
-
747
-
748
-
749
-
750
-
751
-
752
- <div id="farefinder_tabbody_redeem" class="farefinder_tabbody">
753
- <h2>Redeem Points</h2>
754
- <form name="ff_redeem_form" action="https://tickets.amtrak.com/itd/amtrak" method="post"><input type="hidden" name="requestor" value="amtrak.presentation.handler.page.rail.redeem.PresAmtrakRailRedeemFindATicketReqsPageHandler" />
755
- <div id="ff_redeem_step_1" class="subdiv">
756
- <div id="ff_member_wrapper">
757
-
758
-
759
-
760
-
761
-
762
-
763
-
764
- <div class="form_line_wrapper first">
765
- <label for="ff_membernumber">Member Number</label>
766
- <span class="form_entry">
767
- <input type="text" id="ff_membernumber" maxlength="10" name="/sessionWorkflow/profileWorkflow/schemeAccount/membershipNumber" />
768
- </span>
769
- </div>
770
- <div class="form_line_wrapper">
771
- <label for="ff_memberpassword">Member Password</label>
772
- <span class="form_entry">
773
- <input type="password" id="ff_memberpassword" maxlength="29" name="/sessionWorkflow/profileWorkflow/schemeAccount/@password" />
774
- </span>
775
- </div>
776
- <br class="clear_both" />
777
-
778
-
779
-
780
- </div>
781
- </div>
782
- <div id="ff_tickets_redeem_cities_subdiv" class="subdiv">
783
-
784
- <div id="tickets_dep_city" class="ff_city_wrapper">
785
- <input type="hidden" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departDate/@radioSelect" value="arrivalTime" />
786
- <input type="hidden" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/@bookpath" value="redeem" />
787
- <label for="agrdeparts">From</label>
788
- <input type="hidden" name="xwdf_origin" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/departLocation/search" /><input class="text" type="text" id="agrdeparts" name="wdf_origin" value="Providence, RI (PVD)" />
789
- <p><span class="find_a_station"><a title="Click for a list of stations." href="javascript:fieldName='agrdeparts'; openStationList();">Find a Station</a></span></p>
790
- </div>
791
- <div id="tickets_arr_city" class="ff_city_wrapper level3">
792
- <label for="agrarrives">To</label>
793
- <input type="hidden" name="xwdf_destination" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/arriveLocation/search" /><input class="text" type="text" id="agrarrives" name="wdf_destination" value="Boston - Back Bay, MA (BBY)" />
794
- <p><span class="find_a_station"><a title="Click for a list of stations." href="javascript:fieldName='agrarrives'; openStationList();">Find a Station</a></span></p>
795
- </div>
796
- <div id="redeem_from_auto" class="autocomplete level5" style="display:none"></div>
797
- <div id="redeem_to_auto" class="autocomplete level5" style="display:none"></div>
798
-
799
- </div>
800
- <div id="ff_redeem_dep_date_subdiv" class="subdiv">
801
- <div id="redeem_dep_date_time">
802
- <div class="ff_date_wrapper">
803
- <label for="wdfdate15">Departs</label>
804
-
805
-
806
- <input class="wdfDate" onfocus="dateChangedTimer(15)" type="text" size="22" id="wdfdate15" maxlength="22" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departDate.date" onblur="dateChangedComplete(15,1)" value="Wed, Jan 28, 2015" readonly="readonly" /><script language="JavaScript" type="text/javascript">
807
- <!--
808
- document.write('<a class="calLink noloading" id="calLink15">&nbsp;</a>');//-->
809
- </script>
810
- <br /><div id="calContainer15" class="calContainer" ></div></div><div class="ff_time_wrapper"><label for="wdftimenull"><b>Time</b></label><select onfocus="updateTimeState()" onchange="timeChanged(15);updateDayDropDownListTrainStatusWithOffsets()" id="wdftime15" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departTime.hourmin"><option value="">Anytime</option><option value="07:00">Morning</option><option value="14:00">Afternoon</option><option value="19:00">Evening</option><option value="23:59">Midnight</option><option value="01:00">1 AM</option><option value="02:00">2 AM</option><option value="03:00">3 AM</option><option value="04:00">4 AM</option><option value="05:00">5 AM</option><option value="06:00">6 AM</option><option value="07:00">7 AM</option><option value="08:00">8 AM</option><option value="09:00">9 AM</option><option value="10:00">10 AM</option><option value="11:00">11 AM</option><option value="12:00">Noon</option><option value="13:00">1 PM</option><option value="14:00">2 PM</option><option value="15:00">3 PM</option><option value="16:00">4 PM</option><option value="17:00">5 PM</option><option value="18:00">6 PM</option><option value="19:00">7 PM</option><option value="20:00">8 PM</option><option value="21:00">9 PM</option><option value="22:00">10 PM</option><option value="23:00">11 PM</option></select>
811
-
812
- </div>
813
- </div>
814
- </div>
815
- <div id="ff_redeem_passengers_subdiv" class="subdiv">
816
- <div id="redeem_passengers">
817
- <div id="ff_submit_button">
818
- <input type="image" alt="Click to Find Tickets" name="_handler=amtrak.presentation.handler.request.rail.redeem.PresAmtrakRailRedeemSearchRequestHandler" onclick="javascript:return preRedeemSubmitActions('The following information is needed to process your request:')" src="/images/en/btn_ff_findTrains.gif" border="0" />
819
- </div>
820
- <div id="passenger_wrapper">
821
- <label for="redeemadults">Passengers</label><br> (Max. of 8)
822
- </div>
823
- <div id="ff_redeem_passenger_select_wrapper">
824
- <select id="redeemadults" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/allJourneyRequirements/numberOfTravellers[@key='Adult']"><option value="1" selected="selected">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option></select>
825
- </div>
826
- </div>
827
- <br/>
828
- <p><a href="javascript:var child=window.open('http://www.amtrak.com/servlet/Satellite?SnippetName=IBLegacy&pagename=am/AM_Snippet_C/SnippetWrapper&help=agrFindTicket','help','directories=0,dependent=1,menubar=0,top=20,left=20,width=680,height=600,scrollbars=1');child.focus();" CLASS="smallblue">Learn more</a> about redeeming points online for Amtrak travel.</p>
829
- </div>
830
- <br class="clear_both" />
831
- </form>
832
- </div>
833
- <script language="JavaScript" type="text/javascript">
834
- <!--
835
- if( $('ff_sub_tabbar_bookatrip').hasClassName("active") ){
836
- show_ff_sub_tab('bookatrip');
837
- } else if( $('ff_sub_tabbar_redeem').hasClassName("active") ){
838
- show_ff_sub_tab('redeem');
839
- }
840
- //-->
841
- </script>
842
-
843
-
844
-
845
- <div id="farefinder_tabbody_traveloptions" class="farefinder_tabbody">
846
- <div class="cmstraveloptions" id="cmstraveloptions">
847
- <p><a class="button" href="/rail-deals-every-week-25-off-amtrak-fares-across-the-us">
848
-
849
- <img src='http://www.amtrak.com/servlet/Satellite?blobcol=urldata&blobheader=image%2Fgif&blobkey=id&blobtable=MungoBlobs&blobwhere=1249288596252&ssbinary=true' alt='Start Saving with SmartFares - New Deals Every Week'></img>
850
-
851
- </a><br />
852
- <a class="button" href="http://tickets.amtrak.com/itd/amtrak/autotrain">
853
-
854
- <img src='http://www.amtrak.com/servlet/Satellite?blobcol=urldata&blobheader=image%2Fgif&blobkey=id&blobtable=MungoBlobs&blobwhere=1249288596551&ssbinary=true' alt='Make a Reservation on the Auto Train'></img>
855
-
856
- </a><br />
857
- <a class="button" href="http://tickets.amtrak.com/itd/amtrak/multiride">
858
-
859
- <img src='http://www.amtrak.com/servlet/Satellite?blobcol=urldata&blobheader=image%2Fgif&blobkey=id&blobtable=MungoBlobs&blobwhere=1249288591884&ssbinary=true' alt='Buy Multi-Ride Tickets'></img>
860
-
861
- </a><br />
862
- <a class="button" href="http://tickets.amtrak.com/itd/amtrak/selectpass">
863
-
864
- <img src='http://www.amtrak.com/servlet/Satellite?blobcol=urldata&blobheader=image%2Fgif&blobkey=id&blobtable=MungoBlobs&blobwhere=1249288591915&ssbinary=true' alt='Buy a USA Rail Pass'></img>
865
-
866
- </a><br />
867
- <a class="button" href="/hotels-cars-travel-insurance-and-more">
868
-
869
- <img src='http://www.amtrak.com/servlet/Satellite?blobcol=urldata&blobheader=image%2Fgif&blobkey=id&blobtable=MungoBlobs&blobwhere=1249288591946&ssbinary=true' alt='Complete Your Trip with Hotels, Cars, Travel Insurance and More'></img>
870
-
871
- </a><br />
872
- <a class="button" href="http://tickets.amtrak.com/itd/amtrak/grouptravel">
873
-
874
- <img src='http://www.amtrak.com/servlet/Satellite?blobcol=urldata&blobheader=image%2Fgif&blobkey=id&blobtable=MungoBlobs&blobwhere=1249288591983&ssbinary=true' alt='Make a Group Travel Request'></img>
875
-
876
- </a></p>
877
- </div>
878
- </div>
879
-
880
- <div id="farefinder_tabbody_status" class="farefinder_tabbody">
881
-
882
-
883
- <div id="status_by_train_number">
884
- <form onsubmit="javascript:return CheckMandatoryTrainStatusFieldsForStatusByTrainNumber();" name="ff_status_form1" action="http://tickets.amtrak.com/itd/amtrak" method="post"><input type="hidden" name="requestor" value="amtrak.presentation.handler.page.rail.AmtrakRailGetTrainStatusPageHandler" />
885
- <input type="hidden" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/@trainStatusType" value="statusByTrainNumber" />
886
- <h2>Status</h2>
887
- <div id="ff_status_step_1" class="subdiv1">
888
- <div id="status_arr_or_dep_wrapper">
889
-
890
-
891
- <p>
892
- <input type="hidden" name="xwdf_SortBy" value="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departDate/@radioSelect" /><input type="radio" id="status_arr" name="wdf_SortBy" value="arrivalTime" onclick="javascript:return setDepartOrArrivalFieldVisibility();" checked="checked" />
893
- <label for="status_arr">
894
- Arrival Status
895
- </label>
896
- </p>
897
- <p>
898
- <input type="hidden" name="xwdf_SortBy" value="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departDate/@radioSelect" /><input type="radio" id="status_dep" name="wdf_SortBy" value="departTime" onclick="javascript:return setDepartOrArrivalFieldVisibility();" />
899
- <label for="status_dep">
900
- Departure Status
901
- </label>
902
- </p>
903
-
904
-
905
-
906
-
907
- </div>
908
- <div id="status_dep_city" class="ff_status_city_wrapper">
909
- <label for="status_from">
910
- Station
911
- </label>
912
- <!-- itd:locationinput id="status_dep" wdfxpath="travelSelection/journeySelection[1]/departLocation" wdfhtmlname="wdf_origin" wdflimitedlocations="resource:TRAVEL_USE_LIMITED_LOCATIONS" size="25" / -->
913
- <div id="div_depart_station">
914
- <input type="hidden" name="xwdf_origin" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/departLocation/search" /><input type="text" autocomplete="off" id="status_from" maxlength="150" name="wdf_origin" value="Providence, RI (PVD)" />
915
- <p><span class="find_a_station">
916
- <a title="Click for a list of stations." href="javascript:fieldName='status_from'; openStationList();">Find a Station</a>
917
- </span></p>
918
- </div>
919
- <div id="div_arrive_station">
920
- <input type="hidden" name="xwdf_destination" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/arriveLocation/search" /><input type="text" autocomplete="off" id="status_to" maxlength="150" name="wdf_destination" value="Boston - Back Bay, MA (BBY)" />
921
- <p><span class="find_a_station">
922
- <a title="Click for a list of stations." href="javascript:fieldName='status_to'; openStationList();">Find a Station</a>
923
- </span></p>
924
- </div>
925
- </div>
926
- <div id="status_from_auto" class="autocomplete" style="display:none"></div>
927
- <div id="status_to_auto" class="autocomplete" style="display:none"></div>
928
- <div class="form_line_wrapper1">
929
- <label for="status_train_num">
930
- Train/Bus No.
931
- </label>
932
- <span class="form_entry">
933
- <input type="hidden" name="xwdf_trainNumber" value="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/segmentRequirements[1]/serviceCode" /><input onfocus="if (this.value=='optional') { this.value=''; updateMaxLength(); };" type="text" size="4" id="status_train_num" maxlength="8" name="wdf_trainNumber" />
934
- </span>
935
- </div>
936
- <div class="form_line_wrapper">
937
- <div id="div_depart_date_label">
938
- <label for="status_date">
939
- Depart Date
940
- </label>
941
- </div>
942
- <div id="div_arrival_date_label">
943
- <label for="status_date">
944
- Arrival Date
945
- </label>
946
- </div>
947
- <span class="form_entry">
948
-
949
-
950
- <input class="wdfDate" onfocus="dateChangedTimer(10)" type="text" size="22" id="wdfdate10" maxlength="22" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departDate.date" onblur="dateChangedComplete(10,1)" value="Wed, Jan 28, 2015" readonly="readonly" /><script language="JavaScript" type="text/javascript">
951
- <!--
952
- document.write('<a class="calLink noloading" id="calLink10">&nbsp;</a>');//-->
953
- </script>
954
- <br /><div id="calContainer10" class="calContainer calContainerTrainStatus" ></div>
955
-
956
- </span>
957
- </div>
958
- <br class="clear_both" />
959
- </div>
960
- <div id="ff_status_submit_wrapper" class="subdiv">
961
- <input type="hidden" name="_handler=amtrak.presentation.handler.request.rail.AmtrakRailTrainStatusSearchRequestHandler/_xpath=/sessionWorkflow/productWorkflow[@product='Rail']" />
962
- <input type="image" alt="Check Status" name="_handler=amtrak.presentation.handler.request.rail.AmtrakRailTrainStatusSearchRequestHandler/_xpath=/sessionWorkflow/productWorkflow[@product='Rail']" src="/images/en/btn_checkStatus.gif" border="0" />
963
- </div>
964
- <div class="form_line_wrapper subdiv2">
965
- Late trains often make up time en route and may arrive earlier than expected. When trains are late, we suggest you arrive at your departure station prior to the estimated arrival or departure time.
966
- </div>
967
- <div class="form_line_wrapper subdiv">
968
- <h3 style="margin-bottom:2px;">Don't know your train number?</h3>
969
- <a href="javascript:switchToStatusByCity();">Check status by city</a>
970
- </div>
971
- </form>
972
- </div>
973
-
974
-
975
- <div id="status_by_city_pair">
976
- <form onsubmit="javascript:return CheckMandatoryTrainStatusFieldsForStatusByCityPair();" name="ff_status_form2" action="http://tickets.amtrak.com/itd/amtrak" method="post"><input type="hidden" name="requestor" value="amtrak.presentation.handler.page.rail.AmtrakRailGetTrainStatusPageHandler" />
977
- <input type="hidden" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/@trainStatusType" value="statusByCityPair" />
978
- <input type="hidden" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departDate/@radioSelect" value="arrivalTime" />
979
- <div id="ff_status_step_1" class="subdiv">
980
- <div id="status_dep_city" class="ff_status_city_wrapper citypair_from">
981
- <label for="status_from">
982
- From
983
- </label>
984
- <!-- itd:locationinput id="status_dep" wdfxpath="travelSelection/journeySelection[1]/departLocation" wdfhtmlname="wdf_origin" wdflimitedlocations="resource:TRAVEL_USE_LIMITED_LOCATIONS" size="25" / -->
985
- <input type="hidden" name="xwdf_origin" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/departLocation/search" /><input type="text" autocomplete="off" id="status_from1" maxlength="150" name="wdf_origin" value="Providence, RI (PVD)" />
986
- <p><span class="find_a_station">
987
- <a title="Click for a list of stations." href="javascript:fieldName='status_from1'; openStationList();">Find a Station</a>
988
- </span></p>
989
- </div>
990
- <div id="status_arr_city" class="ff_status_city_wrapper">
991
- <label for="status_to">
992
- To
993
- </label>
994
- <!-- itd:locationinput id="status_to" wdfxpath="travelSelection/journeySelection[1]/arriveLocation" wdfhtmlname="wdf_destination" wdflimitedlocations="resource:TRAVEL_USE_LIMITED_LOCATIONS" size="25" / -->
995
- <input type="hidden" name="xwdf_destination" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/arriveLocation/search" /><input type="text" autocomplete="off" id="status_to1" maxlength="150" name="wdf_destination" value="Boston - Back Bay, MA (BBY)" />
996
- <p><span class="find_a_station">
997
- <a title="Click for a list of stations." href="javascript:fieldName='status_to1'; openStationList();">Find a Station</a>
998
- </span></p>
999
- </div>
1000
- <div id="status_from_auto1" class="autocomplete" style="display:none"></div>
1001
- <div id="status_to_auto1" class="autocomplete" style="display:none"></div>
1002
- <div class="form_line_wrapper">
1003
- <div id="div_depart_date_label">
1004
- <label for="status_date">
1005
- Arrival Date
1006
- </label>
1007
- </div>
1008
- <span class="form_entry">
1009
-
1010
-
1011
- <input class="wdfDate" onfocus="dateChangedTimer(11)" type="text" size="22" id="wdfdate11" maxlength="22" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departDate.date" onblur="dateChangedComplete(11,1)" value="Wed, Jan 28, 2015" readonly="readonly" /><script language="JavaScript" type="text/javascript">
1012
- <!--
1013
- document.write('<a class="calLink noloading" id="calLink11">&nbsp;</a>');//-->
1014
- </script>
1015
- <br /><div id="calContainer11" class="calContainer calContainerTrainStatus" ></div>
1016
-
1017
- </span>
1018
- </div>
1019
- <br class="clear_both" />
1020
- </div>
1021
- <div id="ff_status_submit_wrapper" class="subdiv">
1022
- <input type="hidden" name="_handler=amtrak.presentation.handler.request.rail.AmtrakRailTrainStatusSearchRequestHandler/_xpath=/sessionWorkflow/productWorkflow[@product='Rail']" />
1023
- <input type="image" alt="Check Status" name="_handler=amtrak.presentation.handler.request.rail.AmtrakRailTrainStatusSearchRequestHandler/_xpath=/sessionWorkflow/productWorkflow[@product='Rail']" src="/images/en/btn_checkStatus.gif" border="0" />
1024
- </div>
1025
- <div class="form_line_wrapper subdiv2">
1026
- Late trains often make up time en route and may arrive earlier than expected. When trains are late, we suggest you arrive at your departure station prior to the estimated arrival or departure time.
1027
- </div>
1028
- <div class="form_line_wrapper subdiv">
1029
- <h3 style="margin-bottom:45px;"><a href="javascript:switchToStatusByTrain();">Check status by train number</a></h3>
1030
- </div>
1031
- </form>
1032
- </div>
1033
-
1034
-
1035
- </div>
1036
- <div id="farefinder_tabbody_schedules" class="farefinder_tabbody">
1037
-
1038
- <form onsubmit="javascript:return CheckMandatoryScheduleFields(this);" name="ff_schedules_form" action="http://tickets.amtrak.com/itd/amtrak" method="post"><input type="hidden" name="requestor" value="amtrak.presentation.handler.page.rail.AmtrakRailGetTrainStatusPageHandler" />
1039
- <h2>Schedules</h2>
1040
- <div id="ff_schedules_tt_cities_subdiv" class="subdiv">
1041
- <div id="schedules_dep_city" class="ff_city_wrapper">
1042
- <label for="schedules_from">From</label>
1043
- <input type="hidden" name="xwdf_origin" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/departLocation/search" /><input type="text" autocomplete="off" id="schedules_from" maxlength="150" name="wdf_origin" value="Providence, RI (PVD)" />
1044
- <p><span class="find_a_station"><a title="Click for a list of stations." href="javascript:fieldName='schedules_from'; openStationList();">Find a Station</a></span></p>
1045
- <!-- itd:locationinput id="schedules_from" wdfxpath="travelSelection/journeySelection[1]/departLocation" wdfhtmlname="wdf_origin" wdflimitedlocations="resource:TRAVEL_USE_LIMITED_LOCATIONS" size="40" / -->
1046
-
1047
- </div>
1048
- <div id="schedules_arr_city" class="ff_city_wrapper">
1049
- <label for="schedules_to">To</label>
1050
- <!-- itd:locationinput id="schedules_to" wdfxpath="travelSelection/journeySelection[1]/arriveLocation" wdfhtmlname="wdf_destination" wdflimitedlocations="resource:TRAVEL_USE_LIMITED_LOCATIONS" size="40" / -->
1051
- <input type="hidden" name="xwdf_destination" value="/sessionWorkflow/productWorkflow[@product='Rail']/travelSelection/journeySelection[1]/arriveLocation/search" /><input type="text" autocomplete="off" id="schedules_to" maxlength="150" name="wdf_destination" value="Boston - Back Bay, MA (BBY)" />
1052
- <p><span class="find_a_station"><a title="Click for a list of stations." href="javascript:fieldName='schedules_to'; openStationList();">Find a Station</a></span></p>
1053
-
1054
- </div>
1055
- </div>
1056
- <div id="ff_schedules_dep_ret_date_subdiv" class="subdiv">
1057
- <div id="schedule_from_auto" class="autocomplete" style="display:none"></div>
1058
- <div id="schedule_to_auto" class="autocomplete" style="display:none"></div>
1059
- <div id="schedules_dep_date_time">
1060
- <div class="ff_date_wrapper">
1061
- <label for="schedules_dep_date">Depart</label>
1062
-
1063
-
1064
- <input class="wdfDate" onfocus="dateChangedTimer(5)" type="text" size="22" id="wdfdate5" maxlength="22" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departDate.date" onblur="dateChangedComplete(5,1)" value="Wed, Jan 28, 2015" readonly="readonly" /><script language="JavaScript" type="text/javascript">
1065
- <!--
1066
- document.write('<a class="calLink noloading" id="calLink5">&nbsp;</a>');//-->
1067
- </script>
1068
- <br /><div id="calContainer5" class="calContainer" ></div></div><div class="ff_time_wrapper"><label for="wdftimenull"><b>Time</b></label><select onfocus="updateTimeState()" onchange="timeChanged(5);updateDayDropDownListTrainStatusWithOffsets()" id="wdftime5" name="/sessionWorkflow/productWorkflow[@product='Rail']/tripRequirements/journeyRequirements[1]/departTime.hourmin"><option value="">Anytime</option><option value="07:00">Morning</option><option value="14:00">Afternoon</option><option value="19:00">Evening</option><option value="23:59">Midnight</option><option value="01:00">1 AM</option><option value="02:00">2 AM</option><option value="03:00">3 AM</option><option value="04:00">4 AM</option><option value="05:00">5 AM</option><option value="06:00">6 AM</option><option value="07:00">7 AM</option><option value="08:00">8 AM</option><option value="09:00">9 AM</option><option value="10:00">10 AM</option><option value="11:00">11 AM</option><option value="12:00">Noon</option><option value="13:00">1 PM</option><option value="14:00">2 PM</option><option value="15:00">3 PM</option><option value="16:00">4 PM</option><option value="17:00">5 PM</option><option value="18:00">6 PM</option><option value="19:00">7 PM</option><option value="20:00">8 PM</option><option value="21:00">9 PM</option><option value="22:00">10 PM</option><option value="23:00">11 PM</option></select>
1069
-
1070
- </div>
1071
- </div>
1072
- </div>
1073
- <div id="ff_schedules_timetables_submit_wrapper" class="subdiv">
1074
- <input type="hidden" name="_handler=amtrak.presentation.handler.request.rail.AmtrakCMSRailSchedulesSearchRequestHandler/_xpath=/sessionWorkflow/productWorkflow[@product='Rail']" />
1075
- <input type="image" alt="Find Schedules" name="_handler=amtrak.presentation.handler.request.rail.AmtrakCMSRailSchedulesSearchRequestHandler/_xpath=/sessionWorkflow/productWorkflow[@product='Rail']" src="/images/en/btn_findSchedules.gif" border="0" />
1076
- </div>
1077
- <div id="ff_schedules_timetables_footer_wrapper">
1078
- <p><a href="http://www.amtrak.com/servlet/Satellite/Page/1237405732505/1237405732505">Download printable timetables</a></p>
1079
- </div>
1080
- </form>
1081
-
1082
- </div>
1083
- <div id="farefinder_tabbody_mytrip" class="farefinder_tabbody">
1084
- <h2>My Trip</h2>
1085
- <div id="ff_mytrip_step_1" class="subdiv">
1086
- <form onsubmit="javascript:return CheckMandatoryMyTripFields(this)" name="mytrip_res" action="http://tickets.amtrak.com/itd/amtrak" method="post"><input type="hidden" name="requestor" value="amtrak.presentation.handler.page.rail.AmtrakRailGetTrainStatusPageHandler" />
1087
- <h3>Find a Reservation</h3>
1088
- <div class="form_line_wrapper first">
1089
- <label for="mytrip_res_num">Reservation Number</label><span class="form_entry">
1090
- <input type="text" id="mytrip_res_num" name="/sessionWorkflow/itineraryWorkflow/basket/booking/reference" value="" />
1091
- </span>
1092
- </div>
1093
- <div class="form_line_wrapper">
1094
- <strong>and</strong>
1095
- </div>
1096
- <div class="form_line_wrapper">
1097
- <label for="mytrip_res_email">E-mail Address</label><span class="form_entry">
1098
- <input type="text" id="mytrip_res_email" name="/sessionWorkflow/itineraryWorkflow/basket/booking/bookingOptions/bookingFulfilment/contact/contactEmailAddress/emailAddress" value="" />
1099
- </span>
1100
- </div>
1101
- <div class="form_line_wrapper">
1102
- <div class="separator">-or-</div>
1103
- </div>
1104
- <div class="form_line_wrapper">
1105
- <label for="mytrip_res_zip">Telephone Number</label><span class="form_entry">
1106
- <input type="text" id="mytrip_res_zip" name="/sessionWorkflow/itineraryWorkflow/basket/booking/bookingOptions/bookingFulfilment/contact/contactTelephone/number" value="" />
1107
- </span>
1108
- </div>
1109
- <div id="ff_mytrip_res_submit">
1110
- <input type="hidden" name="_handler=com.sita.ats.amtrak.presentation.handler.request.itinerary.AmtrakLoggedOutTripDetailsRequestHandler" />
1111
- <input class="image" type="image" alt="Find Reservation" name="_handler=com.sita.ats.amtrak.presentation.handler.request.itinerary.AmtrakLoggedOutTripDetailsRequestHandler" src="/images/en/btn_find.gif" />
1112
- </div>
1113
- </form>
1114
- </div>
1115
-
1116
- <div id="ff_mytrip_step_2" class="subdiv">
1117
- <div id="mytrip_or"><span>Or</span></div>
1118
-
1119
- <form onsubmit="javascript:return CheckMandatoryLoginFields(this)" name="mytrip_acct" action="https://tickets.amtrak.com/itd/amtrak" method="post"><input type="hidden" name="requestor" value="amtrak.presentation.handler.page.rail.AmtrakRailGetTrainStatusPageHandler" />
1120
- <input type="hidden" name="/sessionWorkflow/userWorkflow/profileAccountRequirements/@logontype" value="mytrip" />
1121
- <h3>Log in to your Amtrak.com Account</h3>
1122
- <div class="form_line_wrapper">
1123
- <label for="mytrip_acct_email">E-mail Address</label><span class="form_entry">
1124
- <input type="hidden" name="xwdf_username" value="/sessionWorkflow/userWorkflow/profileAccountRequirements/userName" /><input autocomplete="off" type="text" id="mytrip_acct_email" maxlength="64" name="wdf_username" />
1125
- </span>
1126
- </div>
1127
- <div class="form_line_wrapper">
1128
- <label for="mytrip_acct_pwd">Password</label><span class="form_entry">
1129
- <input type="hidden" name="xwdf_password" value="/sessionWorkflow/userWorkflow/profileAccountRequirements/password" /><input type="password" id="mytrip_acct_pwd" maxlength="20" name="wdf_password" />
1130
- </span>
1131
- </div>
1132
- <div id="ff_mytrip_acct_submit">
1133
- <a class="forgot_pass" title="Click here to request your Password" href="javascript:fieldName='wdf_RequestUserID'; openRequestUserID();">Forgot password?</a>
1134
- <input type="hidden" name="_handler=com.sita.ats.amtrak.presentation.handler.request.profile.AmtrakProfileLogonRequestHandler/_xpath=/sessionWorkflow/userWorkflow/profileAccountRequirements" />
1135
- <input type="image" alt="Log In" name="_handler=com.sita.ats.amtrak.presentation.handler.request.profile.AmtrakProfileLogonRequestHandler/_xpath=/sessionWorkflow/userWorkflow/profileAccountRequirements" onclick="" src="/images/en/btn_login.gif" />
1136
- </div>
1137
- </form>
1138
-
1139
- </div>
1140
-
1141
- </div>
1142
- </div>
1143
-
1144
-
1145
- <script type="text/javascript" language="javascript" charset="utf-8">
1146
- // <![CDATA[
1147
- new Ajax.Autocompleter('departs','autocomplete_availability_from', '/itd/amtrak/AutoComplete', {
1148
- paramName: "_origin",
1149
- minChars: 2,
1150
- frequency: 0.5
1151
- }
1152
- );
1153
- new Ajax.Autocompleter('arrives','autocomplete_availability_to','/itd/amtrak/AutoComplete', {
1154
- paramName: "_destination",
1155
- minChars: 2,
1156
- frequency: 0.5
1157
- }
1158
- );
1159
- new Ajax.Autocompleter('agrdeparts','redeem_from_auto', '/itd/amtrak/AutoComplete', {
1160
- paramName: "_origin",
1161
- minChars: 2,
1162
- frequency: 0.5
1163
- }
1164
- );
1165
- new Ajax.Autocompleter('agrarrives','redeem_to_auto','/itd/amtrak/AutoComplete', {
1166
- paramName: "_destination",
1167
- minChars: 2,
1168
- frequency: 0.5
1169
- }
1170
- );
1171
- new Ajax.Autocompleter('schedules_from','schedule_from_auto','/itd/amtrak/AutoComplete', {
1172
- paramName: "_origin",
1173
- minChars: 2,
1174
- frequency: 0.5
1175
- }
1176
- );
1177
- new Ajax.Autocompleter('schedules_to','schedule_to_auto','/itd/amtrak/AutoComplete', {
1178
- paramName: "_destination",
1179
- minChars: 2,
1180
- frequency: 0.5
1181
- }
1182
- );
1183
- new Ajax.Autocompleter('status_from','status_from_auto','/itd/amtrak/AutoComplete', {
1184
- paramName: "_origin",
1185
- minChars: 2,
1186
- frequency: 0.5
1187
- }
1188
- );
1189
- new Ajax.Autocompleter('status_to','status_to_auto','/itd/amtrak/AutoComplete', {
1190
- paramName: "_destination",
1191
- minChars: 2,
1192
- frequency: 0.5
1193
- }
1194
- );
1195
- new Ajax.Autocompleter('status_from1','status_from_auto1','/itd/amtrak/AutoComplete', {
1196
- paramName: "_origin",
1197
- minChars: 2,
1198
- frequency: 0.5
1199
- }
1200
- );
1201
- new Ajax.Autocompleter('status_to1','status_to_auto1','/itd/amtrak/AutoComplete', {
1202
- paramName: "_destination",
1203
- minChars: 2,
1204
- frequency: 0.5
1205
- }
1206
- );
1207
- // ]]>
1208
- </script>
1209
-
1210
- <!-- End HTML for Fare Finder -->
1211
- <script language="JavaScript" type="text/javascript">
1212
- <!--
1213
- function CheckMandatoryTrainStatusFieldsForStatusByTrainNumber() {
1214
- var errorMsg = "";
1215
- var fieldList = "";
1216
- var arrivalStatus_checked = document.ff_status_form1.status_arr.checked;
1217
- var departureStatus_checked = document.ff_status_form1.status_dep.checked;
1218
- var origin = document.ff_status_form1.wdf_origin.value;
1219
- var destination = document.ff_status_form1.wdf_destination.value;
1220
- var trainNumber = document.ff_status_form1.wdf_trainNumber.value;
1221
- if(trainNumber == "") {
1222
- trainNumber = "";
1223
- }
1224
- if (departureStatus_checked && origin == "")
1225
- fieldList = fieldList + " -- Departure Station" + "\n";
1226
- if (arrivalStatus_checked && destination == "")
1227
- fieldList = fieldList + " -- Arrival Station" + "\n";
1228
- if (trainNumber == "" || ((trainNumber != "") && (!IsNumber(trainNumber))))
1229
- fieldList = fieldList + " -- Valid Train or Bus Number" + "\n";
1230
- if (fieldList != "")
1231
- errorMsg = "The following information is needed to process your request:" + "\n" + fieldList;
1232
- if (errorMsg != ""){
1233
- alert(errorMsg);
1234
- return false;
1235
- }
1236
- if(arrivalStatus_checked) {
1237
- document.ff_status_form1.wdf_origin.value = '';
1238
- } else if(departureStatus_checked) {
1239
- document.ff_status_form1.wdf_destination.value = '';
1240
- }
1241
- return true;
1242
- }
1243
- function CheckMandatoryTrainStatusFieldsForStatusByCityPair() {
1244
- var errorMsg ="";
1245
- var fieldList = "";
1246
- var origin = document.ff_status_form2.wdf_origin.value;
1247
- var destination = document.ff_status_form2.wdf_destination.value;
1248
- if (origin == "")
1249
- fieldList = fieldList + " -- From" + "\n";
1250
- if (destination == "")
1251
- fieldList = fieldList + " -- To" + "\n";
1252
- if (fieldList != "")
1253
- errorMsg = "The following information is needed to process your request:" + "\n" + fieldList;
1254
- if (errorMsg != "") {
1255
- alert(errorMsg);
1256
- return false;
1257
- }
1258
- return true;
1259
- }
1260
- function CheckMandatoryScheduleFields(statusForm) {
1261
- var errorMsg ="";
1262
- var fieldList = "";
1263
- var origin = statusForm.wdf_origin.value;
1264
- var destination = statusForm.wdf_destination.value;
1265
- if (origin == "" && destination == "")
1266
- fieldList = "Problem with Departure and Arrival Station/City: Please provide a valid departure and arrival station or city name and resubmit. \n[Error ID: 573S]" + "\n";
1267
- if (origin != "" && destination == "")
1268
- fieldList = fieldList + "Problem with Departure and Arrival Station/City: Please provide a valid departure and arrival station or city name and resubmit. \n[Error ID: 573S]" + "\n";
1269
- if (origin == "" && destination != "")
1270
- fieldList = fieldList + "Problem with Departure and Arrival Station/City: Please provide a valid departure and arrival station or city name and resubmit. \n[Error ID: 573S]" + "\n";
1271
- if (fieldList != "") {
1272
- errorMsg = "The following information is needed to process your request:" + "\n\n" + fieldList;
1273
- }
1274
- if (errorMsg != "") {
1275
- alert(errorMsg);
1276
- return false;
1277
- }
1278
- return true;
1279
- }
1280
- function CheckMandatoryMyTripFields(theForm) {
1281
- var errorMsg ="";
1282
- var fieldList = "";
1283
- if ($('mytrip_res_num').value.empty()) {
1284
- fieldList += " -- reservation number\n";
1285
- }
1286
- if ($('mytrip_res_email').value.empty() && $('mytrip_res_zip').value.empty()) {
1287
- fieldList += " -- email address or telephone number\n";
1288
- }
1289
- if (fieldList != "") {
1290
- errorMsg="The following information is needed to process your request:" + "\n" + fieldList+ "\n\n";
1291
- alert(errorMsg);
1292
- return false;
1293
- }
1294
- return true;
1295
- }
1296
- function CheckMandatoryMyTripFields(theForm) {
1297
- var errorMsg ="";
1298
- var fieldList = "";
1299
- if ($('mytrip_res_num').value.empty()) {
1300
- fieldList += " -- reservation number\n";
1301
- }
1302
- if ($('mytrip_res_email').value.empty() && $('mytrip_res_zip').value.empty()) {
1303
- fieldList += " -- email address or telephone number\n";
1304
- }
1305
- if (fieldList != "") {
1306
- errorMsg="The following information is needed to process your request:" + "\n" + fieldList+ "\n\n";
1307
- alert(errorMsg);
1308
- return false;
1309
- }
1310
- return true;
1311
- }
1312
- function CheckMandatoryLoginFields(theForm) {
1313
- var errorMsg ="";
1314
- var fieldList = "";
1315
- if(eval("theForm.wdf_username.value") == "") {
1316
- fieldList += " -- username\n";
1317
- }
1318
- if(eval("theForm.wdf_password.value") == "") {
1319
- fieldList += " -- password\n";
1320
- }
1321
- if (fieldList != "") {
1322
- errorMsg="The following information is needed to process your request:" + "\n" + fieldList+ "\n\n";
1323
- alert(errorMsg);
1324
- return false;
1325
- }
1326
- return true;
1327
- }
1328
- //Aibe-2026,Mac safari issue.
1329
- function updateMaxLength()
1330
- {
1331
- trainNum = document.getElementById('status_train_num');
1332
- trainNum.setAttribute("maxLength", 4);
1333
- }
1334
- function validatePasswordSize() {
1335
- var memberPwd = document.getElementById('ff_memberpassword');
1336
- if((memberPwd != null) && (memberPwd.value != "")) {
1337
- if ((memberPwd.value.length < '6') ||
1338
- (memberPwd.value.length > '29') ) {
1339
- return 'The password you entered is invalid. Please try again or call 1-800-307-5000 for assistance (Sunday - Saturday, 5 am - midnight ET). [Error ID: 1114R]';
1340
- }
1341
- }
1342
- return "";
1343
- }
1344
- function checkRedeemMandatoryFields(theForm) {
1345
- var errorMsg ="";
1346
- var fieldList = "";
1347
- var origin = document.ff_redeem_form.agrdeparts.value;
1348
- var destination = document.ff_redeem_form.agrarrives.value;
1349
- var startDate = document.getElementById('wdfdate15').value;
1350
- var memberNo = document.getElementById('ff_membernumber');
1351
- var memberPwd = document.getElementById('ff_memberpassword');
1352
- if (memberNo != null) { //member number null means login was already validated
1353
- if (memberNo.value == "") {
1354
- fieldList = fieldList + " -- Member Number\n";
1355
- }
1356
- }
1357
- if(memberPwd != null) {//member password null means login was already validated
1358
- if (memberPwd.value == "") {
1359
- fieldList = fieldList + " -- Member Passsword\n";
1360
- }
1361
- }
1362
- if (origin == "") {
1363
- fieldList = fieldList + " -- From\n";
1364
- }
1365
- if(destination == "") {
1366
- fieldList = fieldList + " -- To\n";
1367
- }
1368
- if (startDate == "") {
1369
- fieldList = fieldList + " -- Day\n";
1370
- }
1371
- if (fieldList != "") {
1372
- errorMsg="The following information is needed to process your request:" + "\n" + fieldList+ "\n\n";
1373
- alert(errorMsg);
1374
- return false;
1375
- }
1376
- return fieldList;
1377
- }
1378
- function checkValidCouponCode(id){
1379
- var errorMsg='';
1380
- var newCouponCode = document.getElementById(id).value;
1381
- if(newCouponCode == "Promo Code") {
1382
- document.getElementById('ff_disc_promoCode').value = "";
1383
- newCouponCode= ""
1384
- }
1385
- newCouponCode = trim(newCouponCode);
1386
- if(newCouponCode == '')
1387
- return true;
1388
- var isValidCode = validateCouponCode(newCouponCode);
1389
- if(isValidCode == false) {
1390
- errorMsg = 'Problem with Promotion Code: The Promotion Code you entered is not valid. Please check for accuracy and re-enter it, or continue without it. \n[Error ID: 744S]';
1391
- }
1392
- if (errorMsg!=""){
1393
- alert(errorMsg);
1394
- return false;
1395
- } else {
1396
- return true;
1397
- }
1398
- }
1399
- function trim(s) {
1400
- return s.replace(/^\s+|\s+$/g, "");
1401
- }
1402
- //-->
1403
- </script>
1404
-
1405
-
1406
-
1407
- <meta name="WT.cg_s" content="book" />
1408
-
1409
-
1410
-
1411
-
1412
-
1413
- </div>
1414
-
1415
- <div id="special_booking_menu">
1416
-
1417
- </div>
1418
-
1419
-
1420
-
1421
-
1422
-
1423
- <style type="text/css">
1424
- <!--
1425
- @import url(/css/basic_booking.css);
1426
- -->
1427
- </style>
1428
-
1429
-
1430
-
1431
- <span id="IB_diginet_div">
1432
-
1433
- </span>
1434
-
1435
-
1436
-
1437
-
1438
- </div>
1439
-
1440
- <div id="mb_column_1_confirmation">
1441
- <form name="form" action="http://tickets.amtrak.com/itd/amtrak" method="post"><input type="hidden" name="requestor" value="amtrak.presentation.handler.page.rail.AmtrakRailGetTrainStatusPageHandler" />
1442
-
1443
-
1444
-
1445
-
1446
-
1447
-
1448
-
1449
-
1450
-
1451
- <style type="text/css">
1452
- #pagination_bar {
1453
- clear:both;
1454
- padding-top: 20px;
1455
- font-family: Arial, Verdana, Helvetica, sans-serif;
1456
- size: 108%;
1457
- color: #1375b3;
1458
- }
1459
- #pagination_bar #pagination_data {
1460
- width: 49%;
1461
- float: left;
1462
- text-align: left;
1463
- padding-bottom: 1px;
1464
- }
1465
- #pagination_bar #pagination_nav {
1466
- width: 49%;
1467
- float: right;
1468
- text-align: right;
1469
- padding-bottom: 1px;
1470
- }
1471
- #pagination_bar #pagination_nav span {
1472
- padding-left: 10px;
1473
- }
1474
- #pagination_bar #pagination_nav a, #availability_grid #pagination_bar #pagination_nav a:visited, #availability_grid #pagination_bar #pagination_nav a:hover {
1475
- color: #1375b3;
1476
- }
1477
- #pagination_bar #pagination_nav a.selected, #availability_grid #pagination_bar #pagination_nav a.selected:visited, #availability_grid #pagination_bar #pagination_nav a.selected:hover {
1478
- color: #ff9933;
1479
- text-decoration: none;
1480
- cursor: text;
1481
- background-color: white;
1482
- }
1483
- #loadingtrain {
1484
- width:100px;
1485
- height: 100px;
1486
- position: fixed;
1487
- top: 50%;
1488
- left: 60%;
1489
- background:url(/images/en/superpnr/image_loader_blue.gif) no-repeat center #fff;
1490
- text-align:center;
1491
- padding:10px;
1492
- font:normal 16px Tahoma, Geneva, sans-serif;
1493
- border:1px solid #666;
1494
- margin-left: -50px;
1495
- margin-top: -50px;
1496
- z-index:2;
1497
- overflow: auto;
1498
- }
1499
- #loadingfailed {
1500
- width:100px;
1501
- height: 100px;
1502
- position: fixed;
1503
- top: 50%;
1504
- left: 60%;
1505
- background:#fff;
1506
- text-align:center;
1507
- padding:10px;
1508
- font:normal 16px Tahoma, Geneva, sans-serif;
1509
- border:1px solid #666;
1510
- margin-left: -50px;
1511
- margin-top: -50px;
1512
- z-index:2;
1513
- overflow: auto;
1514
- }
1515
- #overlay {
1516
- background-color:#EEE;
1517
- }
1518
- </style>
1519
- <script language="JavaScript" type="text/javascript" src="/itd/project/scripts/en/amtrak/basic_pagination_trainstatus.js"></script>
1520
- <script type="text/javascript">
1521
- var pageDisplay = '10';
1522
- var currentPage = 0;
1523
- var availabilityLength = '19';
1524
- var trainStatusType = 'statusByCityPair';
1525
- var statusResult;
1526
- Element.observe(window, 'load', function(){
1527
- show_ff_tab('status');
1528
- if(trainStatusType == 'statusByTrainNumber') {
1529
- switchToStatusByTrain();
1530
- } else if(trainStatusType == 'statusByCityPair') {
1531
- switchToStatusByCity();
1532
- }
1533
- setDepartOrArrivalFieldVisibility();
1534
- pageFilterDisplay(availabilityLength);
1535
- });
1536
- </script>
1537
-
1538
-
1539
- <div>
1540
- <h1 class="train_status">Current Train Status<span></span></h1>
1541
- <br class="clear_both" />
1542
- </div>
1543
-
1544
-
1545
- <div id="more_status_results">
1546
- <div id="train_status_resp_by_citypair_heading">
1547
-
1548
- <div id="resp_by_citypair_heading_left">
1549
- <div>PVD</div>
1550
- <div id="resp_by_citypair_heading_line2">Providence, RI</div>
1551
- </div>
1552
- <div id="resp_by_citypair_heading_middle">
1553
- <img alt="" src="/images/en/station-to-station-arrow.png" />
1554
- </div>
1555
- <div id="resp_by_citypair_heading_right">
1556
- <div>BBY</div>
1557
- <div id="resp_by_citypair_heading_line2">Boston, MA</div>
1558
- </div>
1559
-
1560
- </div>
1561
- <div id="train_status_spacing1"></div>
1562
-
1563
-
1564
- <div id="train_status_resp_by_citypair">
1565
- <div id="resp_by_citypair_subheading">
1566
- <div id="resp_by_citypair_subheading_trainname">
1567
- 178&nbsp;Northeast Regional
1568
- </div>
1569
- </div>
1570
-
1571
- <div id="resp_by_citypair_depart_status_details">
1572
-
1573
-
1574
- <div class="statusDetailsSection">
1575
- <div class="cityName">PVD</div>
1576
-
1577
-
1578
- <div class="cancelledMsg">Canceled</div>
1579
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1580
- <div class="scheduledArriveDepartMsg">
1581
-
1582
- <div class="scheduledArriveDepartMsg">
1583
- Scheduled Departure&nbsp;11:37 pm
1584
- </div>
1585
-
1586
- </div>
1587
-
1588
-
1589
- </div>
1590
-
1591
- </div>
1592
-
1593
- <div id="resp_by_citypair_arrow_img">
1594
-
1595
- <img src="/images/en/canceled.png" />
1596
-
1597
-
1598
- </div>
1599
-
1600
- <div id="resp_by_citypair_arrive_status_details">
1601
-
1602
-
1603
- <div class="statusDetailsSection">
1604
- <div class="cityName">BBY</div>
1605
-
1606
-
1607
- <div class="cancelledMsg">Canceled</div>
1608
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1609
- <div class="scheduledArriveDepartMsg">
1610
-
1611
- <div class="scheduledArriveDepartMsg">
1612
- Scheduled Arrival&nbsp;12:24 am
1613
- </div>
1614
-
1615
-
1616
- </div>
1617
-
1618
-
1619
- </div>
1620
-
1621
- </div>
1622
-
1623
- </div>
1624
-
1625
- <div id="train_status_spacing"></div>
1626
-
1627
-
1628
- <div id="train_status_resp_by_citypair">
1629
- <div id="resp_by_citypair_subheading">
1630
- <div id="resp_by_citypair_subheading_trainname">
1631
- 66&nbsp;Northeast Regional
1632
- </div>
1633
- </div>
1634
-
1635
- <div id="resp_by_citypair_depart_status_details">
1636
-
1637
-
1638
- <div class="statusDetailsSection">
1639
- <div class="cityName">PVD</div>
1640
-
1641
-
1642
- <div class="cancelledMsg">Canceled</div>
1643
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1644
- <div class="scheduledArriveDepartMsg">
1645
-
1646
- <div class="scheduledArriveDepartMsg">
1647
- Scheduled Departure&nbsp;6:56 am
1648
- </div>
1649
-
1650
- </div>
1651
-
1652
-
1653
- </div>
1654
-
1655
- </div>
1656
-
1657
- <div id="resp_by_citypair_arrow_img">
1658
-
1659
- <img src="/images/en/canceled.png" />
1660
-
1661
-
1662
- </div>
1663
-
1664
- <div id="resp_by_citypair_arrive_status_details">
1665
-
1666
-
1667
- <div class="statusDetailsSection">
1668
- <div class="cityName">BBY</div>
1669
-
1670
-
1671
- <div class="cancelledMsg">Canceled</div>
1672
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1673
- <div class="scheduledArriveDepartMsg">
1674
-
1675
- <div class="scheduledArriveDepartMsg">
1676
- Scheduled Arrival&nbsp;7:53 am
1677
- </div>
1678
-
1679
-
1680
- </div>
1681
-
1682
-
1683
- </div>
1684
-
1685
- </div>
1686
-
1687
- </div>
1688
-
1689
- <div id="train_status_spacing"></div>
1690
-
1691
-
1692
- <div id="train_status_resp_by_citypair">
1693
- <div id="resp_by_citypair_subheading">
1694
- <div id="resp_by_citypair_subheading_trainname">
1695
- 2190&nbsp;Acela Express
1696
- </div>
1697
- </div>
1698
-
1699
- <div id="resp_by_citypair_depart_status_details">
1700
-
1701
-
1702
- <div class="statusDetailsSection">
1703
- <div class="cityName">PVD</div>
1704
-
1705
-
1706
- <div class="cancelledMsg">Canceled</div>
1707
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1708
- <div class="scheduledArriveDepartMsg">
1709
-
1710
- <div class="scheduledArriveDepartMsg">
1711
- Scheduled Departure&nbsp;9:18 am
1712
- </div>
1713
-
1714
- </div>
1715
-
1716
-
1717
- </div>
1718
-
1719
- </div>
1720
-
1721
- <div id="resp_by_citypair_arrow_img">
1722
-
1723
- <img src="/images/en/canceled.png" />
1724
-
1725
-
1726
- </div>
1727
-
1728
- <div id="resp_by_citypair_arrive_status_details">
1729
-
1730
-
1731
- <div class="statusDetailsSection">
1732
- <div class="cityName">BBY</div>
1733
-
1734
-
1735
- <div class="cancelledMsg">Canceled</div>
1736
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1737
- <div class="scheduledArriveDepartMsg">
1738
-
1739
- <div class="scheduledArriveDepartMsg">
1740
- Scheduled Arrival&nbsp;9:59 am
1741
- </div>
1742
-
1743
-
1744
- </div>
1745
-
1746
-
1747
- </div>
1748
-
1749
- </div>
1750
-
1751
- </div>
1752
-
1753
- <div id="train_status_spacing"></div>
1754
-
1755
-
1756
- <div id="train_status_resp_by_citypair">
1757
- <div id="resp_by_citypair_subheading">
1758
- <div id="resp_by_citypair_subheading_trainname">
1759
- 190&nbsp;Northeast Regional
1760
- </div>
1761
- </div>
1762
-
1763
- <div id="resp_by_citypair_depart_status_details">
1764
-
1765
-
1766
- <div class="statusDetailsSection">
1767
- <div class="cityName">PVD</div>
1768
-
1769
-
1770
- <div class="cancelledMsg">Canceled</div>
1771
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1772
- <div class="scheduledArriveDepartMsg">
1773
-
1774
- <div class="scheduledArriveDepartMsg">
1775
- Scheduled Departure&nbsp;10:17 am
1776
- </div>
1777
-
1778
- </div>
1779
-
1780
-
1781
- </div>
1782
-
1783
- </div>
1784
-
1785
- <div id="resp_by_citypair_arrow_img">
1786
-
1787
- <img src="/images/en/canceled.png" />
1788
-
1789
-
1790
- </div>
1791
-
1792
- <div id="resp_by_citypair_arrive_status_details">
1793
-
1794
-
1795
- <div class="statusDetailsSection">
1796
- <div class="cityName">BBY</div>
1797
-
1798
-
1799
- <div class="cancelledMsg">Canceled</div>
1800
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1801
- <div class="scheduledArriveDepartMsg">
1802
-
1803
- <div class="scheduledArriveDepartMsg">
1804
- Scheduled Arrival&nbsp;10:59 am
1805
- </div>
1806
-
1807
-
1808
- </div>
1809
-
1810
-
1811
- </div>
1812
-
1813
- </div>
1814
-
1815
- </div>
1816
-
1817
- <div id="train_status_spacing"></div>
1818
-
1819
-
1820
- <div id="train_status_resp_by_citypair">
1821
- <div id="resp_by_citypair_subheading">
1822
- <div id="resp_by_citypair_subheading_trainname">
1823
- 2150&nbsp;Acela Express
1824
- </div>
1825
- </div>
1826
-
1827
- <div id="resp_by_citypair_depart_status_details">
1828
-
1829
-
1830
- <div class="statusDetailsSection">
1831
- <div class="cityName">PVD</div>
1832
-
1833
-
1834
- <div class="cancelledMsg">Canceled</div>
1835
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1836
- <div class="scheduledArriveDepartMsg">
1837
-
1838
- <div class="scheduledArriveDepartMsg">
1839
- Scheduled Departure&nbsp;10:53 am
1840
- </div>
1841
-
1842
- </div>
1843
-
1844
-
1845
- </div>
1846
-
1847
- </div>
1848
-
1849
- <div id="resp_by_citypair_arrow_img">
1850
-
1851
- <img src="/images/en/canceled.png" />
1852
-
1853
-
1854
- </div>
1855
-
1856
- <div id="resp_by_citypair_arrive_status_details">
1857
-
1858
-
1859
- <div class="statusDetailsSection">
1860
- <div class="cityName">BBY</div>
1861
-
1862
-
1863
- <div class="cancelledMsg">Canceled</div>
1864
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1865
- <div class="scheduledArriveDepartMsg">
1866
-
1867
- <div class="scheduledArriveDepartMsg">
1868
- Scheduled Arrival&nbsp;11:34 am
1869
- </div>
1870
-
1871
-
1872
- </div>
1873
-
1874
-
1875
- </div>
1876
-
1877
- </div>
1878
-
1879
- </div>
1880
-
1881
- <div id="train_status_spacing"></div>
1882
-
1883
-
1884
- <div id="train_status_resp_by_citypair">
1885
- <div id="resp_by_citypair_subheading">
1886
- <div id="resp_by_citypair_subheading_trainname">
1887
- 170&nbsp;Northeast Regional
1888
- </div>
1889
- </div>
1890
-
1891
- <div id="resp_by_citypair_depart_status_details">
1892
-
1893
-
1894
- <div class="statusDetailsSection">
1895
- <div class="cityName">PVD</div>
1896
-
1897
-
1898
- <div class="cancelledMsg">Canceled</div>
1899
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1900
- <div class="scheduledArriveDepartMsg">
1901
-
1902
- <div class="scheduledArriveDepartMsg">
1903
- Scheduled Departure&nbsp;11:58 am
1904
- </div>
1905
-
1906
- </div>
1907
-
1908
-
1909
- </div>
1910
-
1911
- </div>
1912
-
1913
- <div id="resp_by_citypair_arrow_img">
1914
-
1915
- <img src="/images/en/canceled.png" />
1916
-
1917
-
1918
- </div>
1919
-
1920
- <div id="resp_by_citypair_arrive_status_details">
1921
-
1922
-
1923
- <div class="statusDetailsSection">
1924
- <div class="cityName">BBY</div>
1925
-
1926
-
1927
- <div class="cancelledMsg">Canceled</div>
1928
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1929
- <div class="scheduledArriveDepartMsg">
1930
-
1931
- <div class="scheduledArriveDepartMsg">
1932
- Scheduled Arrival&nbsp;12:39 pm
1933
- </div>
1934
-
1935
-
1936
- </div>
1937
-
1938
-
1939
- </div>
1940
-
1941
- </div>
1942
-
1943
- </div>
1944
-
1945
- <div id="train_status_spacing"></div>
1946
-
1947
-
1948
- <div id="train_status_resp_by_citypair">
1949
- <div id="resp_by_citypair_subheading">
1950
- <div id="resp_by_citypair_subheading_trainname">
1951
- 2154&nbsp;Acela Express
1952
- </div>
1953
- </div>
1954
-
1955
- <div id="resp_by_citypair_depart_status_details">
1956
-
1957
-
1958
- <div class="statusDetailsSection">
1959
- <div class="cityName">PVD</div>
1960
-
1961
-
1962
-
1963
-
1964
-
1965
-
1966
-
1967
- <div class="arriveDepartDelayedMsg"> Departed</div>
1968
- <div class="delayedMsg">37 minutes late</div>
1969
-
1970
- <div class="arriveDepartTime">1:32 pm</div>
1971
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
1972
-
1973
-
1974
-
1975
- <div class="scheduledArriveDepartMsg">
1976
- Scheduled Departure&nbsp;12:55 pm
1977
- </div>
1978
-
1979
-
1980
- </div>
1981
-
1982
- </div>
1983
-
1984
- <div id="resp_by_citypair_arrow_img">
1985
-
1986
-
1987
-
1988
-
1989
-
1990
-
1991
- <img src="/images/en/delayed-arrived.png" />
1992
-
1993
-
1994
-
1995
-
1996
-
1997
- </div>
1998
-
1999
- <div id="resp_by_citypair_arrive_status_details">
2000
-
2001
-
2002
- <div class="statusDetailsSection">
2003
- <div class="cityName">BBY</div>
2004
-
2005
-
2006
-
2007
-
2008
-
2009
-
2010
-
2011
- <div class="arriveDepartDelayedMsg"> Arrived</div>
2012
- <div class="delayedMsg">31 minutes late</div>
2013
-
2014
- <div class="arriveDepartTime">2:05 pm</div>
2015
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
2016
-
2017
-
2018
-
2019
-
2020
- <div class="scheduledArriveDepartMsg">
2021
- Scheduled Arrival&nbsp;1:34 pm
2022
- </div>
2023
-
2024
-
2025
- </div>
2026
-
2027
- </div>
2028
-
2029
- </div>
2030
-
2031
- <div id="train_status_spacing"></div>
2032
-
2033
-
2034
- <div id="train_status_resp_by_citypair">
2035
- <div id="resp_by_citypair_subheading">
2036
- <div id="resp_by_citypair_subheading_trainname">
2037
- 172&nbsp;Northeast Regional
2038
- </div>
2039
- </div>
2040
-
2041
- <div id="resp_by_citypair_depart_status_details">
2042
-
2043
-
2044
- <div class="statusDetailsSection">
2045
- <div class="cityName">PVD</div>
2046
-
2047
-
2048
- <div class="cancelledMsg">Canceled</div>
2049
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
2050
- <div class="scheduledArriveDepartMsg">
2051
-
2052
- <div class="scheduledArriveDepartMsg">
2053
- Scheduled Departure&nbsp;2:23 pm
2054
- </div>
2055
-
2056
- </div>
2057
-
2058
-
2059
- </div>
2060
-
2061
- </div>
2062
-
2063
- <div id="resp_by_citypair_arrow_img">
2064
-
2065
- <img src="/images/en/canceled.png" />
2066
-
2067
-
2068
- </div>
2069
-
2070
- <div id="resp_by_citypair_arrive_status_details">
2071
-
2072
-
2073
- <div class="statusDetailsSection">
2074
- <div class="cityName">BBY</div>
2075
-
2076
-
2077
- <div class="cancelledMsg">Canceled</div>
2078
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
2079
- <div class="scheduledArriveDepartMsg">
2080
-
2081
- <div class="scheduledArriveDepartMsg">
2082
- Scheduled Arrival&nbsp;3:09 pm
2083
- </div>
2084
-
2085
-
2086
- </div>
2087
-
2088
-
2089
- </div>
2090
-
2091
- </div>
2092
-
2093
- </div>
2094
-
2095
- <div id="train_status_spacing"></div>
2096
-
2097
-
2098
- <div id="train_status_resp_by_citypair">
2099
- <div id="resp_by_citypair_subheading">
2100
- <div id="resp_by_citypair_subheading_trainname">
2101
- 2158&nbsp;Acela Express
2102
- </div>
2103
- </div>
2104
-
2105
- <div id="resp_by_citypair_depart_status_details">
2106
-
2107
-
2108
- <div class="statusDetailsSection">
2109
- <div class="cityName">PVD</div>
2110
-
2111
-
2112
- <div class="cancelledMsg">Canceled</div>
2113
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
2114
- <div class="scheduledArriveDepartMsg">
2115
-
2116
- <div class="scheduledArriveDepartMsg">
2117
- Scheduled Departure&nbsp;2:54 pm
2118
- </div>
2119
-
2120
- </div>
2121
-
2122
-
2123
- </div>
2124
-
2125
- </div>
2126
-
2127
- <div id="resp_by_citypair_arrow_img">
2128
-
2129
- <img src="/images/en/canceled.png" />
2130
-
2131
-
2132
- </div>
2133
-
2134
- <div id="resp_by_citypair_arrive_status_details">
2135
-
2136
-
2137
- <div class="statusDetailsSection">
2138
- <div class="cityName">BBY</div>
2139
-
2140
-
2141
- <div class="cancelledMsg">Canceled</div>
2142
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
2143
- <div class="scheduledArriveDepartMsg">
2144
-
2145
- <div class="scheduledArriveDepartMsg">
2146
- Scheduled Arrival&nbsp;3:36 pm
2147
- </div>
2148
-
2149
-
2150
- </div>
2151
-
2152
-
2153
- </div>
2154
-
2155
- </div>
2156
-
2157
- </div>
2158
-
2159
- <div id="train_status_spacing"></div>
2160
-
2161
-
2162
- <div id="train_status_resp_by_citypair">
2163
- <div id="resp_by_citypair_subheading">
2164
- <div id="resp_by_citypair_subheading_trainname">
2165
- 86&nbsp;Northeast Regional
2166
- </div>
2167
- </div>
2168
-
2169
- <div id="resp_by_citypair_depart_status_details">
2170
-
2171
-
2172
- <div class="statusDetailsSection">
2173
- <div class="cityName">PVD</div>
2174
-
2175
-
2176
-
2177
-
2178
-
2179
-
2180
-
2181
-
2182
-
2183
-
2184
-
2185
-
2186
- <div class="statusUnavailableMsg">Status unavailable</div>
2187
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
2188
-
2189
-
2190
-
2191
-
2192
- <div class="scheduledArriveDepartMsg">
2193
- Scheduled Departure&nbsp;3:47 pm
2194
- </div>
2195
-
2196
-
2197
- </div>
2198
-
2199
- </div>
2200
-
2201
- <div id="resp_by_citypair_arrow_img">
2202
-
2203
-
2204
-
2205
-
2206
-
2207
-
2208
-
2209
-
2210
-
2211
-
2212
-
2213
-
2214
-
2215
- <img src="/images/en/no-status-available-origin.png" />
2216
-
2217
-
2218
-
2219
-
2220
-
2221
-
2222
-
2223
-
2224
- </div>
2225
-
2226
- <div id="resp_by_citypair_arrive_status_details">
2227
-
2228
-
2229
- <div class="statusDetailsSection">
2230
- <div class="cityName">BBY</div>
2231
-
2232
-
2233
-
2234
-
2235
-
2236
-
2237
-
2238
-
2239
-
2240
-
2241
-
2242
-
2243
- <div class="statusUnavailableMsg">Status unavailable</div>
2244
- <div class="arriveDepartDate">Wed, Jan 28 2015</div>
2245
-
2246
-
2247
-
2248
-
2249
-
2250
- <div class="scheduledArriveDepartMsg">
2251
- Scheduled Arrival&nbsp;4:28 pm
2252
- </div>
2253
-
2254
-
2255
- </div>
2256
-
2257
- </div>
2258
-
2259
- </div>
2260
-
2261
- <div id="train_status_spacing"></div>
2262
-
2263
- </div>
2264
-
2265
-
2266
-
2267
-
2268
- <div id="pagination_bar">
2269
- <div id="pagination_data"></div>
2270
- <div id="pagination_nav"></div>
2271
- <br class="clear_both" />
2272
- </div>
2273
-
2274
- <hr class="after_pagination_bar" />
2275
-
2276
- <br class="clear_both" />
2277
- <div id="loadingtrain" style="display:none">Loading...</div>
2278
- <div id="loadingfailed" style="display: none">We're sorry, we're unable to process your request.<img src="/images/en/error_icon.gif"></div>
2279
-
2280
-
2281
-
2282
- <meta name="WT.cg_s" content="status" />
2283
-
2284
- <meta name="DCSext.NBR" content="preencoded:178;66;2190;190;2150;170;2154;172;2158;86" />
2285
- <meta name="DCSext.ORG" content="PVD" />
2286
- <meta name="DCSext.DST" content="BBY" />
2287
- <meta name="DCSext.DDT" content="2015/01/27" />
2288
- <meta name="DCSext.ADT" content="2015/01/28" />
2289
-
2290
-
2291
-
2292
- </form>
2293
- </div>
2294
- <br class="clear_both" />
2295
- </div>
2296
- </div>
2297
- </div>
2298
-
2299
-
2300
- <script language="JavaScript">
2301
- <!--
2302
- function getProfileStr(){
2303
- return 'amtrak';
2304
- }
2305
- document.write('<meta name="DCSext.PROFILE" content="'+getProfileStr()+'" />');
2306
- // -->
2307
- </script>
2308
- <meta name="WT.cg_n" content="booking" />
2309
-
2310
-
2311
-
2312
- <!-- START OF SmartSource Data Collector TAG -->
2313
- <!-- Copyright (c) 1996-2011 WebTrends Inc. All rights reserved. -->
2314
- <!-- Version: 9.3.0 -->
2315
- <!-- Tag Builder Version: 3.1 -->
2316
- <!-- Created: 2/11/2011 4:14:35 PM -->
2317
- <script src="/itd/project/scripts/en/sitewise/webtrends_session.js" type="text/javascript"></script>
2318
- <!-- ----------------------------------------------------------------------------------- -->
2319
- <!-- Warning: The two script blocks below must remain inline. Moving them to an external -->
2320
- <!-- JavaScript include file can cause serious problems with cross-domain tracking. -->
2321
- <!-- ----------------------------------------------------------------------------------- -->
2322
- <script type="text/javascript">
2323
- //<![CDATA[
2324
- var _tag=new WebTrends();
2325
- var defSiteWiseParams = "&PROFILE=amtrak&WT.cg_n=booking";
2326
- var CMS_dcsqry = window.location.search + defSiteWiseParams;
2327
- //]]>
2328
- </script>
2329
- <script type="text/javascript">
2330
- //<![CDATA[
2331
- _tag.dcsCustom=function(){
2332
- // Add custom parameters here.
2333
- //_tag.DCSext.param_name=param_value;
2334
- }
2335
- _tag.dcsCollect();
2336
- //]]>
2337
- </script>
2338
- <noscript>
2339
- <div><img alt="DCSIMG" id="DCSIMG" width="1" height="1" src="http://statse.webtrendslive.com/dcsn42u4k11e5hyzziz7zntl5_1j8l/njs.gif?dcsuri=/nojavascript&amp;WT.js=No&amp;DCS.dcscfg=1&amp;WT.tv=9.3.0&amp;WT.dcssip=www.amtrak.com"/></div>
2340
- </noscript>
2341
- <!-- END OF SmartSource Data Collector TAG -->
2342
-
2343
-
2344
- <!-- javascript for SSO -->
2345
- <script type="text/javascript">
2346
- var agrHost = (("https:"== document.location.protocol) ? "https://agr.amtrak.com/m/js":"http://agr.amtrak.com/m/js");
2347
- document.write(
2348
- unescape("%3Cscript src='" + agrHost + "/shoebox-simple.js' type='text/javascript'%3E%3C/script%3E")
2349
- );
2350
- </script>
2351
- <!-- mp_trans_remove_start --><script type="text/javascript" language="javascript" src='https://askjulie.amtrak.com/ui/includes/NIT.Embed.js' id="agentScript"></script><!-- mp_trans_remove_end -->
2352
- <script language="JavaScript" type="text/javascript">
2353
- <!--
2354
-
2355
- function getField(name,id){
2356
- return document.getElementById(name+id);
2357
- }
2358
-
2359
- function fieldExists(id){
2360
- return (document.getElementById('wdfdate'+id)!=null);
2361
- }
2362
-
2363
- function setDateDate(id,dt){
2364
- setDate(id,dt.getFullYear(),dt.getMonth()+1,dt.getDate());
2365
- }
2366
-
2367
- function setDate(id,year,month,day){
2368
- var dateInput=getField('wdfdate',id);
2369
- if (year==0 || month==0 || day==0){
2370
- dateInput.value="";
2371
- }else{
2372
- var inputFieldName = dateInput.name;
2373
- var dateInputFormat = inputFieldName.substring(inputFieldName.lastIndexOf(".") + 1, inputFieldName.length);
2374
- if (dateInputFormat == "eudate") { // DMY
2375
- dateInput.value=leadingZero(day)+'/'+leadingZero(month)+'/'+year;
2376
- }
2377
- if (dateInputFormat == "usdate") { // MDY
2378
- dateInput.value=leadingZero(month)+'/'+leadingZero(day)+'/'+year;
2379
- }
2380
- if (dateInputFormat == "isodate") { // YMD
2381
- dateInput.value=year+'/'+leadingZero(month)+'/'+leadingZero(day);
2382
- }
2383
- }
2384
- }
2385
-
2386
- function leadingZero(value){
2387
- if (value<10) value="0"+value;
2388
- return value;
2389
- }
2390
-
2391
- function getValidatedDateArray(id){
2392
- var array=getDateArray(id);
2393
- var year = parseInt(array[0],10);
2394
- var month = parseInt(array[1],10);
2395
- var day = parseInt(array[2],10);
2396
- if (year!=-1 && year<100){
2397
- year += 2000;
2398
- }
2399
- if (isNaN(year)||year<1900||year>9999){
2400
- year=0;
2401
- }
2402
- if (isNaN(month)||month<1||month>12){
2403
- month=0;
2404
- }
2405
- if (isNaN(day)||day<1||day>31){
2406
- day=0;
2407
- }
2408
-
2409
-
2410
- var Tdt=new Date(year,month-1,day,0,0,0,1);
2411
-
2412
- var iCal = window['itd_cal'+id];
2413
- if (iCal.toString().include('CalendarGroup')) {
2414
- // Do we need to check isDateOOB for the CalendarGroup
2415
- }
2416
- else {
2417
- // use the relevant calendar instance to check if the date is within the valid range for that calendar control
2418
- if( iCal.isDateOOB(Tdt) ) {
2419
- // set year to zero, this will trigger the setErrorOn display
2420
- year = 0;
2421
- }
2422
- }
2423
- return new Array(year,month,day);
2424
- }
2425
-
2426
- function getDateArray(id){
2427
- var date=getField('wdfdate',id).value;
2428
- var amdate = date;
2429
- date=date.replace(/[^0-9]/g,"/"); // only allow numbers and slashes
2430
- date=date.replace(/[\/]+/g,"/"); // only single slashes
2431
- var values = date.split("/");
2432
-
2433
- var inputFieldName = getField('wdfdate',id).name;
2434
- var dateInputFormat = inputFieldName.substring(inputFieldName.lastIndexOf(".") + 1, inputFieldName.length);
2435
- if (dateInputFormat == "eudate") { // DMY
2436
- return new Array(values[2],values[1],values[0]);
2437
- }
2438
- if (dateInputFormat == "usdate") { // MDY
2439
- return new Array(values[2],values[0],values[1]);
2440
- }
2441
- if (dateInputFormat == "isodate") { // YMD
2442
- return new Array(values[0],values[1],values[2]);
2443
- }
2444
- if (dateInputFormat == "date") { // YMD
2445
- if (date.blank()) {
2446
- return new Array(values[0],values[1],values[2]);
2447
- }
2448
- else {
2449
- values = amdate.split(", ");
2450
- var dvalues = values[1].split(" ");
2451
- var month = gsMonthNamesAbbr.indexOf(dvalues[0]) + 1;
2452
-
2453
- return new Array(values[2],month,dvalues[1]);
2454
- }
2455
- }
2456
- }
2457
-
2458
- function isValidDate(array) {
2459
- return (array[2]!=0 && array[1]!=0 && array[0]!=0);
2460
- }
2461
-
2462
- var timer=false;
2463
- function dateChangedTimer(id){
2464
- doDateChanged(id,-1);
2465
- if (!timer){
2466
- window.setTimeout('timer=false;dateChangedTimer('+id+');',1000);
2467
- timer=true;
2468
- }
2469
- }
2470
-
2471
- function dateChangedComplete(id,daysGap){
2472
- var returnradio = document.getElementById('wdfreturnradio');
2473
- if (returnradio!=null && returnradio.checked){
2474
- doDateChanged(id,daysGap);
2475
- }
2476
- }
2477
-
2478
- function doDateChanged(id,daysGap){
2479
-
2480
- if (id == 1 || id == 16) {
2481
- var str=getField('wdfdate',id).value;
2482
- if (str.length>0){
2483
- var array=getValidatedDateArray(id);
2484
- if (!isValidDate(array)){
2485
- setErrorOn(id);
2486
- }else{
2487
- var dt=new Date(array[0],array[1]-1,array[2],0,0,0,1);
2488
- if (array[2]!=dt.getDate()){
2489
- setErrorOn(id);
2490
- }else{
2491
- setErrorOff(id);
2492
- // The second field is not updated at all if -1 is found.
2493
- // if zero or greater is found, then the second field would be updated to the value of the firstField plus daysGap
2494
- if (daysGap>=0){
2495
- // setDate function does not do anything...
2496
- setDate(id,array[0],array[1],array[2]);
2497
- var returnradio = null;
2498
- if(id == 1)
2499
- returnradio = document.getElementById('return');
2500
- else if(id == 16)
2501
- returnradio = document.getElementById('othreturn');
2502
-
2503
- if (returnradio!=null && returnradio.checked){
2504
- if (getField('wdfdate',id+1)!=null){
2505
- // AIBE-2103 Get the return date and only update if depart date is > than return.
2506
- var rtnArray=getValidatedDateArray(id+1);
2507
- var rtnDt=new Date(rtnArray[0],rtnArray[1]-1,rtnArray[2],0,0,0,1);
2508
- if(dt > rtnDt) {
2509
- dt=new Date(dt.getFullYear(),dt.getMonth(),dt.getDate()+daysGap,0,0,0,1);
2510
- var newid = id+1;
2511
- var newtext = "wdfdate"+newid
2512
- var retDate = $(newtext);
2513
- retDate.value = formatDate(dt);
2514
-
2515
- }
2516
- }
2517
- }
2518
- }
2519
- }
2520
- }
2521
- }
2522
- }
2523
- updateDateState();
2524
- }
2525
-
2526
- function setErrorOn(id){
2527
- var cls=getField('wdfdate',id).className;
2528
- if (cls.indexOf('invalid')==-1){
2529
- getField('wdfdate',id).className=cls+' invalid';
2530
- }
2531
- }
2532
-
2533
- function setErrorOff(id){
2534
- var cls=getField('wdfdate',id).className;
2535
- if (cls.indexOf('invalid')>=0){
2536
- getField('wdfdate',id).className=cls.substring(0,cls.indexOf('invalid'));
2537
- }
2538
- }
2539
-
2540
- function updateDateState(){
2541
- if (self.updateRadioState) updateRadioState();
2542
- if (self.updateDowState) updateDowState();
2543
- if (self.updateTimeState) updateTimeState();
2544
- }
2545
-
2546
- //-->
2547
- </script>
2548
- <script language="JavaScript" type="text/javascript">
2549
- <!--
2550
- var booking_min_date = new Date();
2551
- var booking_max_date = new Date(2015, 11, 30);
2552
- function calConfig(itdUniqueId, cal, minDate, maxDate) {
2553
- cal.cfg.setProperty("close", true);
2554
- cal.cfg.setProperty("iframe", true);
2555
- cal.cfg.setProperty("START_WEEKDAY", "0");
2556
- cal.itdIdLink = itdUniqueId;
2557
- cal.cfg.setProperty("DATE_FIELD_DELIMITER", "/");
2558
- cal.cfg.setProperty("LOCALE_MONTHS", "long");
2559
- cal.cfg.setProperty("MONTHS_LONG", ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]);
2560
- cal.cfg.setProperty("LOCALE_WEEKDAYS", "short");
2561
- cal.cfg.setProperty("WEEKDAYS_SHORT", ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"]);
2562
- var itd_cal = cal;
2563
- YAHOO.util.Event.addListener("wdfdate"+itdUniqueId, "focus", calShow, itd_cal, true);
2564
- YAHOO.util.Event.addListener("calLink"+itdUniqueId, "click", calShow, itd_cal, true);
2565
- itd_cal.selectEvent.subscribe(handleSelect, itd_cal, true);
2566
- itd_cal.showEvent.subscribe(handleShow, itd_cal, true);
2567
- itd_cal.hideEvent.subscribe(handleHide, itd_cal, true);
2568
- if (itdUniqueId!=2) {
2569
- cal.cfg.setProperty("title", "Departure Date");
2570
- } else {
2571
- cal.cfg.setProperty("title", "Return Date");
2572
- }
2573
- cal.cfg.setProperty("mindate", minDate)
2574
- cal.cfg.setProperty("maxdate", maxDate)
2575
- }
2576
- var returnDaysAhead = 1;
2577
- //-->
2578
- </script>
2579
- <script language="JavaScript" type="text/javascript">
2580
- <!--
2581
- var itd_cal1 = new YAHOO.widget.CalendarGroup("itd_cal1", "calContainer1", {PAGES:2});
2582
- calConfig("1", itd_cal1, new Date(), new Date(2015, 11, 30));
2583
- //-->
2584
- </script>
2585
- <script language="JavaScript" type="text/javascript">
2586
- <!--
2587
- var defTime=null;
2588
- function updateTimeState() {
2589
-
2590
- if (defTime==null){
2591
- // this block of code stores off the default values of any timefields present on the page,
2592
- // this is only done once for a page, and only if the user changes a date field (now amended to also call this if they change a time field)
2593
- defTime=new Array("");
2594
- // Caution!
2595
- // remember that the id of the first time field on the page is >> "wdftime1"
2596
- // Starting with an id of zero, >> var id=0;
2597
- // preIncrement to 1, then check if field exists >> getField('wdftime',++id)!=null
2598
- // or >> ||
2599
- // again preIncrement, so value goes to 2, then check if field exists >> getField('wdftime',++id)!=null
2600
- // loop continues as long as condition evaluates to true.
2601
- // the double condition means time fields 1,2,4 can be saved off.. so if one number is missing from the sequence it will still work. I'm not sure why this is required.
2602
- // It may be used to break up field pairs, so one does not advance the next field. A missing digit could be used as a pair separator.
2603
- for (var id=0; getField('wdftime',++id)!=null || getField('wdftime',++id)!=null; ) {
2604
- defTime[id]=getField('wdftime',id).value;
2605
- }
2606
- }
2607
-
2608
- for (var id=0; getField('wdftime',++id)!=null || getField('wdftime',++id)!=null; ) {
2609
- var select=getField('wdftime',id);
2610
-
2611
- // this returns the contents of the specified DATE field in Y,M,D format.. it is not concerned with the time field.
2612
- // it validates crudely that the month is 1-12, and days are 1-31, if a value is invalid it is set to zero.
2613
- var array=getValidatedDateArray(id);
2614
-
2615
- // this checks if a zero was returned for any of the Y,M,D values..
2616
- // an empty date field is considered invalid
2617
- if (!isValidDate(array)){
2618
- // set to default value which we stored earlier
2619
- setTimeField(select,defTime[id]);
2620
- }
2621
-
2622
- }
2623
- }
2624
-
2625
- function setTimeField(fld,val) {
2626
- for (var i=0; i<fld.options.length; i++) {
2627
- if (fld.options[i].value==val) {
2628
- fld.selectedIndex=i;
2629
- break;
2630
- }
2631
- }
2632
- }
2633
-
2634
- function timeChanged() {
2635
-
2636
- }
2637
-
2638
- //-->
2639
- </script>
2640
- <script language="JavaScript" type="text/javascript">
2641
- <!--
2642
- var itd_cal2 = new YAHOO.widget.CalendarGroup("itd_cal2", "calContainer2", {PAGES:2});
2643
- calConfig("2", itd_cal2, new Date(), new Date(2015, 11, 30));
2644
- //-->
2645
- </script>
2646
- <script language="JavaScript" type="text/javascript">
2647
- <!--
2648
- var itd_cal15 = new YAHOO.widget.CalendarGroup("itd_cal15", "calContainer15", {PAGES:2});
2649
- calConfig("15", itd_cal15, new Date(), new Date(2015, 11, 30));
2650
- //-->
2651
- </script>
2652
- <script language="JavaScript" type="text/javascript">
2653
- <!--
2654
- var itd_cal10 = new YAHOO.widget.CalendarGroup("itd_cal10", "calContainer10", {PAGES:2});
2655
- calConfig("10", itd_cal10, new Date(2015, 0, 24), new Date(2015, 1, 3));
2656
- //-->
2657
- </script>
2658
- <script language="JavaScript" type="text/javascript">
2659
- <!--
2660
- var itd_cal11 = new YAHOO.widget.CalendarGroup("itd_cal11", "calContainer11", {PAGES:2});
2661
- calConfig("11", itd_cal11, new Date(2015, 0, 24), new Date(2015, 1, 3));
2662
- //-->
2663
- </script>
2664
- <script language="JavaScript" type="text/javascript">
2665
- <!--
2666
- var itd_cal5 = new YAHOO.widget.CalendarGroup("itd_cal5", "calContainer5", {PAGES:2});
2667
- calConfig("5", itd_cal5, new Date(), new Date(2015, 11, 30));
2668
- //-->
2669
- </script>
2670
- </body>
2671
- </html>