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