usps_standardizer 0.2.1 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  module USPSStandardizer
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 2
4
+ MINOR = 3
5
5
  PATCH = 1
6
6
  STRING = "#{MAJOR}.#{MINOR}.#{PATCH}"
7
7
  end
@@ -1,5 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
- require 'sanitize'
3
2
  require 'mechanize'
4
3
 
5
4
  module USPSStandardizer
@@ -29,44 +28,38 @@ module USPSStandardizer
29
28
  return {} unless (content = get_std_address_content)
30
29
 
31
30
  content.gsub!(/\t|\n|\r/, '')
32
- content.squeeze!(" ").strip!
33
-
34
- raw_matches = content.scan(%r{<td headers="\w+" height="34" valign="top" class="main" style="background:url\(images/table_gray\.gif\); padding:5px 10px;">(.*?)>Mailing Industry Information</a>}mi)
35
-
36
- raw_matches.inject({}) do |results, raw_match|
37
- if raw_match[0] =~ /mailingIndustryPopup2\(([^\)]*)/i
38
- @r_county = $1.split(',')[1].gsub(/'/, '')
39
- end
40
-
41
- @r_address, city_state_zipcode = Sanitize.clean(raw_match[0],
42
- :remove_contents => true,
43
- :elements => %w[br]
44
- ).strip.split('<br>')
45
- if city_state_zipcode.sub_nonascii(' ').squeeze!(' ') =~ /^(.*)\s+(\w\w)\s(\d{5})(-\d{4})?/i
46
- @r_city, @r_state, @r_zipcode = $1, $2, $3
47
- end
48
-
49
- results = {:address => @r_address, :city => @r_city, :state => @r_state, :county => @r_county, :zipcode => @r_zipcode}
50
- if cache
51
- cache[redis_key(@address)] = "#{@r_address}::#{@r_city}::#{@r_state}::#{@r_county}::#{@r_zipcode}"
52
- end
53
- results
31
+
32
+ content.scan %r{<span class=\"address1 range\">([^<]*)}
33
+ @r_address = $1.gsub(/^ | $/, '')
34
+
35
+ content.scan %r{<span class=\"city range\">([^<]*)}
36
+ @r_city = $1.gsub(/^ | $/, '')
37
+
38
+ content.scan %r{<span class=\"state range\">([^<]*)}
39
+ @r_state = $1.gsub(/^ | $/, '')
40
+
41
+ content.scan %r{<span class=\"zip\" style=\"\">([^<]*)}
42
+ @r_zipcode = $1.gsub(/^ | $/, '')
43
+
44
+ content.scan %r{<dt>County</dt><dd>([^<]*)}
45
+ @r_county = ($1.empty?) ? '' : $1.gsub(/^ | $/, '')
46
+
47
+
48
+ results = {:address => @r_address, :city => @r_city, :state => @r_state, :county => @r_county, :zipcode => @r_zipcode}
49
+ if cache
50
+ cache[redis_key(@address)] = "#{@r_address}::#{@r_city}::#{@r_state}::#{@r_county}::#{@r_zipcode}"
54
51
  end
52
+ results
55
53
  end
56
54
 
57
55
  private
58
56
 
59
57
  def get_std_address_content
60
- search_form = @mechanize.get('http://zip4.usps.com/zip4/').forms.first
58
+ url = "https://tools.usps.com/go/ZipLookupResultsAction!input.action?resultMode=0&companyName=&address1=#{@address}&address2=&city=#{@city}&state=#{@state}&urbanCode=&postalCode=&zip="
59
+ @mechanize.get url
61
60
 
62
- search_form.address2 = @address
63
- search_form.city = @city
64
- search_form.state = @state
65
-
66
- @mechanize.submit(search_form, search_form.buttons.first)
67
-
68
- return false unless @mechanize.page.search('p.mainRed').empty?
69
- @mechanize.page.body
61
+ return false unless @mechanize.page.search('div#error-box').empty?
62
+ return @mechanize.page.search('div#result-list ul li:first').to_html
70
63
  end
71
64
 
72
65
  def cache
@@ -78,20 +71,4 @@ module USPSStandardizer
78
71
  address.downcase.gsub(' ', '_')
79
72
  end
80
73
  end
81
- end
82
-
83
- String.class_eval do
84
- def sub_nonascii(replacement)
85
- chars = self.split("")
86
- self.slice!(0..self.size)
87
- chars.each do |char|
88
- if char.ord < 33 || char.ord > 127
89
- self.concat(replacement)
90
- else
91
- self.concat(char)
92
- end
93
- end
94
- self.to_s
95
- end
96
- end
97
-
74
+ end
@@ -1,906 +1 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
14
-
15
- <html>
16
- <head>
17
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
18
- <meta name="WT.z_search" content="address"></meta>
19
- <meta name="WT.z_value" content="match"></meta>
20
- <title>USPS - ZIP Code Lookup - Find a ZIP + 4 Code By Address Results</title>
21
- <link href="css/styles.css" rel="stylesheet" type="text/css" />
22
-
23
- <SCRIPT language="javascript1.1" type="text/javascript">
24
-
25
-
26
- function checkState(field) {
27
- field.state.value = field.state.value.toUpperCase();
28
- if (field.state.value == "PR") {
29
- var firmname = 'firmname=' + field.firmname.value;
30
- var address1 = '&address1=' + field.address1.value;
31
- var address2 = '&address2=' + field.address2.value;
32
- var city = '&city=' + field.city.value;
33
- var state = '&state=' + field.state.value;
34
- var zip5 = '&zip5=' + field.zip5.value;
35
- var urbanization = '&urbanization=' + field.urbanization.value;
36
- var url = 'welcome.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
37
- top.location.replace(url);
38
- }
39
- return true;
40
- }
41
-
42
-
43
- function checkStateError(field) {
44
- field.state.value = field.state.value.toUpperCase();
45
- if (field.state.value == "PR") {
46
- var firmname = 'firmname=' + field.firmname.value;
47
- var address1 = '&address1=' + field.address1.value;
48
- var address2 = '&address2=' + field.address2.value;
49
- var city = '&city=' + field.city.value;
50
- var state = '&state=' + field.state.value;
51
- var zip5 = '&zip5=' + field.zip5.value;
52
- var urbanization = '&urbanization=' + field.urbanization.value;
53
- var url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
54
- top.location.replace(url);
55
- }
56
- return true;
57
- }
58
-
59
- function checkStateSysError(field) {
60
- field.state.value = field.state.value.toUpperCase();
61
- if (field.state.value == "PR") {
62
- var firmname = 'firmname=' + field.firmname.value;
63
- var address1 = '&address1=' + field.address1.value;
64
- var address2 = '&address2=' + field.address2.value;
65
- var city = '&city=' + field.city.value;
66
- var state = '&state=' + field.state.value;
67
- var zip5 = '&zip5=' + field.zip5.value;
68
- var urbanization = '&urbanization=' + field.urbanization.value;
69
- var url = 'zcl_0_landing_sys_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
70
- top.location.replace(url);
71
- }
72
- return true;
73
- }
74
-
75
-
76
- function statePopup(mylink, windowname) {
77
- if (! window.focus) {
78
- return true;
79
- }
80
- var mywin, href;
81
- if (typeof(mylink) == 'string') {
82
- href=mylink;
83
- } else {
84
- href=mylink.href;
85
- }
86
- mywin = window.open(href, windowname, 'width=240, height=270, left=400, top=100, resizable=1, menubar=0, toolbar=0, location=0, personalbar=0, status=0, scrollbars=0');
87
- mywin.focus();
88
-
89
- return false;
90
- }
91
-
92
-
93
- function validate_for_integers(inputfield, inputevent, zipcode) {
94
- var key;
95
- var keychar;
96
-
97
- if (zipcode.value.length == 5) {
98
- if (window.event) {
99
- key = window.event.keyCode;
100
- } else if (inputevent) {
101
- key = inputevent.which;
102
- } else {
103
- return true;
104
- }
105
-
106
- keychar = String.fromCharCode(key);
107
- // control keys
108
- if ((key==null) || (key==0) || (key==8) ||
109
- (key==9) || (key==13) || (key==27)) {
110
- return true;
111
-
112
- // numbers
113
- } else if (("0123456789-").indexOf(keychar) > -1) {
114
- return true;
115
- } else {
116
- return false;
117
- }
118
- } else {
119
- if (window.event) {
120
- key = window.event.keyCode;
121
- } else if (inputevent) {
122
- key = inputevent.which;
123
- } else {
124
- return true;
125
- }
126
-
127
- keychar = String.fromCharCode(key);
128
- // control keys
129
- if ((key==null) || (key==0) || (key==8) ||
130
- (key==9) || (key==13) || (key==27)) {
131
- return true;
132
-
133
- // numbers
134
- } else if (("0123456789").indexOf(keychar) > -1) {
135
- return true;
136
-
137
- } else {
138
- return false;
139
- }
140
- }
141
- } // end of validate_for_integers()
142
-
143
-
144
- function validate_for_characters(inputfield, inputevent) {
145
- var key;
146
- var keychar;
147
-
148
- if (window.event) {
149
- key = window.event.keyCode;
150
- } else if (inputevent) {
151
- key = inputevent.which;
152
- } else {
153
- return true;
154
- }
155
-
156
- keychar = String.fromCharCode(key);
157
- // control keys
158
- if ((key==null) || (key==0) || (key==8) ||
159
- (key==9) || (key==13) || (key==27)) {
160
- return true;
161
-
162
- // characters
163
- } else if (("0123456789").indexOf(keychar) > -1) {
164
- return false;
165
- } else {
166
- return true;
167
- }
168
- } // end of validate_for_characters()
169
-
170
-
171
- function checkFields (field) {
172
- var firmname = 'firmname=' + field.firmname.value;
173
- var address1 = '&address1=' + field.address1.value;
174
- var address2 = '&address2=' + field.address2.value;
175
- var city = '&city=' + field.city.value;
176
- var state = '&state=' + field.state.value;
177
- var zip5 = '&zip5=' + field.zip5.value;
178
- var urbanization = '&urbanization=' + field.urbanization.value;
179
- var ok = true;
180
-
181
- if (field.zip5.value == "0") {
182
- if (field.address2.value.length == 0) {
183
- url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
184
- ok = false;
185
- }
186
-
187
- if ((field.city.value.length == 0)) {
188
- url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
189
- ok = false;
190
- } else {
191
- field.zip5.value = "";
192
- }
193
- } else {
194
-
195
- if (field.address2.value.length == 0) {
196
- url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
197
- ok = false;
198
- }
199
-
200
- if (field.zip5.value.length != 0) {
201
- if (field.zip5.value.length < 5) {
202
- url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
203
- ok = false;
204
- }
205
- }
206
-
207
- if ((field.city.value.length == 0) && (field.state.value.length == 0)) {
208
- if (field.zip5.value.length < 5) {
209
- url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
210
- ok = false;
211
- }
212
- }
213
-
214
- if ((field.city.value.length == 0) || (field.state.value.length == 0)) {
215
- if (field.zip5.value.length < 5) {
216
- url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + state + zip5 + urbanization;
217
- ok = false;
218
- };
219
- }
220
-
221
- if (field.state.value != 'PR') {
222
- field.urbanization.value = "";
223
- }
224
-
225
- if ((field.state.value != 'AL') &&
226
- (field.state.value != 'AK') &&
227
- (field.state.value != 'AS') &&
228
- (field.state.value != 'AZ') &&
229
- (field.state.value != 'AR') &&
230
- (field.state.value != 'CA') &&
231
- (field.state.value != 'CO') &&
232
- (field.state.value != 'CT') &&
233
- (field.state.value != 'DE') &&
234
- (field.state.value != 'DC') &&
235
- (field.state.value != 'FM') &&
236
- (field.state.value != 'FL') &&
237
- (field.state.value != 'GA') &&
238
- (field.state.value != 'GU') &&
239
- (field.state.value != 'HI') &&
240
- (field.state.value != 'ID') &&
241
- (field.state.value != 'IL') &&
242
- (field.state.value != 'IN') &&
243
- (field.state.value != 'IA') &&
244
- (field.state.value != 'KS') &&
245
- (field.state.value != 'KY') &&
246
- (field.state.value != 'LA') &&
247
- (field.state.value != 'ME') &&
248
- (field.state.value != 'MH') &&
249
- (field.state.value != 'MD') &&
250
- (field.state.value != 'MA') &&
251
- (field.state.value != 'MI') &&
252
- (field.state.value != 'MN') &&
253
- (field.state.value != 'MS') &&
254
- (field.state.value != 'MO') &&
255
- (field.state.value != 'MT') &&
256
- (field.state.value != 'NE') &&
257
- (field.state.value != 'NV') &&
258
- (field.state.value != 'NH') &&
259
- (field.state.value != 'NJ') &&
260
- (field.state.value != 'NM') &&
261
- (field.state.value != 'NY') &&
262
- (field.state.value != 'NC') &&
263
- (field.state.value != 'ND') &&
264
- (field.state.value != 'MP') &&
265
- (field.state.value != 'OH') &&
266
- (field.state.value != 'OK') &&
267
- (field.state.value != 'OR') &&
268
- (field.state.value != 'PW') &&
269
- (field.state.value != 'PA') &&
270
- (field.state.value != 'PR') &&
271
- (field.state.value != 'RI') &&
272
- (field.state.value != 'SC') &&
273
- (field.state.value != 'SD') &&
274
- (field.state.value != 'TN') &&
275
- (field.state.value != 'TX') &&
276
- (field.state.value != 'UT') &&
277
- (field.state.value != 'VT') &&
278
- (field.state.value != 'VI') &&
279
- (field.state.value != 'VA') &&
280
- (field.state.value != 'WA') &&
281
- (field.state.value != 'WV') &&
282
- (field.state.value != 'WI') &&
283
- (field.state.value != 'WY') &&
284
- (field.state.value != 'AE') &&
285
- (field.state.value != 'AA') &&
286
- (field.state.value != 'AE') &&
287
- (field.state.value != 'AP') &&
288
- (field.state.value != '') &&
289
- (field.state.value != ' ')) {
290
- url = 'zcl_0_landing_error.jsp?' + firmname + address1 + address2 + city + '&state=' + zip5 + urbanization;
291
- ok = false;
292
- }
293
- }
294
-
295
- if (ok == false) return url;
296
- else return "";
297
- }
298
-
299
-
300
- function validate(field) { // check if input ok
301
- //global variable to create error message(s)
302
- var url = "";
303
- var formerror = false;
304
-
305
- // remove leading spaces
306
- field.firmname.value = removeLeadingSpaces(field.firmname.value);
307
- field.address1.value = removeLeadingSpaces(field.address1.value);
308
- field.address2.value = removeLeadingSpaces(field.address2.value);
309
- field.city.value = removeLeadingSpaces(field.city.value);
310
- field.state.value = removeLeadingSpaces(field.state.value);
311
- field.urbanization.value = removeLeadingSpaces(field.urbanization.value);
312
-
313
- field.firmname.value = field.firmname.value.toUpperCase();
314
- field.address1.value = field.address1.value.toUpperCase();
315
- field.address2.value = field.address2.value.toUpperCase();
316
- field.city.value = field.city.value.toUpperCase();
317
- field.state.value = field.state.value.toUpperCase();
318
- field.urbanization.value = field.urbanization.value.toUpperCase();
319
-
320
- action = checkFields(field);
321
-
322
- if (action != "") formerror = true;
323
-
324
- if (formerror){
325
- top.location.replace(action);
326
- return false;
327
- } else {
328
- return true;
329
- }
330
- }
331
-
332
- function removeLeadingSpaces(value) {
333
- var regExp = /^\s*/;
334
- var retVal = value.replace(regExp, "");
335
- return retVal;
336
- }
337
-
338
- function createRequestObject() {
339
- FORM_DATA = new Object();
340
- // The Object ("Array") where our data will be stored.
341
-
342
- separator = ',';
343
- // The token used to separate data from multi-select inputs
344
-
345
- query = '' + this.location;
346
- // Get the current URL so we can parse out the data.
347
- // Adding a null-string '' forces an implicit type cast
348
- // from property to string, for NS2 compatibility.
349
-
350
- query = query.substring((query.indexOf('?')) + 1);
351
- // Keep everything after the question mark '?'.
352
-
353
- if (query.length < 1) { return false; } // Perhaps we got some bad data?
354
-
355
- keypairs = new Object();
356
-
357
- numKP = 1;
358
- // Local vars used to store and keep track of name/value pairs
359
- // as we parse them back into a usable form.
360
-
361
- while (query.indexOf('&') > -1) {
362
- keypairs[numKP] = query.substring(0,query.indexOf('&'));
363
- query = query.substring((query.indexOf('&')) + 1);
364
- numKP++;
365
- // Split the query string at each '&', storing the left-hand side
366
- // of the split in a new keypairs[] holder, and chopping the query
367
- // so that it gets the value of the right-hand string.
368
- } // end of while loop
369
-
370
- keypairs[numKP] = query;
371
- // Store what's left in the query string as the final keypairs[] data.
372
-
373
- for (i in keypairs) {
374
- keyName = keypairs[i].substring(0,keypairs[i].indexOf('='));
375
- // Left of '=' is name.
376
-
377
- keyValue = keypairs[i].substring((keypairs[i].indexOf('=')) + 1);
378
- // Right of '=' is value.
379
-
380
- while (keyValue.indexOf('+') > -1) {
381
- keyValue = keyValue.substring(0,keyValue.indexOf('+')) + ' ' + keyValue.substring(keyValue.indexOf('+') + 1);
382
- // Replace each '+' in data string with a space.
383
- }
384
-
385
- keyValue = unescape(keyValue);
386
- // Unescape non-alphanumerics
387
- if (keyName == 'firmname') {
388
- document.form1.firmname.value = keyValue;
389
- }
390
- if (keyName == 'address1') {
391
- document.form1.address1.value = keyValue;
392
- }
393
- if (keyName == 'address2') {
394
- document.form1.address2.value = keyValue;
395
- }
396
- if (keyName == 'city') {
397
- document.form1.city.value = keyValue;
398
- }
399
- if (keyName == 'state') {
400
- document.form1.state.value = keyValue;
401
- }
402
- if (keyName == 'zip5') {
403
- document.form1.zip5.value = keyValue;
404
- }
405
- if (keyName == 'urbanization') {
406
- document.form1.urbanization.value = keyValue;
407
- }
408
- if (keyName == 'pagenumber') {
409
- document.form1.pagenumber.value = keyValue;
410
- }
411
-
412
- if (FORM_DATA[keyName]) {
413
- FORM_DATA[keyName] = FORM_DATA[keyName] + separator + keyValue;
414
- // Object already exists, it is probably a multi-select input,
415
- // and we need to generate a separator-delimited string
416
- // by appending to what we already have stored.
417
- } else {
418
- FORM_DATA[keyName] = keyValue;
419
- // Normal case: name gets value.
420
- }
421
- } // end of for loop
422
-
423
- if (document.form1.state.value == 'PR') {
424
- document.form1.urbanization.focus();
425
- }
426
-
427
- return FORM_DATA;
428
- } // end of createRequestObject()
429
-
430
-
431
- function mailingIndustryPopup(carrierroute, countyname, deliverypoint, checkdigit, lac, elot, elotindicator, recordtype, pmbdesignator, pmbnumber, defaultflag, ewsflag) {
432
- var popupWin = window.open('','mailingIndustry','width=500,height=300,left=250,top=100,resizable=1,menubar=0,toolbar=0,location=0,personalbar=0,status=0,scrollbars=1');
433
- popupWin.focus();
434
-
435
- popupWin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
436
- popupWin.document.write('<html xmlns="http://www.w3.org/1999/xhtml">');
437
- popupWin.document.write('<head>');
438
- popupWin.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />');
439
- popupWin.document.write('<title>USPS - Mailing Industry Information</title>');
440
- popupWin.document.write('<link href="css/styles.css" rel="stylesheet" type="text/css" />');
441
- popupWin.document.write('</head>');
442
- popupWin.document.write('');
443
- popupWin.document.write('<body>');
444
- popupWin.document.write('');
445
- popupWin.document.write('<div style="width:100%; height:12px; background:url(images/top_tile.gif) repeat-x;"></div>');
446
- popupWin.document.write('<div class="popupHeader" style="width:338px; height:16px; padding:10px 8px;">');
447
- popupWin.document.write(' <h1>Mailing Industry Information</h1>');
448
- popupWin.document.write('</div>');
449
- popupWin.document.write('<div style="width:338px; height:16px; padding:2px 8px;" class="main"><a href="pu_mailing_industry_def.htm">Mail Industry Information Definitions</a></div>');
450
- popupWin.document.write('<table cellspacing="0" cellpadding="6" width="480" border="0">');
451
- popupWin.document.write(' <tbody>');
452
- popupWin.document.write(' <tr>');
453
- popupWin.document.write(' <td width="464" align="right" valign="top"><a href="javascript:window.close()"><img src="images/button_close_window.gif" alt="Close Window" border="0" /></a></td>');
454
- popupWin.document.write(' <td width="16">&nbsp;</td>');
455
- popupWin.document.write(' </tr>');
456
- popupWin.document.write(' </tbody>');
457
- popupWin.document.write('</table>');
458
- popupWin.document.write('<table width="480" border="0" cellpadding="6" cellspacing="0" summary="This table is used to format the header of the page.">');
459
- popupWin.document.write(' <tbody>');
460
- popupWin.document.write(' <tr>');
461
- popupWin.document.write(' <td width="16">&nbsp;</td>');
462
- popupWin.document.write(' <td width="298" class="main" valign="top" bgcolor="#f3f3f3">Carrier Route</td>');
463
- popupWin.document.write(' <td width="150" align="right" valign="top" bgcolor="#f3f3f3" class="main">' + carrierroute + '</td>');
464
- popupWin.document.write(' <td width="16">&nbsp;</td>');
465
- popupWin.document.write(' </tr>');
466
- popupWin.document.write(' <tr>');
467
- popupWin.document.write(' <td>&nbsp;</td>');
468
- popupWin.document.write(' <td class="main" valign="top">County</td>');
469
- popupWin.document.write(' <td align="right" valign="top" class="main">' + countyname + '</td>');
470
- popupWin.document.write(' <td>&nbsp;</td>');
471
- popupWin.document.write(' </tr>');
472
- popupWin.document.write(' <tr>');
473
- popupWin.document.write(' <td>&nbsp;</td>');
474
- popupWin.document.write(' <td class="main" valign="top" bgcolor="#f3f3f3">Delivery Point Code</td>');
475
- popupWin.document.write(' <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + deliverypoint + '</td>');
476
- popupWin.document.write(' <td>&nbsp;</td>');
477
- popupWin.document.write(' </tr>');
478
- popupWin.document.write(' <tr>');
479
- popupWin.document.write(' <td>&nbsp;</td>');
480
- popupWin.document.write(' <td class="main" valign="top">Check Digit</td>');
481
- popupWin.document.write(' <td align="right" valign="top" class="main">' + checkdigit + '</td>');
482
- popupWin.document.write(' <td>&nbsp;</td>');
483
- popupWin.document.write(' </tr>');
484
- popupWin.document.write(' <tr>');
485
- popupWin.document.write(' <td>&nbsp;</td>');
486
- popupWin.document.write(' <td class="main" valign="top" bgcolor="#f3f3f3">LAC&#8482;</td>');
487
- popupWin.document.write(' <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + lac + '</td>');
488
- popupWin.document.write(' <td>&nbsp;</td>');
489
- popupWin.document.write(' </tr>');
490
- popupWin.document.write(' <tr>');
491
- popupWin.document.write(' <td>&nbsp;</td>');
492
- popupWin.document.write(' <td class="main" valign="top">eLOT&#8482;</td>');
493
- popupWin.document.write(' <td align="right" valign="top" class="main">' + elot + '</td>');
494
- popupWin.document.write(' <td>&nbsp;</td>');
495
- popupWin.document.write(' </tr>');
496
- popupWin.document.write(' <tr>');
497
- popupWin.document.write(' <td>&nbsp;</td>');
498
- popupWin.document.write(' <td class="main" valign="top" bgcolor="#f3f3f3">eLOT Ascending/Descending Indicator</td>');
499
- popupWin.document.write(' <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + elotindicator + '</td>');
500
- popupWin.document.write(' <td>&nbsp;</td>');
501
- popupWin.document.write(' </tr>');
502
- popupWin.document.write(' <tr>');
503
- popupWin.document.write(' <td>&nbsp;</td>');
504
- popupWin.document.write(' <td class="main" valign="top">Record Type Code</td>');
505
- popupWin.document.write(' <td align="right" valign="top" class="main">' + recordtype + '</td>');
506
- popupWin.document.write(' <td>&nbsp;</td>');
507
- popupWin.document.write(' </tr>');
508
- popupWin.document.write(' <tr>');
509
- popupWin.document.write(' <td>&nbsp;</td>');
510
- popupWin.document.write(' <td class="main" valign="top" bgcolor="#f3f3f3">PMB Designator</td>');
511
- popupWin.document.write(' <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + pmbdesignator + '</td>');
512
- popupWin.document.write(' <td>&nbsp;</td>');
513
- popupWin.document.write(' </tr>');
514
- popupWin.document.write(' <tr>');
515
- popupWin.document.write(' <td>&nbsp;</td>');
516
- popupWin.document.write(' <td class="main" valign="top">PMB Number</td>');
517
- popupWin.document.write(' <td align="right" valign="top" class="main">' + pmbnumber + '</td>');
518
- popupWin.document.write(' <td>&nbsp;</td>');
519
- popupWin.document.write(' </tr>');
520
- popupWin.document.write(' <tr>');
521
- popupWin.document.write(' <td>&nbsp;</td>');
522
- popupWin.document.write(' <td class="main" valign="top" bgcolor="#f3f3f3">Default Flag</td>');
523
- popupWin.document.write(' <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + defaultflag + '</td>');
524
- popupWin.document.write(' <td>&nbsp;</td>');
525
- popupWin.document.write(' </tr>');
526
- popupWin.document.write(' <tr>');
527
- popupWin.document.write(' <td>&nbsp;</td>');
528
- popupWin.document.write(' <td class="main" valign="top">EWS Flag</td>');
529
- popupWin.document.write(' <td align="right" valign="top" class="main">' + ewsflag + '</td>');
530
- popupWin.document.write(' <td>&nbsp;</td>');
531
- popupWin.document.write(' </tr>');
532
- popupWin.document.write(' </tbody>');
533
- popupWin.document.write('</table>');
534
- popupWin.document.write('<table cellspacing="0" cellpadding="6" width="480" border="0">');
535
- popupWin.document.write(' <tbody>');
536
- popupWin.document.write(' <tr>');
537
- popupWin.document.write(' <td width="464" align="right" valign="top"><a href="javascript:window.close()"><img src="images/button_close_window.gif" alt="Close Window" border="0" /></a></td>');
538
- popupWin.document.write(' <td width="16">&nbsp;</td>');
539
- popupWin.document.write(' </tr>');
540
- popupWin.document.write(' </tbody>');
541
- popupWin.document.write('</table>');
542
- popupWin.document.write('<div align="right" style="width:100%; background: url(images/footer_bottom_tile.gif) bottom repeat-x">&nbsp;</div>');
543
- popupWin.document.write('</body>');
544
- popupWin.document.write('</html>');
545
-
546
- popupWin.document.close();
547
- } // end of mailingIndustryPopup()
548
-
549
-
550
- function mailingIndustryPopup2(carrierroute, countyname, deliverypoint, checkdigit, lac, elot, elotindicator, recordtype, pmbdesignator, pmbnumber, defaultflag, ewsflag, dpvconfirmation) {
551
- var popupWin = window.open('','mailingIndustry','width=500,height=300,left=250,top=100,resizable=1,menubar=0,toolbar=0,location=0,personalbar=0,status=0,scrollbars=1');
552
- popupWin.focus();
553
-
554
- popupWin.document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
555
- popupWin.document.write('<html xmlns="http://www.w3.org/1999/xhtml">');
556
- popupWin.document.write('<head>');
557
- popupWin.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />');
558
- popupWin.document.write('<title>USPS - Mailing Industry Information</title>');
559
- popupWin.document.write('<link href="css/styles.css" rel="stylesheet" type="text/css" />');
560
- popupWin.document.write('</head>');
561
- popupWin.document.write('');
562
- popupWin.document.write('<body>');
563
- popupWin.document.write('');
564
- popupWin.document.write('<div style="width:100%; height:12px; background:url(images/top_tile.gif) repeat-x;"></div>');
565
- popupWin.document.write('<div class="popupHeader" style="width:338px; height:16px; padding:10px 8px;">');
566
- popupWin.document.write(' <h1>Mailing Industry Information</h1>');
567
- popupWin.document.write('</div>');
568
- popupWin.document.write('<div style="width:338px; height:16px; padding:2px 8px;" class="main"><a href="pu_mailing_industry_def.htm">Mail Industry Information Definitions</a></div>');
569
- popupWin.document.write('<table cellspacing="0" cellpadding="6" width="480" border="0">');
570
- popupWin.document.write(' <tbody>');
571
- popupWin.document.write(' <tr>');
572
- popupWin.document.write(' <td width="464" align="right" valign="top"><a href="javascript:window.close()"><img src="images/button_close_window.gif" alt="Close Window" border="0" /></a></td>');
573
- popupWin.document.write(' <td width="16">&nbsp;</td>');
574
- popupWin.document.write(' </tr>');
575
- popupWin.document.write(' </tbody>');
576
- popupWin.document.write('</table>');
577
- popupWin.document.write('<table width="480" border="0" cellpadding="6" cellspacing="0" summary="This table is used to format the header of the page.">');
578
- popupWin.document.write(' <tbody>');
579
- popupWin.document.write(' <tr>');
580
- popupWin.document.write(' <td width="16">&nbsp;</td>');
581
- popupWin.document.write(' <td width="298" class="main" valign="top" bgcolor="#f3f3f3">Carrier Route</td>');
582
- popupWin.document.write(' <td width="150" align="right" valign="top" bgcolor="#f3f3f3" class="main">' + carrierroute + '</td>');
583
- popupWin.document.write(' <td width="16">&nbsp;</td>');
584
- popupWin.document.write(' </tr>');
585
- popupWin.document.write(' <tr>');
586
- popupWin.document.write(' <td>&nbsp;</td>');
587
- popupWin.document.write(' <td class="main" valign="top">County</td>');
588
- popupWin.document.write(' <td align="right" valign="top" class="main">' + countyname + '</td>');
589
- popupWin.document.write(' <td>&nbsp;</td>');
590
- popupWin.document.write(' </tr>');
591
- popupWin.document.write(' <tr>');
592
- popupWin.document.write(' <td>&nbsp;</td>');
593
- popupWin.document.write(' <td class="main" valign="top" bgcolor="#f3f3f3">Delivery Point Code</td>');
594
- popupWin.document.write(' <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + deliverypoint + '</td>');
595
- popupWin.document.write(' <td>&nbsp;</td>');
596
- popupWin.document.write(' </tr>');
597
- popupWin.document.write(' <tr>');
598
- popupWin.document.write(' <td>&nbsp;</td>');
599
- popupWin.document.write(' <td class="main" valign="top">Check Digit</td>');
600
- popupWin.document.write(' <td align="right" valign="top" class="main">' + checkdigit + '</td>');
601
- popupWin.document.write(' <td>&nbsp;</td>');
602
- popupWin.document.write(' </tr>');
603
- popupWin.document.write(' <tr>');
604
- popupWin.document.write(' <td>&nbsp;</td>');
605
- popupWin.document.write(' <td class="main" valign="top" bgcolor="#f3f3f3">LAC&#8482;</td>');
606
- popupWin.document.write(' <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + lac + '</td>');
607
- popupWin.document.write(' <td>&nbsp;</td>');
608
- popupWin.document.write(' </tr>');
609
- popupWin.document.write(' <tr>');
610
- popupWin.document.write(' <td>&nbsp;</td>');
611
- popupWin.document.write(' <td class="main" valign="top">eLOT&#8482;</td>');
612
- popupWin.document.write(' <td align="right" valign="top" class="main">' + elot + '</td>');
613
- popupWin.document.write(' <td>&nbsp;</td>');
614
- popupWin.document.write(' </tr>');
615
- popupWin.document.write(' <tr>');
616
- popupWin.document.write(' <td>&nbsp;</td>');
617
- popupWin.document.write(' <td class="main" valign="top" bgcolor="#f3f3f3">eLOT Ascending/Descending Indicator</td>');
618
- popupWin.document.write(' <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + elotindicator + '</td>');
619
- popupWin.document.write(' <td>&nbsp;</td>');
620
- popupWin.document.write(' </tr>');
621
- popupWin.document.write(' <tr>');
622
- popupWin.document.write(' <td>&nbsp;</td>');
623
- popupWin.document.write(' <td class="main" valign="top">Record Type Code</td>');
624
- popupWin.document.write(' <td align="right" valign="top" class="main">' + recordtype + '</td>');
625
- popupWin.document.write(' <td>&nbsp;</td>');
626
- popupWin.document.write(' </tr>');
627
- popupWin.document.write(' <tr>');
628
- popupWin.document.write(' <td>&nbsp;</td>');
629
- popupWin.document.write(' <td class="main" valign="top" bgcolor="#f3f3f3">PMB Designator</td>');
630
- popupWin.document.write(' <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + pmbdesignator + '</td>');
631
- popupWin.document.write(' <td>&nbsp;</td>');
632
- popupWin.document.write(' </tr>');
633
- popupWin.document.write(' <tr>');
634
- popupWin.document.write(' <td>&nbsp;</td>');
635
- popupWin.document.write(' <td class="main" valign="top">PMB Number</td>');
636
- popupWin.document.write(' <td align="right" valign="top" class="main">' + pmbnumber + '</td>');
637
- popupWin.document.write(' <td>&nbsp;</td>');
638
- popupWin.document.write(' </tr>');
639
- popupWin.document.write(' <tr>');
640
- popupWin.document.write(' <td>&nbsp;</td>');
641
- popupWin.document.write(' <td class="main" valign="top" bgcolor="#f3f3f3">Default Flag</td>');
642
- popupWin.document.write(' <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + defaultflag + '</td>');
643
- popupWin.document.write(' <td>&nbsp;</td>');
644
- popupWin.document.write(' </tr>');
645
- popupWin.document.write(' <tr>');
646
- popupWin.document.write(' <td>&nbsp;</td>');
647
- popupWin.document.write(' <td class="main" valign="top">EWS Flag</td>');
648
- popupWin.document.write(' <td align="right" valign="top" class="main">' + ewsflag + '</td>');
649
- popupWin.document.write(' <td>&nbsp;</td>');
650
- popupWin.document.write(' </tr>');
651
- popupWin.document.write(' <tr>');
652
- popupWin.document.write(' <td>&nbsp;</td>');
653
- popupWin.document.write(' <td class="main" valign="top" bgcolor="#f3f3f3">DPV Confirmation Indicator</td>');
654
- popupWin.document.write(' <td align="right" valign="top" bgcolor="#f3f3f3" class="main">' + dpvconfirmation + '</td>');
655
- popupWin.document.write(' <td>&nbsp;</td>');
656
- popupWin.document.write(' </tr>');
657
- popupWin.document.write(' </tbody>');
658
- popupWin.document.write('</table>');
659
- popupWin.document.write('<table cellspacing="0" cellpadding="6" width="480" border="0">');
660
- popupWin.document.write(' <tbody>');
661
- popupWin.document.write(' <tr>');
662
- popupWin.document.write(' <td width="464" align="right" valign="top"><a href="javascript:window.close()"><img src="images/button_close_window.gif" alt="Close Window" border="0" /></a></td>');
663
- popupWin.document.write(' <td width="16">&nbsp;</td>');
664
- popupWin.document.write(' </tr>');
665
- popupWin.document.write(' </tbody>');
666
- popupWin.document.write('</table>');
667
- popupWin.document.write('<div align="right" style="width:100%; background: url(images/footer_bottom_tile.gif) bottom repeat-x">&nbsp;</div>');
668
- popupWin.document.write('</body>');
669
- popupWin.document.write('</html>');
670
-
671
- popupWin.document.close();
672
- } // end of mailingIndustryPopup2()
673
-
674
- </SCRIPT>
675
-
676
-
677
- <script language="JavaScript" type="text/JavaScript">
678
- <!--
679
- function swapImgRestore() {
680
- document.getElementById('popup_layer').style.visibility='hidden';
681
- var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
682
- }
683
-
684
- function preloadImages() {
685
- var d=document; if(d.images){ if(!d.p) d.p=new Array();
686
- var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
687
- if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
688
- }
689
-
690
- function findObj(n, d) {
691
- var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
692
- d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
693
- if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
694
- for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
695
- if(!x && d.getElementById) x=d.getElementById(n); return x;
696
- }
697
-
698
- function swapImage() {
699
- document.getElementById('popup_layer').style.visibility='visible';
700
- var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
701
- if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
702
-
703
- }
704
- //-->
705
- </script>
706
-
707
- </head>
708
- <body onload="preloadImages('images/question_trans_over.gif');" >
709
- <script language="javascript1.1" type="text/javascript" src="includes/windows.js"></script>
710
-
711
- <div id="popup_layer" class="popuplayer" style=" margin:40px 0px 0px 250px; padding:7px 7px 7px 7px; position:absolute; visibility:hidden;width:190px;"><div style="padding:0px 0px 10px 0px;">Standard Format</div>Your delivery address and ZIP Code&trade; are checked for proper Postal Service format and standardized if necessary.
712
- <div style="padding:0px 0px 8px 0px;">For example:</div>
713
-
714
- Entered:<br/ >
715
- ABC Movers<br/ >
716
- 1500 East Main Avenue, Suite 201<br/ >
717
- <div style="padding:0px 0px 8px 0px;">Springfield, VA 22162</div>
718
-
719
- Standardized:<br/ >
720
- ABC MOVERS<br/ >
721
- 1500 E MAIN AVE STE 201<br/ >
722
- SPRINGFIELD VA 22162-1010 </div>
723
- <form action="" method="get">
724
-
725
- <div style="height:44px; width:720px;">
726
- <a href="http://www.usps.com">
727
- <img src="images/usps_logo.gif" title="USPS Homepage" width="165" height="44" border="0" align="left" />
728
- </a>
729
- <a href="#content">
730
- <img align="left" src="images/spacer.gif" width="1" height="1" alt="Skip Navigation" border="0" />
731
- </a>
732
- <div class="topnav" align="right" style="float:right; width:200px; padding:25px 0px 0px 0px;">
733
- <a href="http://www.usps.com">
734
- USPS Home
735
- </a>
736
- &nbsp;&nbsp;|&nbsp;&nbsp;
737
- <a tabindex="9" href="http://www.usps.com/faqs/ziplookup-faqs.htm?WT.z_zip4link=FAQ" target='faq' onclick='void openWindow ("http://www.usps.com/faqs/ziplookup-faqs.htm?WT.z_zip4link=FAQ", "faq", "width=750,height=400", 25, 25, window, "resizable=1,menubar=0,toolbar=0,location=0,personalbar=0,status=0,scrollbars=1");'>
738
- FAQs
739
- </a>
740
- </div>
741
- </div>
742
- <div id="header" align="right" class="bluebarbold">
743
- <a href="welcome.jsp">
744
- ZIP Code Lookup
745
- </a>
746
- <img src="images/spacer.gif" width="10" height="16" alt="" border="0"/>
747
- </div>
748
-
749
- <a name="content"></a>
750
-
751
-
752
- <div style="width:685px; margin-left:35px; padding:12px 0px 14px;">
753
- <h1>Find a ZIP + 4&reg; Code By Address Results </h1>
754
- </div>
755
- <div style="width:375px; float:left; padding-left:35px;">
756
- <h2>You Gave Us</h2>
757
- <span class="main">
758
-
759
- 6216 eddington drive<br />
760
-
761
- middletown&nbsp;oh&nbsp;&nbsp;<br /><br />
762
-
763
- <a title="Lookup Another ZIP Code" href="welcome.jsp">Lookup Another ZIP Code&#8482;</a></span>
764
- </div>
765
-
766
-
767
- <!-- div below used for spacing only -->
768
- <div style="clear:both; width:635px; height:15px;"></div>
769
- <div style="clear:both; width:600px; margin-left:35px; height:17px; background:url(images/pagination_tile.gif) repeat-x;"></div>
770
- <div style="width:600px; margin-left:35px;">
771
-
772
- <table width="600" border="0" cellspacing="0" cellpadding="0" summary="This table contains an exact match address and ZIP code.">
773
- <tr>
774
- <th width="300" align="left" id="full" style="padding:5px 10px;">
775
- <h2>Full Address in Standard Format <a href="pu_standard_format.htm" target='someName31' onclick='void openWindow ("pu_standard_format.htm", "someName31", "width=250,height=250", 225, 200, window, "resizable=1,menubar=0,toolbar=0,location=0,personalbar=0,status=0,scrollbars=1");'onmouseout="swapImgRestore()" onmouseover="swapImage('Image40','','images/question_trans_over.gif',1)"><img src="images/question_trans.gif" alt="What is Standard Format?" width="18" height="22" border="0" align="absmiddle" id="Image40" /></a></h2></th>
776
- <th width="120"></th>
777
- <td width="180">&nbsp;</td>
778
- </tr>
779
- <tr>
780
- <td headers="full" height="34" valign="top" class="main" style="background:url(images/table_gray.gif); padding:5px 10px;">
781
-
782
- 6216 EDDINGTON ST<br />
783
-
784
- LIBERTY TOWNSHIP&nbsp;OH&nbsp;&nbsp;45044-9761
785
- <br />
786
- </td>
787
- <td style="background:url(images/table_gray.gif);">&nbsp;</td>
788
- <td height="34" align="right" valign="top" class="main" style="background:url(images/table_gray.gif); padding:5px 10px;">
789
- <a title="Mailing Industry Information" href="#" onClick="mailingIndustryPopup2('R007',
790
- 'BUTLER',
791
- '16',
792
- '3',
793
- '',
794
- '0182',
795
- 'A',
796
- 'S',
797
- '',
798
- '',
799
- '',
800
- '',
801
- 'Y');" >Mailing Industry Information</a>
802
- </tr>
803
- <tr>
804
- <td colspan="3"><img src="images/spacer.gif" width="1" height="4" alt="" border="0" /></td>
805
- </tr>
806
- <tr>
807
- <td colspan="3"><img src="images/spacer.gif" width="1" height="10" alt="" border="0" /></td>
808
- </tr>
809
- </table>
810
- </div>
811
-
812
- <div style="clear:both; width:600px; margin-left:35px; height:17px; background:url(images/pagination_bottom_tile.gif) repeat-x;"></div>
813
-
814
- <div style="width:635px; clear:both;">
815
- <table width="635" border="0" cellspacing="0" cellpadding="0" summary="This table is used to format page content.">
816
- <tr>
817
- <td width="35"><img src="images/spacer.gif" height="23" width="35" alt="" border="0" /></td>
818
- <td width="197"><img src="images/spacer.gif" height="23" width="197" alt="" border="0" /></td>
819
- <td width="7"><img src="images/spacer.gif" height="23" width="7" alt="" border="0" /></td>
820
- <td width="197"><img src="images/spacer.gif" height="23" width="197" alt="" border="0" /></td>
821
- <td width="7"><img src="images/spacer.gif" height="23" width="7" alt="" border="0" /></td>
822
- <td width="192"><img src="images/spacer.gif" height="23" width="192" alt="" border="0" /></td>
823
- </tr><tr>
824
- <td></td>
825
- <td valign="top" style="background:url(images/lt_gray_background.gif);"><div style="margin:5px 15px 0px 20px;"><span class="mainBold">Related Links</span><br/>
826
- <br/>
827
- <span class="main"><strong>Calculate Postage</strong><br />
828
- Calculate postage for your letter or package online!<br />
829
- <a href="http://www.usps.com/tools/domesticratecalc/welcome.htm?from=zclresults&amp;page=ratecalc" target='rate' onclick='void openWindow ("http://www.usps.com/tools/domesticratecalc/welcome.htm?from=zclresults&amp;page=ratecalc", "rate", "width=750,height=400", 50, 50, window, "resizable=1,menubar=0,toolbar=0,location=0,personalbar=0,status=0,scrollbars=1");'> Rate Calculator</a></span></div></td>
830
- <td style="background:url(images/lt_gray_background.gif);"></td>
831
- <td valign="top" style="background:url(images/lt_gray_background.gif);"><div style="margin:20px 20px 0px 20px;">&nbsp;<br/>
832
- <span class="main"><strong>Print Shipping Labels</strong> <br />
833
- Print shipping labels from your desktop and pay online.<br />
834
- <a href="http://www.usps.com/shipping/label.htm?from=zclresults&amp;page=cns" target='click' onclick='void openWindow ("http://www.usps.com/shipping/label.htm?from=zclresults&amp;page=cns", "click", "width=750,height=400", 50, 50, window, "resizable=1,menubar=0,toolbar=0,location=0,personalbar=0,status=0,scrollbars=1");'> Click-N-Ship&reg;</a><br />
835
- <a href="http://www.usps.com/onlinepostage/welcome.htm?from=zclresults&amp;page=otherpostage" target='other' onclick='void openWindow ("http://www.usps.com/onlinepostage/welcome.htm?from=zclresults&amp;page=otherpostage", "other", "width=750,height=400", 50, 50, window, "resizable=1,menubar=0,toolbar=0,location=0,personalbar=0,status=0,scrollbars=1");'> Other Postage</a></span></div></td>
836
- <td></td>
837
- <td valign="top">
838
- <div style="border-top:1px solid #CCC; border-bottom:1px solid #CCC; background:url(images/lt_gray_background.gif);">
839
- <div style="margin:5px 15px;"><span class="mainBold">Residential and<br/>
840
- Business Lookup</span><br/>
841
- <br/>
842
- <span class="main">Find an address with WhitePages<br>
843
- <a href="http://usps2.whitepages.com/person?WT.z_zip4link=wp_people_search" target="_blank">People Search</a> and<br>
844
- <a href="http://usps2.whitepages.com/business?WT.z_zip4link=wp_business_search" target="_blank">Business Search</a>.</span></div>
845
- <div align="right"><a href="http://www.whitepages.com/?WT.z_zip4link=wp_com" target="_blank"><img src="images/WP_serviceOF_logo_110x30.gif" alt="A service of WhitePages" border="0"></a></div>
846
- </div>
847
- </td>
848
- </tr>
849
- <tr>
850
- <td colspan="6"><img src="images/spacer.gif" alt="" width="1" height="18" border="0" /></td>
851
- </tr>
852
- </table><!-- Ensure JSP Page reload. -->
853
- </div>
854
-
855
- <style type="text/css">
856
- @import url("http://www.usps.com/common/stylesheets/07/footer.css");
857
-
858
- </style>
859
-
860
- <div id="footer">
861
- <div class="footNavImgFirst" id="footNavImg1"><a href="http://www.usps.com/homearea/sitemap.htm?from=global_footer&page=sitemap" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','SiteMap')">Site Map</a></div>
862
- <div class="footNavImg" id="footNavImg2"><a href="http://www.usps.com/customerservice/welcome.htm?from=global_footer&page=customerservice" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','CustomerService')">Customer Service</a></div>
863
- <div class="footNavImg" id="footNavImg3"><a href="http://www.usps.com/forms/welcome.htm?from=global_footer&page=forms" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','Forms')">Forms</a></div>
864
- <div class="footNavImg" id="footNavImg4"><a href="http://www.usps.com/homearea/category/govtlinks.htm?from=global_footer&page=govtservices" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','GovtServices')">Gov't Services</a></div>
865
- <div class="footNavImg" id="footNavImg5"><a href="http://www.usps.com/employment/welcome.htm?from=global_footer&page=careers" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','Careers')">Careers</a></div>
866
- <div class="footNavImg" id="footNavImg6"><a href="http://www.usps.com/homearea/docs/privpol.htm?from=global_footer&page=privacypolicy" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','PrivacyPolicy')">Privacy Policy</a></div>
867
- <div class="footNavImg" id="footNavImg7"><a href="http://www.usps.com/homearea/docs/termsofuse.htm?from=global_footer&page=termsofuse" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','TermsOfUse')">Terms of Use</a></div>
868
- <div class="footNavImgLast" id="footNavImg9"><a href="http://www.usps.com/nationalpremieraccounts/welcome.htm?from=global_footer&page=natlandpremiereaccts" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','NationalAndPremierAccounts')">Business Customer Gateway</a></div>
869
- <br />
870
- <div id="copyright">Copyright&copy; 2010 USPS. All Rights Reserved.</div>
871
- <div id="noFear"><a href="http://www.usps.com/nofearact/welcome.htm?from=global_footer&page=nofearacteeo" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','NoFearAct')">No FEAR Act EEO Data</a></div>
872
- <div id="FOIA"><a title="Freedom of Information Act" href="http://www.usps.com/foia/welcome.htm?from=global_footer&page=foia" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','FOIA')">FOIA</a></div><a href="http://www.usps.com/postalinspectors?from=global_footer&page=postalinspectors" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','PostalInspectors')"><img style="MARGIN: 10px 0px 0px 42px" height="19" alt="Postal Inspectors Preserving the Trust" hspace="0" src="http://www.usps.com/common/images/07/usps_hm_ftr_bt_pstins.gif" width="108" align="top" border="0" /></a><a href="http://www.usps.com/all/oig/welcome.htm?from=global_footer&page=inspectorgeneral" onClick="dcsMultiTrack('DCS.dcsuri','/ed','WT.z_section','Global_Footer','WT.z_link','InspectorGeneral')"><img style="MARGIN: 10px 0px 0px 20px" height="22" alt="Inspector General Promoting Integrity" hspace="0" src="http://www.usps.com/common/images/07/usps_hm_ftr_bt_insgen.gif" width="101" align="top" border="0" /></a></div>
873
-
874
- <!-- START OF SmartSource Data Collector TAG for ZIP Code Lookup Footer -->
875
- <!-- Copyright (c) 1996-2009 WebTrends Inc. All rights reserved. -->
876
- <!-- Version: 8.6.2 -->
877
- <!-- Tag Builder Version: 3.0 -->
878
- <!-- Created: 12/17/2009 8:47:13 PM -->
879
- <script src="includes/webtrends.js" type="text/javascript"></script>
880
- <!-- ----------------------------------------------------------------------------------- -->
881
- <!-- Warning: The two script blocks below must remain inline. Moving them to an external -->
882
- <!-- JavaScript include file can cause serious problems with cross-domain tracking. -->
883
- <!-- ----------------------------------------------------------------------------------- -->
884
- <script type="text/javascript">
885
- //<![CDATA[
886
- var _tag=new WebTrends();
887
- _tag.dcsGetId();
888
- //]]>>
889
- </script>
890
- <script type="text/javascript">
891
- //<![CDATA[
892
- // Add custom parameters here.
893
- //_tag.DCSext.param_name=param_value;
894
- _tag.dcsCollect();
895
- //]]>>
896
- </script>
897
- <noscript>
898
- <div><img alt="DCSIMG" id="DCSIMG" width="1" height="1" src="http://sdc.usps.com/dcsq8lc5w10000sxojnpk5m85_1i5u/njs.gif?dcsuri=/nojavascript&amp;WT.js=No&amp;WT.tv=8.6.2"/></div>
899
- </noscript>
900
- <!-- END OF SmartSource Data Collector TAG -->
901
-
902
-
903
- </form>
904
- </body>
905
- </html>
906
-
1
+ <li class="clearfix"><div class="data"> <p class="std-address"><span class="address1 range">6216 EDDINGTON ST</span><br><span class="city range">LIBERTY TOWNSHIP </span> <span class="state range">OH</span> <span class="zip" style="">45044</span><span class="hyphen">-</span><span class="zip4">9761</span></p><p class="show-details"><a href="#" index="0" title="Reveal/hide mailing details table for this record">Show Mailing Industry Details</a></p><div class="details hide" index="0"><dl class="details"><dt>Carrier Route</dt><dd>R007 </dd><dt>County</dt><dd>BUTLER </dd><dt>Delivery Point Code</dt><dd>16 </dd><dt>Check Digit</dt><dd>3</dd><dt>Commercial Mail Receiving Agency</dt><dd>N</dd><dt>LAC?</dt><dd></dd><dt>eLOT?</dt><dd>0182</dd><dt>eLOT Ascending/Descending Indicator</dt><dd>A</dd><dt>Record Type Code</dt><dd>S</dd><dt>PMB Designator</dt><dd></dd><dt>PMB Number</dt><dd></dd><dt>Default Flag</dt><dd>Y</dd><dt>EWS Flag</dt><dd></dd><dt>DPV Confirmation Indicator</dt><dd>Y</dd></dl></div></div></li>
@@ -18,7 +18,6 @@ Gem::Specification.new do |s|
18
18
  s.require_paths = ["lib"]
19
19
 
20
20
  s.add_dependency "mechanize", "~> 2"
21
- s.add_dependency "sanitize", "~> 2.0.3"
22
21
  s.add_development_dependency "rspec", "~> 2"
23
22
  end
24
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: usps_standardizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-26 00:00:00.000000000Z
12
+ date: 2012-02-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mechanize
16
- requirement: &78763970 !ruby/object:Gem::Requirement
16
+ requirement: &74582760 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,21 +21,10 @@ dependencies:
21
21
  version: '2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *78763970
25
- - !ruby/object:Gem::Dependency
26
- name: sanitize
27
- requirement: &78763580 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
30
- - - ~>
31
- - !ruby/object:Gem::Version
32
- version: 2.0.3
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: *78763580
24
+ version_requirements: *74582760
36
25
  - !ruby/object:Gem::Dependency
37
26
  name: rspec
38
- requirement: &78763200 !ruby/object:Gem::Requirement
27
+ requirement: &74582510 !ruby/object:Gem::Requirement
39
28
  none: false
40
29
  requirements:
41
30
  - - ~>
@@ -43,7 +32,7 @@ dependencies:
43
32
  version: '2'
44
33
  type: :development
45
34
  prerelease: false
46
- version_requirements: *78763200
35
+ version_requirements: *74582510
47
36
  description: Ruby class to standardize U.S. postal addresses by referencing the U.S.
48
37
  Postal Service's web site
49
38
  email: