hpricot 0.5-mswin32 → 0.6-mswin32

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,6 +34,17 @@ module Hpricot
34
34
  output("", :preserve => true)
35
35
  end
36
36
 
37
+ def index(name)
38
+ i = 0
39
+ return i if name == "*"
40
+ children.each do |x|
41
+ return i if (x.respond_to?(:name) and name == x.name) or
42
+ (x.text? and name == "text()")
43
+ i += 1
44
+ end
45
+ -1
46
+ end
47
+
37
48
  # Puts together an array of neighboring nodes based on their proximity
38
49
  # to this node. So, for example, to get the next node, you could use
39
50
  # <tt>nodes_at(1). Or, to get the previous node, use <tt>nodes_at(1)</tt>.
@@ -46,11 +57,19 @@ module Hpricot
46
57
  def nodes_at(*pos)
47
58
  sib = parent.children
48
59
  i, si = 0, sib.index(self)
60
+ pos.map! do |r|
61
+ if r.is_a?(Range) and r.begin.is_a?(String)
62
+ r = Range.new(parent.index(r.begin)-si, parent.index(r.end)-si, r.exclude_end?)
63
+ end
64
+ r
65
+ end
66
+ p pos
49
67
  Elements[*
50
68
  sib.select do |x|
51
- sel = case i - si when *pos
52
- true
53
- end
69
+ sel =
70
+ case i - si when *pos
71
+ true
72
+ end
54
73
  i += 1
55
74
  sel
56
75
  end
@@ -59,35 +78,51 @@ module Hpricot
59
78
 
60
79
  # Returns the node neighboring this node to the south: just below it.
61
80
  # This method includes text nodes and comments and such.
62
- def next_node
81
+ def next
63
82
  sib = parent.children
64
83
  sib[sib.index(self) + 1] if parent
65
84
  end
85
+ alias_method :next_node, :next
66
86
 
67
87
  # Returns to node neighboring this node to the north: just above it.
68
88
  # This method includes text nodes and comments and such.
69
- def previous_node
89
+ def previous
70
90
  sib = parent.children
71
91
  x = sib.index(self) - 1
72
92
  sib[x] if sib and x >= 0
73
93
  end
94
+ alias_method :previous_node, :previous
95
+
96
+ # Find all preceding nodes.
97
+ def preceding
98
+ sibs = parent.children
99
+ si = sibs.index(self)
100
+ return Elements[*sibs[0...si]]
101
+ end
102
+
103
+ # Find all nodes which follow the current one.
104
+ def following
105
+ sibs = parent.children
106
+ si = sibs.index(self) + 1
107
+ return Elements[*sibs[si...sibs.length]]
108
+ end
74
109
 
75
110
  # Adds elements immediately after this element, contained in the +html+ string.
76
- def after(html)
77
- parent.insert_after(Hpricot.make(html), self)
111
+ def after(html = nil, &blk)
112
+ parent.insert_after(Hpricot.make(html, &blk), self)
78
113
  end
79
114
 
80
115
  # Adds elements immediately before this element, contained in the +html+ string.
81
- def before(html)
82
- parent.insert_after(Hpricot.make(html), self)
116
+ def before(html = nil, &blk)
117
+ parent.insert_before(Hpricot.make(html, &blk), self)
83
118
  end
84
119
 
85
120
 
86
121
  # Replace this element and its contents with the nodes contained
87
122
  # in the +html+ string.
88
- def swap(html)
123
+ def swap(html = nil, &blk)
89
124
  parent.altered!
90
- parent.replace_child(self, Hpricot.make(html))
125
+ parent.replace_child(self, Hpricot.make(html, &blk))
91
126
  end
92
127
 
93
128
  def get_subnode(*indexes)
@@ -116,26 +151,29 @@ module Hpricot
116
151
  alias_method :innerText, :inner_text
117
152
 
118
153
  # Builds an HTML string from the contents of this node.
119
- def inner_html
120
- if respond_to? :children
121
- children.map { |x| x.output("") }.join
154
+ def html(inner = nil, &blk)
155
+ if inner or blk
156
+ altered!
157
+ case inner
158
+ when Array
159
+ self.children = inner
160
+ else
161
+ self.children = Hpricot.make(inner, &blk)
162
+ end
163
+ reparent self.children
164
+ else
165
+ if respond_to? :children
166
+ children.map { |x| x.output("") }.join
167
+ end
122
168
  end
123
169
  end
170
+ alias_method :inner_html, :html
124
171
  alias_method :innerHTML, :inner_html
125
172
 
126
173
  # Inserts new contents into the current node, based on
127
174
  # the HTML contained in string +inner+.
128
175
  def inner_html=(inner)
129
- altered!
130
- case inner
131
- when String, IO
132
- self.children = Hpricot.parse(inner).children
133
- when Array
134
- self.children = inner
135
- when nil
136
- self.children = []
137
- end
138
- reparent self.children
176
+ html(inner || [])
139
177
  end
140
178
  alias_method :innerHTML=, :inner_html=
141
179
 
@@ -197,6 +235,9 @@ module Hpricot
197
235
  # containing the matching nodes. If +blk+ is given, it
198
236
  # is used to iterate through the matching set.
199
237
  def search(expr, &blk)
238
+ if Range === expr
239
+ return Elements.expand(at(expr.begin), at(expr.end), expr.exclude_end?)
240
+ end
200
241
  last = nil
201
242
  nodes = [self]
202
243
  done = []
@@ -210,7 +251,7 @@ module Hpricot
210
251
  when %r!^/?\.\.!
211
252
  last = expr = $'
212
253
  nodes.map! { |node| node.parent }
213
- when %r!^[>/]!
254
+ when %r!^[>/]\s*!
214
255
  last = expr = $'
215
256
  nodes = Elements[*nodes.map { |node| node.children if node.respond_to? :children }.flatten.compact]
216
257
  when %r!^\+!
@@ -364,6 +405,22 @@ module Hpricot
364
405
  sib[x] if sib and x >= 0
365
406
  end
366
407
 
408
+ # Find all preceding sibling elements. Like the other "sibling" methods, this weeds
409
+ # out text and comment nodes.
410
+ def preceding_siblings()
411
+ sibs = parent.containers
412
+ si = sibs.index(self)
413
+ return Elements[*sibs[0...si]]
414
+ end
415
+
416
+ # Find sibling elements which follow the current one. Like the other "sibling" methods, this weeds
417
+ # out text and comment nodes.
418
+ def following_siblings()
419
+ sibs = parent.containers
420
+ si = sibs.index(self) + 1
421
+ return Elements[*sibs[si...sibs.length]]
422
+ end
423
+
367
424
  # Puts together an array of neighboring sibling elements based on their proximity
368
425
  # to this element.
369
426
  #
@@ -412,7 +469,7 @@ module Hpricot
412
469
  def insert_after(nodes, ele)
413
470
  case nodes
414
471
  when Array
415
- nodes.each { |n| insert_after(n, ele) }
472
+ nodes.reverse_each { |n| insert_after(n, ele) }
416
473
  else
417
474
  reparent nodes
418
475
  idx = children.index(ele)
@@ -508,7 +565,7 @@ module Hpricot
508
565
  # +each_hyperlink_uri+ traverses hyperlinks such as HTML href attribute
509
566
  # of A element.
510
567
  #
511
- # It yields Hpricot::Text (or Hpricot::Loc) and URI for each hyperlink.
568
+ # It yields Hpricot::Text and URI for each hyperlink.
512
569
  #
513
570
  # The URI objects are created with a base URI which is given by
514
571
  # HTML BASE element or the argument ((|base_uri|)).
@@ -533,7 +590,7 @@ module Hpricot
533
590
  # +each_hyperlink+ traverses hyperlinks such as HTML href attribute
534
591
  # of A element.
535
592
  #
536
- # It yields Hpricot::Text or Hpricot::Loc.
593
+ # It yields Hpricot::Text.
537
594
  #
538
595
  # Note that +each_hyperlink+ yields HTML href attribute of BASE element.
539
596
  def each_hyperlink # :yields: text
@@ -738,22 +795,25 @@ module Hpricot
738
795
 
739
796
  module Elem::Trav
740
797
  def has_attribute?(name)
741
- self.attributes && self.attributes.has_key?(name.to_s)
798
+ self.raw_attributes && self.raw_attributes.has_key?(name.to_s)
742
799
  end
743
800
  def get_attribute(name)
744
- self.attributes && self.attributes[name.to_s]
801
+ a = self.raw_attributes && self.raw_attributes[name.to_s]
802
+ a = Hpricot.uxs(a) if a
803
+ a
745
804
  end
746
805
  alias_method :[], :get_attribute
747
806
  def set_attribute(name, val)
748
807
  altered!
749
- self.attributes ||= {}
750
- self.attributes[name.to_s] = val
808
+ self.raw_attributes ||= {}
809
+ self.raw_attributes[name.to_s] = Hpricot.xs(val)
751
810
  end
752
811
  alias_method :[]=, :set_attribute
753
812
  def remove_attribute(name)
813
+ name = name.to_s
754
814
  if has_attribute? name
755
815
  altered!
756
- self.attributes.delete(name)
816
+ self.raw_attributes.delete(name)
757
817
  end
758
818
  end
759
819
  end
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # The XChar library is provided courtesy of Sam Ruby (See
4
+ # http://intertwingly.net/stories/2005/09/28/xchar.rb)
5
+
6
+ # --------------------------------------------------------------------
7
+
8
+ ######################################################################
9
+ module Hpricot
10
+
11
+ ####################################################################
12
+ # XML Character converter, from Sam Ruby:
13
+ # (see http://intertwingly.net/stories/2005/09/28/xchar.rb).
14
+ #
15
+ module XChar # :nodoc:
16
+
17
+ # See
18
+ # http://intertwingly.net/stories/2004/04/14/i18n.html#CleaningWindows
19
+ # for details.
20
+ CP1252 = { # :nodoc:
21
+ 128 => 8364, # euro sign
22
+ 130 => 8218, # single low-9 quotation mark
23
+ 131 => 402, # latin small letter f with hook
24
+ 132 => 8222, # double low-9 quotation mark
25
+ 133 => 8230, # horizontal ellipsis
26
+ 134 => 8224, # dagger
27
+ 135 => 8225, # double dagger
28
+ 136 => 710, # modifier letter circumflex accent
29
+ 137 => 8240, # per mille sign
30
+ 138 => 352, # latin capital letter s with caron
31
+ 139 => 8249, # single left-pointing angle quotation mark
32
+ 140 => 338, # latin capital ligature oe
33
+ 142 => 381, # latin capital letter z with caron
34
+ 145 => 8216, # left single quotation mark
35
+ 146 => 8217, # right single quotation mark
36
+ 147 => 8220, # left double quotation mark
37
+ 148 => 8221, # right double quotation mark
38
+ 149 => 8226, # bullet
39
+ 150 => 8211, # en dash
40
+ 151 => 8212, # em dash
41
+ 152 => 732, # small tilde
42
+ 153 => 8482, # trade mark sign
43
+ 154 => 353, # latin small letter s with caron
44
+ 155 => 8250, # single right-pointing angle quotation mark
45
+ 156 => 339, # latin small ligature oe
46
+ 158 => 382, # latin small letter z with caron
47
+ 159 => 376, # latin capital letter y with diaeresis
48
+ }
49
+
50
+ # See http://www.w3.org/TR/REC-xml/#dt-chardata for details.
51
+ PREDEFINED = {
52
+ 34 => '&quot;', # quotation mark
53
+ 38 => '&amp;', # ampersand
54
+ 60 => '&lt;', # left angle bracket
55
+ 62 => '&gt;' # right angle bracket
56
+ }
57
+ PREDEFINED_U = PREDEFINED.inject({}) { |hsh, (k, v)| hsh[v] = k; hsh }
58
+
59
+ # See http://www.w3.org/TR/REC-xml/#charsets for details.
60
+ VALID = [
61
+ 0x9, 0xA, 0xD,
62
+ (0x20..0xD7FF),
63
+ (0xE000..0xFFFD),
64
+ (0x10000..0x10FFFF)
65
+ ]
66
+ end
67
+
68
+ class << self
69
+ # XML escaped version of chr
70
+ def xchr(str)
71
+ n = XChar::CP1252[str] || str
72
+ case n when *XChar::VALID
73
+ XChar::PREDEFINED[n] or (n<128 ? n.chr : "&##{n};")
74
+ else
75
+ '*'
76
+ end
77
+ end
78
+
79
+ # XML escaped version of to_s
80
+ def xs(str)
81
+ str.to_s.unpack('U*').map {|n| xchr(n)}.join # ASCII, UTF-8
82
+ rescue
83
+ str.to_s.unpack('C*').map {|n| xchr(n)}.join # ISO-8859-1, WIN-1252
84
+ end
85
+
86
+ # XML unescape
87
+ def uxs(str)
88
+ str.to_s.
89
+ gsub(/\&\w+;/) { |x| (XChar::PREDEFINED_U[x] || ??).chr }.
90
+ gsub(/\&\#(\d+);/) { [$1.to_i].pack("U*") }
91
+ end
92
+ end
93
+ end
94
+
@@ -0,0 +1,1320 @@
1
+
2
+ <html>
3
+ <head>
4
+ <meta name="GENERATOR" content="Microsoft Visual Studio 6.0">
5
+
6
+
7
+ <script language="javascript1.2">
8
+ function DateCheck(frmMo, frmDy, frmYr)
9
+ {
10
+ var returnCode;
11
+ var cdtStr, fdtStr;
12
+ var cdt = new Date();
13
+ //cdtStr = cdt.getYear().toString() + ZeroPad(cdt.getMonth() + 1, 2).toString() + ZeroPad(cdt.getDate(), 2).toString()
14
+ cdtStr = 20070205
15
+ fdtStr = frmYr + ZeroPad(frmMo, 2) + ZeroPad(frmDy, 2);
16
+ var frmDate = ZeroPad(frmMo, 2) + '/' + ZeroPad(frmDy, 2) + '/' + frmYr;
17
+ compareDate = new Date(frmDate);
18
+ var newDate = ZeroPad(compareDate.getMonth() + 1, 2) + '/' + ZeroPad(compareDate.getDate(), 2) + '/' + frmYr;
19
+ if (frmDate != newDate)
20
+ {
21
+ alert(frmDate + ' is not a valid date!');
22
+ returnCode = false;
23
+ }
24
+ else
25
+ {
26
+ if (fdtStr > cdtStr)
27
+ {
28
+ alert(frmDate + ' is an invalid BirthDate (greater than current date).\n\nYou have entered: ' + frmDate + ' as a birthdate.\n' + cdtStr + ' is the current date.\n');
29
+ returnCode = false;
30
+ }
31
+ else
32
+ returnCode = true;
33
+ }
34
+
35
+ return (returnCode);
36
+ }
37
+
38
+ function AutoTabCheck(obj, frmObj)
39
+ {
40
+ if (obj.value.length == obj.maxLength)
41
+ {
42
+ start = obj.id.length - 2;
43
+ incre = parseInt(obj.id.substr(start, 2));
44
+ NewIDnum = ZeroPad(incre + 1, 2);
45
+ NewID = obj.id.substr(0, start) + NewIDnum;
46
+ newObj = eval(frmObj.id + "." + NewID);
47
+ newObj.focus();
48
+ }
49
+ }
50
+
51
+ function CancelOutWizard()
52
+ {
53
+ var leaving = confirm("Clicking [OK] will exit the wizard without submitting, all data will be lost.\nClick [Cancel] to remain here.");
54
+ if (leaving)
55
+ window.location.replace('http://pacecares.fhsc.com/default.asp');
56
+ }
57
+
58
+ function allMoney(num)
59
+ {
60
+ numSet = "0123456789.";
61
+ for (x=0;x<=num.length;x++)
62
+ {
63
+ charX = num.substr(x, 1);
64
+ if (numSet.indexOf(charX) == -1)
65
+ {
66
+ leftS = num.substring(0, x);
67
+ rightS = num.substr(x+1);
68
+ num = leftS + rightS;
69
+ x--;
70
+ }
71
+ }
72
+ return(num);
73
+ }
74
+
75
+ function allNum(num)
76
+ {
77
+ numSet = "0123456789";
78
+ for (x=0;x<=num.length;x++)
79
+ {
80
+ charX = num.substr(x, 1);
81
+ if (numSet.indexOf(charX) == -1)
82
+ {
83
+ leftS = num.substring(0, x);
84
+ rightS = num.substr(x+1);
85
+ num = leftS + rightS;
86
+ x--;
87
+ }
88
+ }
89
+ return(num);
90
+ }
91
+
92
+ function isAlphaNum(str)
93
+ {
94
+ alphaSet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
95
+ newstr = str.toUpperCase();
96
+ for (x=0; x<newstr.length; x++)
97
+ {
98
+ if (alphaSet.indexOf(newstr.substr(x, 1)) == -1)
99
+ {
100
+ x = newstr.length;
101
+ return false;
102
+ }
103
+ }
104
+ return true;
105
+ }
106
+
107
+ function ZeroPad(str, pre)
108
+ {
109
+ var x;
110
+ var workstr;
111
+ for (x=1; x<pre; x++)
112
+ {
113
+ workstr = "0".concat("0");
114
+ }
115
+ return (workstr.concat(str).substr(workstr.concat(str).length-pre));
116
+ }
117
+
118
+ function Right(str, retlen)
119
+ {
120
+ if (retlen >= str.length)
121
+ return (str);
122
+ else
123
+ return (str.substr(str.length - retlen));
124
+ }
125
+
126
+ function HighlightField(FldStyle)
127
+ {
128
+ FldStyle.borderColor = "blue";
129
+ FldStyle.backgroundColor = "LightSteelBlue";
130
+ }
131
+
132
+ function UnHighlightField(FldStyle)
133
+ {
134
+ FldStyle.borderColor = "";
135
+ FldStyle.backgroundColor = "";
136
+ }
137
+
138
+ function AddTotalsthenSubmit(j)
139
+ {
140
+ xx = 0, yrvalue = 0, spvalue = 0;
141
+ while (xx<7)
142
+ {
143
+ xx++;
144
+ tot = eval("document.frmPace.Tot_Income" + xx);
145
+ sp = eval("document.frmPace.Sp_Income" + xx);
146
+ yr = eval("document.frmPace.Yr_Income" + xx);
147
+ tvalue = parseFloat(yr.value) + parseFloat(sp.value);
148
+ yrvalue = yrvalue + parseFloat(yr.value);
149
+ spvalue = spvalue + parseFloat(sp.value);
150
+ tot.value = Math.round(tvalue * Math.pow(10, 2)) / Math.pow(10, 2);
151
+ if (xx == 6)
152
+ {
153
+ document.frmPace.Yr_Income7.value = Math.round(yrvalue * Math.pow(10, 2)) / Math.pow(10, 2);
154
+ document.frmPace.Sp_Income7.value = Math.round(spvalue * Math.pow(10, 2)) / Math.pow(10, 2);
155
+ }
156
+ }
157
+ }
158
+
159
+ function IndividualEdits(Indv, obj, NoFocus)
160
+ {
161
+ var Status = true;
162
+ frm6Obj = document.frmSect06;
163
+
164
+ switch(Indv)
165
+ {
166
+ case "ssn":
167
+ val = obj.value;
168
+ if (isAlphaNum(val))
169
+ {
170
+ obj.value = val;
171
+ if (val.length > 1 && val.length != 9)
172
+ {
173
+ alert('SSN can contain a combination 9 numerics and/or letters.');
174
+ if (!NoFocus)
175
+ obj.focus();
176
+ Status = false;
177
+ }
178
+ }
179
+ else
180
+ {
181
+ Status = false;
182
+ }
183
+ break;
184
+
185
+ case "areacode":
186
+ val = obj.value;
187
+ newNum = allNum(val);
188
+ obj.value = newNum;
189
+ if (newNum.length > 1 && newNum.length != 3)
190
+ {
191
+ alert('area code must contain 3 numerics.');
192
+ if (!NoFocus)
193
+ obj.focus();
194
+ Status = false;
195
+ }
196
+ break;
197
+
198
+ case "phone":
199
+ val = obj.value;
200
+ newNum = allNum(val);
201
+ obj.value = newNum;
202
+ if (newNum.length > 1 && newNum.length != 7)
203
+ {
204
+ alert('phone trunk must contain 7 numerics.');
205
+ if (!NoFocus)
206
+ obj.focus();
207
+ Status = false;
208
+ }
209
+ break;
210
+
211
+ case "zip":
212
+ val = obj.value;
213
+ newNum = allNum(val);
214
+ obj.value = newNum;
215
+ if (newNum.length > 1 && newNum.length != 5)
216
+ {
217
+ alert('zip code must contain 5 numerics.');
218
+ obj.focus();
219
+ Status = false;
220
+ }
221
+ break;
222
+
223
+ case "zip4":
224
+ val = obj.value;
225
+ newNum = allNum(val);
226
+ obj.value = newNum;
227
+ if (newNum.length > 1 && newNum.length != 4)
228
+ {
229
+ alert('zip code suffix must contain 4 numerics.');
230
+ obj.focus();
231
+ Status = false;
232
+ }
233
+ break;
234
+
235
+ case "money":
236
+ val = obj.value;
237
+ newNum = allMoney(val);
238
+ obj.value = newNum;
239
+ if (newNum.length > 7)
240
+ {
241
+ alert('Money field can contain no more than 7 numerics including decimals.');
242
+ obj.focus();
243
+ Status = false;
244
+ }
245
+ break;
246
+
247
+ case "divYear":
248
+ val = obj.value;
249
+ if (frm6Obj.Yr_mstat[0].checked || frm6Obj.Yr_mstat[1].checked)
250
+ {
251
+ obj.value = '';
252
+ }
253
+ break;
254
+
255
+ case "marStat":
256
+ if (frm6Obj.Yr_mstat[0].checked || frm6Obj.Yr_mstat[1].checked)
257
+ {
258
+ frm6Obj.DSyear.value = '';
259
+ }
260
+ break;
261
+ default:
262
+ }
263
+
264
+ return Status;
265
+ }
266
+
267
+ function HelpWindows(Proof)
268
+ {
269
+ switch(Proof)
270
+ {
271
+ case "Age":
272
+ alert("Valid Proofs of Age:\n" +
273
+ "(note: The following examples are acceptable documents but not limited to:)\n\n" +
274
+ "- Birth Certificate/foreign birth certificate\n" +
275
+ "- Baptismal Record\n" +
276
+ "- Valid Driver's License\n" +
277
+ "- Social Security Document\n" +
278
+ "- Insurance Policy (not an insurance application)\n" +
279
+ "- Photocopy of previous PACE/PACENET card\n" +
280
+ "- Passport\n" +
281
+ "- Military Discharge Papers");
282
+ break;
283
+ case "Addr":
284
+ alert("Valid Proofs of Residency:\n" +
285
+ "(note: The following examples are acceptable documents but not limited to:)\n\n" +
286
+ "- Valid Driver's License/Owner's Card\n" +
287
+ "- Utility reciepts\n" +
288
+ "- Pre-printed rent reciepts\n" +
289
+ "- Social Security correspondence\n" +
290
+ "- Nursing Home residents may submit a letter on the facility's stationery stating the admission date and signed by the director or administrator\n" +
291
+ "- Local, state, or federal income tax return with a pre-printed name and address label");
292
+ break;
293
+ case "Income":
294
+ alert("Valid Proofs of Income:\n" +
295
+ "(note: The following examples are acceptable documents but not limited to:)\n\n" +
296
+ "- PA-40 or an IRS 1040 income tax return\n" +
297
+ "- Income tax return schedules (B, C, D, etc.)\n" +
298
+ "- Social Security 1099 form (only document accepted for Social Security income\n" +
299
+ "- Benefit letter stating SSI payments\n" +
300
+ "- RRB-1099 and RRB-1099R forms (Railroad)\n" +
301
+ "- Pension/Annuities/IRA 1099 forms\n" +
302
+ "- W-2 forms (wages)\n" +
303
+ "- Bank statement (last month of previous year)\n" +
304
+ "- Court Order");
305
+ break;
306
+ default:
307
+ }
308
+ }
309
+
310
+ function FieldFriendlyDisc(field)
311
+ {
312
+ switch(field)
313
+ {
314
+ case "Yr_lastname":
315
+ FriendlyName = "Applicant Last Name";
316
+ break;
317
+ case "Yr_firstname":
318
+ FriendlyName = "Applicant First Name";
319
+ break;
320
+ case "Yr_address":
321
+ FriendlyName = "Applicant Street Address";
322
+ break;
323
+ case "Yr_City":
324
+ FriendlyName = "Applicant City";
325
+ break;
326
+ case "Yr_State":
327
+ FriendlyName = "Applicant 2-digit State Code";
328
+ break;
329
+ case "Yr_zip01":
330
+ FriendlyName = "Applicant 5-digit Zip Code";
331
+ break;
332
+ case "Yr_zip02":
333
+ FriendlyName = "Applicant 4-digit Zip Code suffix";
334
+ break;
335
+ case "Yr_race":
336
+ FriendlyName = "Applicant Ethnicity Code";
337
+ break;
338
+ case "Yr_rtype":
339
+ FriendlyName = "Applicant Residence Type";
340
+ break;
341
+ case "Yr_Mo":
342
+ FriendlyName = "Applicant Birth Month";
343
+ break;
344
+ case "Yr_Day":
345
+ FriendlyName = "Applicant Birth Day of Month";
346
+ break;
347
+ case "Yr_Year":
348
+ FriendlyName = "Applicant Birth Year";
349
+ break;
350
+ case "Yr_ssn":
351
+ FriendlyName = "Applicant Social Security Number";
352
+ break;
353
+ case "Yr_phone01":
354
+ FriendlyName = "Applicant 3-digit Area Code";
355
+ break;
356
+ case "Yr_phone7":
357
+ FriendlyName = "Applicant 7-digit Telephone Number";
358
+ break;
359
+ case "Yr_mstat":
360
+ FriendlyName = "Marital Status";
361
+ break;
362
+ case "Sp_lastname":
363
+ FriendlyName = "Spouse Last Name";
364
+ break;
365
+ case "Sp_firstname":
366
+ FriendlyName = "Spouse First Name";
367
+ break;
368
+ case "Sp_address":
369
+ FriendlyName = "Spouse Street Address";
370
+ break;
371
+ case "Sp_City":
372
+ FriendlyName = "Spouse City";
373
+ break;
374
+ case "Sp_State":
375
+ FriendlyName = "Spouse 2-digit State Code";
376
+ break;
377
+ case "Sp_zip01":
378
+ FriendlyName = "Spouse 5-digit Zip Code";
379
+ break;
380
+ case "Sp_zip02":
381
+ FriendlyName = "Spouse 4-digit Zip Code suffix";
382
+ break;
383
+ case "Sp_race":
384
+ FriendlyName = "Spouse Ethnicity Code";
385
+ break;
386
+ case "Sp_rtype":
387
+ FriendlyName = "Spouse Residence Type";
388
+ break;
389
+ case "Sp_Mo":
390
+ FriendlyName = "Spouse Birth Month";
391
+ break;
392
+ case "Sp_Day":
393
+ FriendlyName = "Spouse Birth Day of Month";
394
+ break;
395
+ case "Sp_Year":
396
+ FriendlyName = "Spouse Birth Year";
397
+ break;
398
+ case "Sp_ssn":
399
+ FriendlyName = "Spouse Social Security Number";
400
+ break;
401
+ case "Sp_phone01":
402
+ FriendlyName = "Spouse 3-digit Area Code";
403
+ break;
404
+ case "Sp_phone7":
405
+ FriendlyName = "Spouse 7-digit Telephone Number";
406
+ break;
407
+ case "DSyear":
408
+ FriendlyName = "Year of Divorce or Separation";
409
+ break;
410
+ case "yrPOA_name":
411
+ FriendlyName = "Applicant Power of Attorney name";
412
+ break;
413
+ case "yrPOA_address":
414
+ FriendlyName = "Applicant Power of Attorney address";
415
+ break;
416
+ case "yrPOA_city":
417
+ FriendlyName = "Applicant Power of Attorney city";
418
+ break;
419
+ case "yrPOA_state":
420
+ FriendlyName = "Applicant Power of Attorney state";
421
+ break;
422
+ case "yrPOA_zip01":
423
+ FriendlyName = "Applicant Power of Attorney 5-digit Zip Code";
424
+ break;
425
+ case "yrPOA_zip02":
426
+ FriendlyName = "Applicant Power of Attorney 4-digit Zip Code suffix";
427
+ break;
428
+ case "yrPOA_phone01":
429
+ FriendlyName = "Applicant Power of Attorney area code";
430
+ break;
431
+ case "yrPOA_phone02":
432
+ FriendlyName = "Applicant Power of Attorney 3-digit section of phone number";
433
+ break;
434
+ case "yrPOA_phone03":
435
+ FriendlyName = "Applicant Power of Attorney 4-digit section of phone number";
436
+ break;
437
+ case "yrPOA_year":
438
+ FriendlyName = "Applicant Power of Attorney Year Assigned";
439
+ break;
440
+ case "spPOA_name":
441
+ FriendlyName = "Spouse Power of Attorney name";
442
+ break;
443
+ case "spPOA_address":
444
+ FriendlyName = "Spouse Power of Attorney address";
445
+ break;
446
+ case "spPOA_city":
447
+ FriendlyName = "Spouse Power of Attorney city";
448
+ break;
449
+ case "spPOA_state":
450
+ FriendlyName = "Spouse Power of Attorney state";
451
+ break;
452
+ case "spPOA_zip01":
453
+ FriendlyName = "Spouse Power of Attorney 5-digit Zip Code";
454
+ break;
455
+ case "spPOA_zip02":
456
+ FriendlyName = "Spouse Power of Attorney 4-digit Zip Code suffix";
457
+ break;
458
+ case "spPOA_phone01":
459
+ FriendlyName = "Spouse Power of Attorney area code";
460
+ break;
461
+ case "spPOA_phone02":
462
+ FriendlyName = "Spouse Power of Attorney 3-digit section of phone number";
463
+ break;
464
+ case "spPOA_phone03":
465
+ FriendlyName = "Spouse Power of Attorney 4-digit section of phone number";
466
+ break;
467
+ case "spPOA_year":
468
+ FriendlyName = "Spouse Power of Attorney Year Assigned";
469
+ break;
470
+ case "Scan01":
471
+ FriendlyName = "Valid Proof of Age Image";
472
+ break;
473
+ case "Scan02":
474
+ FriendlyName = "Valid Proof of Residence Image";
475
+ break;
476
+ case "Scan03":
477
+ FriendlyName = "Valid Proof of Income Image";
478
+ break;
479
+ default:
480
+ FriendlyName = field + ' [discription missing]';
481
+ }
482
+
483
+ return (FriendlyName + ' is a required field.');
484
+ }
485
+
486
+ function RequiredFields(page)
487
+ {
488
+ errmsg = "";
489
+ blnReqFlds = false;
490
+ Statchecked = false;
491
+
492
+ switch(page)
493
+ {
494
+ case "002":
495
+ frmObj = document.frmSect02;
496
+ for (i=0; i<frmObj.length; i++)
497
+ {
498
+ switch (frmObj.elements[i].id)
499
+ {
500
+ case "Yr_lastname":
501
+ case "Yr_firstname":
502
+ case "Yr_address":
503
+ case "Yr_City":
504
+ case "Yr_State":
505
+ case "Yr_zip01":
506
+ if (frmObj.elements[i].value.length < 1)
507
+ {
508
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
509
+ HighlightField(frmObj.elements[i].style);
510
+ blnReqFlds = true;
511
+ }
512
+ else
513
+ {
514
+ UnHighlightField(frmObj.elements[i].style);
515
+ }
516
+ break;
517
+ default:
518
+ }
519
+ }
520
+ break;
521
+ case "003":
522
+ frmObj = document.frmSect03;
523
+ for (i=0; i<frmObj.length; i++)
524
+ {
525
+ switch (frmObj.elements[i].id)
526
+ {
527
+ case "Yr_Mo":
528
+ case "Yr_Day":
529
+ case "Yr_Year":
530
+ if (frmObj.elements[i].value.length < 1 || frmObj.elements[i].value == 0)
531
+ {
532
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
533
+ HighlightField(frmObj.elements[i].style);
534
+ blnReqFlds = true;
535
+ }
536
+ else
537
+ {
538
+ UnHighlightField(frmObj.elements[i].style);
539
+ }
540
+ break;
541
+ case "Yr_BDate":
542
+ if (frmObj.Yr_Mo.value > 0 && frmObj.Yr_Day.value > 0 && frmObj.Yr_Year.value > 0)
543
+ {
544
+ if (DateCheck(frmObj.Yr_Mo.value, frmObj.Yr_Day.value, frmObj.Yr_Year.value) == false)
545
+ blnReqFlds = true;
546
+ }
547
+ break;
548
+ case "Yr_ssn":
549
+ frmObj.elements[i].value = frmObj.Yr_ssn01.value + frmObj.Yr_ssn02.value + frmObj.Yr_ssn03.value;
550
+ if (frmObj.elements[i].value.length < 1)
551
+ {
552
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
553
+ HighlightField(frmObj.Yr_ssn01.style);
554
+ HighlightField(frmObj.Yr_ssn02.style);
555
+ HighlightField(frmObj.Yr_ssn03.style);
556
+ blnReqFlds = true;
557
+ }
558
+ else
559
+ {
560
+ UnHighlightField(frmObj.Yr_ssn01.style);
561
+ UnHighlightField(frmObj.Yr_ssn02.style);
562
+ UnHighlightField(frmObj.Yr_ssn03.style);
563
+ if (IndividualEdits('ssn', frmObj.elements[i], true) == false)
564
+ {
565
+ frmObj.Yr_ssn01.focus();
566
+ blnReqFlds = true;
567
+ }
568
+ }
569
+ break;
570
+ /* 09/01/2002 - Now, remove requirement on AreaCode and Phone
571
+ case "Yr_phone01":
572
+ if (frmObj.elements[i].value.length < 1 || frmObj.elements[i].value == 0)
573
+ {
574
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
575
+ HighlightField(frmObj.elements[i].style);
576
+ blnReqFlds = true;
577
+ }
578
+ else
579
+ {
580
+ UnHighlightField(frmObj.elements[i].style);
581
+ if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
582
+ {
583
+ frmObj.elements[i].focus();
584
+ blnReqFlds = true;
585
+ }
586
+ }
587
+ break;
588
+ */
589
+ case "Yr_phone7":
590
+ frmObj.elements[i].value = frmObj.Yr_phone02.value + frmObj.Yr_phone03.value;
591
+ if (IndividualEdits('phone', frmObj.elements[i], true) == false)
592
+ {
593
+ frmObj.Yr_phone02.focus();
594
+ blnReqFlds = true;
595
+ }
596
+ break;
597
+ /*
598
+ if (frmObj.elements[i].value.length < 1)
599
+ {
600
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
601
+ HighlightField(frmObj.Yr_phone02.style);
602
+ HighlightField(frmObj.Yr_phone03.style);
603
+ blnReqFlds = true;
604
+ }
605
+ else
606
+ {
607
+ UnHighlightField(frmObj.Yr_phone02.style);
608
+ UnHighlightField(frmObj.Yr_phone03.style);
609
+ if (IndividualEdits('phone', frmObj.elements[i], true) == false)
610
+ {
611
+ frmObj.Yr_phone02.focus();
612
+ blnReqFlds = true;
613
+ }
614
+ }
615
+ break;
616
+ */
617
+ default:
618
+ }
619
+ }
620
+ break;
621
+ case "004":
622
+ frmObj = document.frmSect04;
623
+ for (i=0; i<frmObj.length; i++)
624
+ {
625
+ switch (frmObj.elements[i].id)
626
+ {
627
+ case "Sp_lastname":
628
+ case "Sp_firstname":
629
+ case "Sp_address":
630
+ case "Sp_City":
631
+ case "Sp_State":
632
+ case "Sp_zip01":
633
+ if (frmObj.elements[i].value.length < 1)
634
+ {
635
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
636
+ HighlightField(frmObj.elements[i].style);
637
+ blnReqFlds = true;
638
+ }
639
+ else
640
+ {
641
+ UnHighlightField(frmObj.elements[i].style);
642
+ }
643
+ break;
644
+ default:
645
+ }
646
+ }
647
+ break;
648
+ case "005":
649
+ frmObj = document.frmSect05;
650
+ for (i=0; i<frmObj.length; i++)
651
+ {
652
+ switch (frmObj.elements[i].id)
653
+ {
654
+ case "Sp_Mo":
655
+ case "Sp_Day":
656
+ case "Sp_Year":
657
+ if (frmObj.elements[i].value.length < 1 || frmObj.elements[i].value == 0)
658
+ {
659
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
660
+ HighlightField(frmObj.elements[i].style);
661
+ blnReqFlds = true;
662
+ }
663
+ else
664
+ {
665
+ UnHighlightField(frmObj.elements[i].style);
666
+ }
667
+ break;
668
+ case "Sp_BDate":
669
+ if (frmObj.Sp_Mo.value > 0 && frmObj.Sp_Day.value > 0 && frmObj.Sp_Year.value > 0)
670
+ {
671
+ if (DateCheck(frmObj.Sp_Mo.value, frmObj.Sp_Day.value, frmObj.Sp_Year.value) == false)
672
+ blnReqFlds = true;
673
+ }
674
+ break;
675
+ case "Sp_ssn":
676
+ frmObj.elements[i].value = frmObj.Sp_ssn01.value + frmObj.Sp_ssn02.value + frmObj.Sp_ssn03.value;
677
+ if (frmObj.elements[i].value.length < 1)
678
+ {
679
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
680
+ HighlightField(frmObj.Sp_ssn01.style);
681
+ HighlightField(frmObj.Sp_ssn02.style);
682
+ HighlightField(frmObj.Sp_ssn03.style);
683
+ blnReqFlds = true;
684
+ }
685
+ else
686
+ {
687
+ UnHighlightField(frmObj.Sp_ssn01.style);
688
+ UnHighlightField(frmObj.Sp_ssn02.style);
689
+ UnHighlightField(frmObj.Sp_ssn03.style);
690
+ if (IndividualEdits('ssn', frmObj.elements[i], true) == false)
691
+ {
692
+ frmObj.Sp_ssn01.focus();
693
+ blnReqFlds = true;
694
+ }
695
+ }
696
+ break;
697
+ /* 09/01/2002 - Now, remove requirement on AreaCode and Phone
698
+ case "Sp_phone01":
699
+ if (frmObj.elements[i].value.length < 1 || frmObj.elements[i].value == 0)
700
+ {
701
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
702
+ HighlightField(frmObj.elements[i].style);
703
+ blnReqFlds = true;
704
+ }
705
+ else
706
+ {
707
+ UnHighlightField(frmObj.elements[i].style);
708
+ if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
709
+ {
710
+ frmObj.elements[i].focus();
711
+ blnReqFlds = true;
712
+ }
713
+ }
714
+ break;
715
+ */
716
+ case "Sp_phone7":
717
+ frmObj.elements[i].value = frmObj.Sp_phone02.value + frmObj.Sp_phone03.value;
718
+ if (IndividualEdits('phone', frmObj.elements[i], true) == false)
719
+ {
720
+ frmObj.Sp_phone02.focus();
721
+ blnReqFlds = true;
722
+ }
723
+ break;
724
+ /*
725
+ if (frmObj.elements[i].value.length < 1)
726
+ {
727
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
728
+ HighlightField(frmObj.Sp_phone02.style);
729
+ HighlightField(frmObj.Sp_phone03.style);
730
+ blnReqFlds = true;
731
+ }
732
+ else
733
+ {
734
+ UnHighlightField(frmObj.Sp_phone02.style);
735
+ UnHighlightField(frmObj.Sp_phone03.style);
736
+ if (IndividualEdits('phone', frmObj.elements[i], true) == false)
737
+ {
738
+ frmObj.Sp_phone02.focus();
739
+ blnReqFlds = true;
740
+ }
741
+ }
742
+ break;
743
+ */
744
+ default:
745
+ }
746
+ }
747
+ break;
748
+
749
+ case "006":
750
+ frmObj = document.frmSect06;
751
+ for (i=0; i<frmObj.length; i++)
752
+ {
753
+ switch (frmObj.elements[i].id)
754
+ {
755
+ case "Yr_rtype":
756
+ if (frmObj.elements[i].value.length < 1)
757
+ {
758
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
759
+ HighlightField(frmObj.elements[i].style);
760
+ blnReqFlds = true;
761
+ }
762
+ else
763
+ {
764
+ UnHighlightField(frmObj.elements[i].style);
765
+ }
766
+ break;
767
+ default:
768
+ switch (frmObj.elements[i].id)
769
+ {
770
+ case "Yr_mstat":
771
+ if (frmObj.elements[i].value.length < 1)
772
+ {
773
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
774
+ HighlightField(frmObj.elements[i].style);
775
+ blnReqFlds = true;
776
+ }
777
+ else
778
+ {
779
+ UnHighlightField(frmObj.elements[i].style);
780
+ }
781
+ break;
782
+ case "DSyear":
783
+ if (frmObj.Yr_mstat.value == '3' || frmObj.Yr_mstat.value == '4')
784
+ {
785
+ if (frmObj.elements[i].value.length < 1)
786
+ {
787
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
788
+ HighlightField(frmObj.elements[i].style);
789
+ blnReqFlds = true;
790
+ }
791
+ else
792
+ {
793
+ UnHighlightField(frmObj.elements[i].style);
794
+ }
795
+ }
796
+ default:
797
+ }
798
+ }
799
+ }
800
+ break;
801
+ case "007":
802
+ frmObj = document.frmSect07;
803
+ for (i=0; i<frmObj.length; i++)
804
+ {
805
+ switch (frmObj.elements[i].id)
806
+ {
807
+ case "Sp_rtype":
808
+ if (frmObj.elements[i].value.length < 1)
809
+ {
810
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.elements[i].id) + "\n";
811
+ HighlightField(frmObj.elements[i].style);
812
+ blnReqFlds = true;
813
+ }
814
+ else
815
+ {
816
+ UnHighlightField(frmObj.elements[i].style);
817
+ }
818
+ break;
819
+ default:
820
+ }
821
+ }
822
+ break;
823
+ case "008":
824
+ frmObj = document.frmSect08;
825
+ Inc01 = frmObj.Tot_Income1;
826
+ Inc02 = frmObj.Tot_Income2;
827
+ Inc03 = frmObj.Tot_Income3;
828
+ Inc04 = frmObj.Tot_Income4;
829
+ Inc05 = frmObj.Tot_Income5;
830
+ Inc06 = frmObj.Tot_Income6;
831
+ spInc01 = frmObj.sp_Tot_Income1;
832
+ spInc02 = frmObj.sp_Tot_Income2;
833
+ spInc03 = frmObj.sp_Tot_Income3;
834
+ spInc04 = frmObj.sp_Tot_Income4;
835
+ spInc05 = frmObj.sp_Tot_Income5;
836
+ spInc06 = frmObj.sp_Tot_Income6;
837
+ tvalue = 0;
838
+ tvalue = tvalue + parseFloat(Inc01.value) + parseFloat(Inc02.value);
839
+ tvalue = tvalue + parseFloat(Inc03.value) + parseFloat(Inc04.value);
840
+ tvalue = tvalue + parseFloat(Inc05.value) + parseFloat(Inc06.value);
841
+ tvalue = tvalue + parseFloat(spInc01.value) + parseFloat(spInc02.value);
842
+ tvalue = tvalue + parseFloat(spInc03.value) + parseFloat(spInc04.value);
843
+ tvalue = tvalue + parseFloat(spInc05.value) + parseFloat(spInc06.value);
844
+
845
+ frmObj.Tot_Income7.value = Math.round(tvalue * Math.pow(10, 2)) / Math.pow(10, 2);
846
+ blnReqFlds = false;
847
+ break;
848
+
849
+ case "888":
850
+ //There is a bug here. Since boolean value can be
851
+ //changed on just either Applicant or spouse being
852
+ //correct, only having one correct can bypass the check.
853
+ //SIW 07.21.2004
854
+ frmObj = document.frmSect888;
855
+ if ((frmObj.CertFirstA.value == frmObj.hdn888AF.value) && (frmObj.CertLastA.value == frmObj.hdn888AL.value) && (frmObj.CertMiA.value == frmObj.hdn888AM.value))
856
+ {
857
+ blnReqFlds = false;
858
+ }
859
+ else
860
+ {
861
+ errmsg = errmsg + "The entered name must exactly match that entered for the Applicant." + "\n";
862
+ blnReqFlds = true;
863
+ }
864
+
865
+ if (frmObj.hdn888SF.value.length > 0)
866
+ {
867
+ if ((frmObj.CertFirstS.value == frmObj.hdn888SF.value) && (frmObj.CertLastS.value == frmObj.hdn888SL.value) && (frmObj.CertMiS.value == frmObj.hdn888SM.value))
868
+ {
869
+ blnReqFlds = false;
870
+ }
871
+ else
872
+ {
873
+ errmsg = errmsg + "The entered name must exactly match that entered for the Spouse." + "\n";
874
+ blnReqFlds = true;
875
+ }
876
+ }
877
+ break;
878
+
879
+ case "009":
880
+ frmObj = document.frmSect09;
881
+ for (i=0; i<frmObj.length; i++)
882
+ {
883
+ switch (frmObj.elements[i].id)
884
+ {
885
+ case "yrPOA_check":
886
+ if (frmObj.yrPOA_check.checked)
887
+ {
888
+ if (frmObj.yrPOA_name.value.length < 1)
889
+ {
890
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_name.id) + "\n";
891
+ HighlightField(frmObj.yrPOA_name.style);
892
+ blnReqFlds = true;
893
+ }
894
+ else
895
+ {
896
+ UnHighlightField(frmObj.yrPOA_name.style);
897
+ }
898
+ if (frmObj.yrPOA_address.value.length < 1)
899
+ {
900
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_address.id) + "\n";
901
+ HighlightField(frmObj.yrPOA_address.style);
902
+ blnReqFlds = true;
903
+ }
904
+ else
905
+ {
906
+ UnHighlightField(frmObj.yrPOA_address.style);
907
+ }
908
+ if (frmObj.yrPOA_city.value.length < 1)
909
+ {
910
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_city.id) + "\n";
911
+ HighlightField(frmObj.yrPOA_city.style);
912
+ blnReqFlds = true;
913
+ }
914
+ else
915
+ {
916
+ UnHighlightField(frmObj.yrPOA_city.style);
917
+ }
918
+ if (frmObj.yrPOA_state.value.length < 1)
919
+ {
920
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_state.id) + "\n";
921
+ HighlightField(frmObj.yrPOA_state.style);
922
+ blnReqFlds = true;
923
+ }
924
+ else
925
+ {
926
+ UnHighlightField(frmObj.yrPOA_state.style);
927
+ }
928
+ if (frmObj.yrPOA_zip01.value.length < 1)
929
+ {
930
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_zip01.id) + "\n";
931
+ HighlightField(frmObj.yrPOA_zip01.style);
932
+ blnReqFlds = true;
933
+ }
934
+ else
935
+ {
936
+ UnHighlightField(frmObj.yrPOA_zip01.style);
937
+ }
938
+ //yrPOAyr = frmObj.yrPOA_year;
939
+ //valYear = yrPOAyr.options[yrPOAyr.selectedIndex].value;
940
+ //if (valYear.length < 1)
941
+ //{
942
+ // errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_year.id) + "\n";
943
+ // HighlightField(frmObj.yrPOA_year.style);
944
+ // blnReqFlds = true;
945
+ //}
946
+ //else
947
+ //{
948
+ // UnHighlightField(frmObj.yrPOA_year.style);
949
+ //}
950
+ /*
951
+ if (frmObj.yrPOA_phone01.value.length < 1)
952
+ {
953
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_phone01.id) + "\n";
954
+ HighlightField(frmObj.yrPOA_phone01.style);
955
+ blnReqFlds = true;
956
+ }
957
+ else
958
+ {
959
+ UnHighlightField(frmObj.yrPOA_phone01.style);
960
+ }
961
+ if (frmObj.yrPOA_phone02.value.length < 1)
962
+ {
963
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_phone02.id) + "\n";
964
+ HighlightField(frmObj.yrPOA_phone02.style);
965
+ blnReqFlds = true;
966
+ }
967
+ else
968
+ {
969
+ UnHighlightField(frmObj.yrPOA_phone02.style);
970
+ }
971
+ if (frmObj.yrPOA_phone03.value.length < 1)
972
+ {
973
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.yrPOA_phone03.id) + "\n";
974
+ HighlightField(frmObj.yrPOA_phone03.style);
975
+ blnReqFlds = true;
976
+ }
977
+ else
978
+ {
979
+ UnHighlightField(frmObj.yrPOA_phone03.style);
980
+ }
981
+ */
982
+ }
983
+ break;
984
+ case "yrPOA_phone10":
985
+ frmObj.elements[i].value = frmObj.yrPOA_phone01.value;
986
+ if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
987
+ {
988
+ frmObj.yrPOA_phone01.focus();
989
+ blnReqFlds = true;
990
+ }
991
+ frmObj.elements[i].value = frmObj.yrPOA_phone02.value + frmObj.yrPOA_phone03.value;
992
+ if (IndividualEdits('phone', frmObj.elements[i], true) == false)
993
+ {
994
+ frmObj.yrPOA_phone02.focus();
995
+ blnReqFlds = true;
996
+ }
997
+ if (blnReqFlds == false)
998
+ frmObj.elements[i].value = frmObj.yrPOA_phone01.value + frmObj.yrPOA_phone02.value + frmObj.yrPOA_phone03.value;
999
+ break;
1000
+ default:
1001
+ }
1002
+ }
1003
+ break;
1004
+ case "010":
1005
+ frmObj = document.frmSect10;
1006
+ for (i=0; i<frmObj.length; i++)
1007
+ {
1008
+ switch (frmObj.elements[i].id)
1009
+ {
1010
+ case "spPOA_check":
1011
+ if (frmObj.spPOA_check.checked)
1012
+ {
1013
+ if (frmObj.spPOA_name.value.length < 1)
1014
+ {
1015
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_name.id) + "\n";
1016
+ HighlightField(frmObj.spPOA_name.style);
1017
+ blnReqFlds = true;
1018
+ }
1019
+ else
1020
+ {
1021
+ UnHighlightField(frmObj.spPOA_name.style);
1022
+ }
1023
+ if (frmObj.spPOA_address.value.length < 1)
1024
+ {
1025
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_address.id) + "\n";
1026
+ HighlightField(frmObj.spPOA_address.style);
1027
+ blnReqFlds = true;
1028
+ }
1029
+ else
1030
+ {
1031
+ UnHighlightField(frmObj.spPOA_address.style);
1032
+ }
1033
+ if (frmObj.spPOA_city.value.length < 1)
1034
+ {
1035
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_city.id) + "\n";
1036
+ HighlightField(frmObj.spPOA_city.style);
1037
+ blnReqFlds = true;
1038
+ }
1039
+ else
1040
+ {
1041
+ UnHighlightField(frmObj.spPOA_city.style);
1042
+ }
1043
+ if (frmObj.spPOA_state.value.length < 1)
1044
+ {
1045
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_state.id) + "\n";
1046
+ HighlightField(frmObj.spPOA_state.style);
1047
+ blnReqFlds = true;
1048
+ }
1049
+ else
1050
+ {
1051
+ UnHighlightField(frmObj.spPOA_state.style);
1052
+ }
1053
+ if (frmObj.spPOA_zip01.value.length < 1)
1054
+ {
1055
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_zip01.id) + "\n";
1056
+ HighlightField(frmObj.spPOA_zip01.style);
1057
+ blnReqFlds = true;
1058
+ }
1059
+ else
1060
+ {
1061
+ UnHighlightField(frmObj.spPOA_zip01.style);
1062
+ }
1063
+ //spPOAyr = frmObj.spPOA_year;
1064
+ //valYear = spPOAyr.options[spPOAyr.selectedIndex].value;
1065
+ //if (valYear.length < 1)
1066
+ //{
1067
+ // errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_year.id) + "\n";
1068
+ // HighlightField(frmObj.spPOA_year.style);
1069
+ // blnReqFlds = true;
1070
+ //}
1071
+ //else
1072
+ //{
1073
+ // UnHighlightField(frmObj.spPOA_year.style);
1074
+ //}
1075
+ /*
1076
+ if (frmObj.spPOA_phone01.value.length < 1)
1077
+ {
1078
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_phone01.id) + "\n";
1079
+ HighlightField(frmObj.spPOA_phone01.style);
1080
+ blnReqFlds = true;
1081
+ }
1082
+ else
1083
+ {
1084
+ UnHighlightField(frmObj.spPOA_phone01.style);
1085
+ }
1086
+ if (frmObj.spPOA_phone02.value.length < 1)
1087
+ {
1088
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_phone02.id) + "\n";
1089
+ HighlightField(frmObj.spPOA_phone02.style);
1090
+ blnReqFlds = true;
1091
+ }
1092
+ else
1093
+ {
1094
+ UnHighlightField(frmObj.spPOA_phone02.style);
1095
+ }
1096
+ if (frmObj.spPOA_phone03.value.length < 1)
1097
+ {
1098
+ errmsg = errmsg + FieldFriendlyDisc(frmObj.spPOA_phone03.id) + "\n";
1099
+ HighlightField(frmObj.spPOA_phone03.style);
1100
+ blnReqFlds = true;
1101
+ }
1102
+ else
1103
+ {
1104
+ UnHighlightField(frmObj.spPOA_phone03.style);
1105
+ }
1106
+ */
1107
+ }
1108
+ break;
1109
+ case "spPOA_phone10":
1110
+ frmObj.elements[i].value = frmObj.spPOA_phone01.value;
1111
+ if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
1112
+ {
1113
+ frmObj.spPOA_phone01.focus();
1114
+ blnReqFlds = true;
1115
+ }
1116
+ frmObj.elements[i].value = frmObj.spPOA_phone02.value + frmObj.spPOA_phone03.value;
1117
+ if (IndividualEdits('phone', frmObj.elements[i], true) == false)
1118
+ {
1119
+ frmObj.spPOA_phone02.focus();
1120
+ blnReqFlds = true;
1121
+ }
1122
+ if (blnReqFlds == false)
1123
+ frmObj.elements[i].value = frmObj.spPOA_phone01.value + frmObj.spPOA_phone02.value + frmObj.spPOA_phone03.value;
1124
+ break;
1125
+ default:
1126
+ }
1127
+ }
1128
+ break;
1129
+ case "011":
1130
+ frmObj = document.frmSect11;
1131
+ for (i=0; i<frmObj.length; i++)
1132
+ {
1133
+ switch (frmObj.elements[i].id)
1134
+ {
1135
+ case "yr_prepphone10":
1136
+ frmObj.elements[i].value = frmObj.yr_prepphone01.value;
1137
+ if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
1138
+ {
1139
+ frmObj.yr_prepphone01.focus();
1140
+ blnReqFlds = true;
1141
+ }
1142
+ frmObj.elements[i].value = frmObj.yr_prepphone02.value + frmObj.yr_prepphone03.value;
1143
+ if (IndividualEdits('phone', frmObj.elements[i], true) == false)
1144
+ {
1145
+ frmObj.yr_prepphone02.focus();
1146
+ blnReqFlds = true;
1147
+ }
1148
+ if (blnReqFlds == false)
1149
+ frmObj.elements[i].value = frmObj.yr_prepphone01.value + frmObj.yr_prepphone02.value + frmObj.yr_prepphone03.value;
1150
+ break;
1151
+ default:
1152
+ }
1153
+ }
1154
+ break;
1155
+ //case "012":
1156
+ // frmObj = document.frmSect12;
1157
+ // for (i=0; i<frmObj.length; i++)
1158
+ // {
1159
+ // switch (frmObj.elements[i].id)
1160
+ // {
1161
+ // case "sp_prepphone10":
1162
+ // frmObj.elements[i].value = frmObj.sp_prepphone01.value;
1163
+ // if (IndividualEdits('areacode', frmObj.elements[i], true) == false)
1164
+ // {
1165
+ // frmObj.sp_prepphone01.focus();
1166
+ // blnReqFlds = true;
1167
+ // }
1168
+ // frmObj.elements[i].value = frmObj.sp_prepphone02.value + frmObj.sp_prepphone03.value;
1169
+ // if (IndividualEdits('phone', frmObj.elements[i], true) == false)
1170
+ // {
1171
+ // frmObj.sp_prepphone02.focus();
1172
+ // blnReqFlds = true;
1173
+ // }
1174
+ // if (blnReqFlds == false)
1175
+ // frmObj.elements[i].value = frmObj.sp_prepphone01.value + frmObj.sp_prepphone02.value + frmObj.sp_prepphone03.value;
1176
+ // break;
1177
+ // }
1178
+ // }
1179
+ // break;
1180
+ default:
1181
+ }
1182
+
1183
+ if (blnReqFlds)
1184
+ {
1185
+ if (errmsg.length > 0)
1186
+ alert(errmsg);
1187
+ }
1188
+ return(blnReqFlds);
1189
+ }
1190
+
1191
+ function GoSubmit(frmObj)
1192
+ {
1193
+ if (RequiredFields(frmObj.hdnfrm.value) == false)
1194
+ {
1195
+ frmObj.submit();
1196
+ }
1197
+ }
1198
+
1199
+ function popUp(url)
1200
+ {
1201
+ sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
1202
+ self.name = "mainWin";
1203
+ }
1204
+
1205
+ function AddPrepName(Obj)
1206
+ {
1207
+ var typeObj = Obj.id;
1208
+ var frmObj = Obj.form;
1209
+ if (typeObj.substr(0, 2) == "yr")
1210
+ {
1211
+ frmObj.yr_prepname.value = frmObj.hdnPrepAppFirst.value + ' ' + frmObj.hdnPrepAppLast.value;
1212
+ frmObj.yr_prepphone01.value = frmObj.hdnPrepAppAC.value;
1213
+ frmObj.yr_prepphone02.value = frmObj.hdnPrepAppPhone.value.substr(0, 3);
1214
+ frmObj.yr_prepphone03.value = frmObj.hdnPrepAppPhone.value.substr(3, 4);
1215
+ }
1216
+ else
1217
+ {
1218
+ frmObj.sp_prepname.value = frmObj.hdnPrepSpFirst.value + ' ' + frmObj.hdnPrepSpLast.value;
1219
+ frmObj.sp_prepphone01.value = frmObj.hdnPrepSpAC.value;
1220
+ frmObj.sp_prepphone02.value = frmObj.hdnPrepSpPhone.value.substr(0, 3);
1221
+ frmObj.sp_prepphone03.value = frmObj.hdnPrepSpPhone.value.substr(3, 4);
1222
+ }
1223
+ }
1224
+ </script>
1225
+ </head>
1226
+ <body bgcolor=GhostWhite>
1227
+
1228
+ <table border=0 cellpadding=0 cellspacing=0 width="600" align=center>
1229
+ <tr>
1230
+ <td width="50%" align=center>
1231
+ <img src="/images/NewColorLogo.gif" border=0
1232
+ align=absmiddle alt="First Health Services Corporation logo"
1233
+ title="First Health Services Corporation logo">
1234
+ </td>
1235
+ <td width="50%" align=center valign=middle>
1236
+ <img src="/images/PaPACE.gif" border=0
1237
+ align=absmiddle alt="Pennsylvania Department of Aging logo"
1238
+ title="Pennsylvania Department of Aging logo">
1239
+ </td>
1240
+ </tr>
1241
+ <tr>
1242
+ <td width="50%" valign=top nowrap>
1243
+ <b><font size=3 face="Arial">
1244
+ PACE/PACENET Enrollment</font></b>
1245
+ </td>
1246
+ <td width="50%" valign=top nowrap>
1247
+ <b><font size=2 face="Arial">
1248
+ Need Assistance?<br>
1249
+ Call: Inside PA <font color="Red">1-800-225-7223</font> Outside PA <font color="Red">717-651-3600</font><br>
1250
+ Email: <a href="mailto:PACECares@fhsc.com"
1251
+ title="Email: PACECares@fhsc.com">PACECares@fhsc.com</a>
1252
+ </font></b>
1253
+ </td>
1254
+ </tr>
1255
+ </table>
1256
+
1257
+
1258
+ <form id="frmSect11" name="frmSect11" method=get
1259
+ enctype="multipart/form-data" action="PaceWizardDataSet.asp">
1260
+ <table border=2 cellpadding=0 cellspacing=0 width="600" bgcolor="#000066" align=center>
1261
+ <tr><td>
1262
+ <table border=0 cellpadding=0 cellspacing=0 width="100%" bgcolor="#000066" align=center>
1263
+ <tr>
1264
+ <td width="100%" colspan=3><br></td>
1265
+ </tr>
1266
+ <tr bgcolor="LightGrey">
1267
+ <td width="100%" colspan=3 valign=top>
1268
+ <font size=3><b>
1269
+ <input type="checkbox" id="yrprep_check" name="yrprep_check"
1270
+ onClick="AddPrepName(this)">Check if same
1271
+ as Applicant</b></font>
1272
+ </td>
1273
+ </tr>
1274
+ <tr bgcolor="LightGrey">
1275
+ <td width="20%" nowrap><font size=3><b>Preparer's Name</b></font></td>
1276
+ <td width="80%" colspan=2 valign=bottom nowrap>
1277
+ <input id="yr_prepname" name="yr_prepname" size=30 maxlength=100>
1278
+ <font size=3><b>Preparer's Phone</b></font>
1279
+ (<input id="yr_prepphone01" name="yr_prepphone01" size=3 maxlength=3
1280
+ onKeyUp="AutoTabCheck(this, this.form)">)
1281
+ <input id="yr_prepphone02" name="yr_prepphone02" size=3 maxlength=3
1282
+ onKeyUp="AutoTabCheck(this, this.form)">-<input
1283
+ id="yr_prepphone03" name="yr_prepphone03" size=4 maxlength=4>
1284
+ <input type="hidden" id="yr_prepphone10" name="yr_prepphone10">
1285
+ <input type="hidden" id="hdnPrepAppLast" name="hdnPrepAppLast" value="Doe">
1286
+ <input type="hidden" id="hdnPrepAppFirst" name="hdnPrepAppFirst" value="John">
1287
+ <input type="hidden" id="hdnPrepAppAC" name="hdnPrepAppAC" value="215">
1288
+ <input type="hidden" id="hdnPrepAppPhone" name="hdnPrepAppPhone" value="5551212">
1289
+ </td>
1290
+ </tr>
1291
+ <tr>
1292
+ <td width="100%" align=center nowrap colspan=3><br>
1293
+ <font color="white" size=3><b>Please enter the Preparer's Name & Phone #.<br>
1294
+ When you are done, click on 'Continue'.<br></b></font>
1295
+ </td>
1296
+ </tr>
1297
+ <tr>
1298
+ <td width="100%" align=right nowrap colspan=3><br><br>
1299
+ <input type="button" value="Continue" id=button2 name=button2
1300
+ onClick="Javascript:GoSubmit(document.frmSect11)">
1301
+ <input type="button" value="Cancel" id=button1 name=button1
1302
+ onClick="Javascript:CancelOutWizard()">
1303
+ <input type="hidden" value="011" id="hdnfrm" name="hdnfrm">
1304
+ <br><br>
1305
+ </td>
1306
+ </tr>
1307
+ </table>
1308
+ </td></tr>
1309
+ </table>
1310
+ <!--
1311
+
1312
+ <input type="hidden" id="hdnSpouse" name="hdnSpouse"
1313
+ value="2">
1314
+ <input type="hidden" id="hdnRecIDwr" name="hdnRecIDwr"
1315
+ value="45791">
1316
+ <input type="hidden" id="hdnMiscInfo" name="hdnMiscInfo"
1317
+ value="BFC">
1318
+ </form>
1319
+ </body>
1320
+ </html>