equal
deleted
inserted
replaced
93 .attr('size', '7') |
93 .attr('size', '7') |
94 .css('text-align', 'center'); |
94 .css('text-align', 'center'); |
95 box.appendChild(field); |
95 box.appendChild(field); |
96 |
96 |
97 $(box) |
97 $(box) |
98 .css('top', (( getHeight() / 2 ) - ( $(box).Height() / 2 )) + 'px') |
98 .css('top', (( getHeight() / 2 ) - ( $(box).Height() / 2 ) + getScrollOffset()) + 'px') |
99 .css('left', (( $(document.body).Width() / 2 ) - ( $(box).Width() / 2 )) + 'px'); |
99 .css('left', (( $(document.body).Width() / 2 ) - ( $(box).Width() / 2 )) + 'px'); |
100 |
100 |
101 $(box).fadeIn(250); |
101 $(box).fadeIn(250); |
102 field.focus(); |
102 field.focus(); |
103 field.onkeyup = function(e) |
103 field.onkeyup = function(e) |
161 } else if( document.body && ( document.body.clientWidth || document.body.clientWidth ) ) { |
161 } else if( document.body && ( document.body.clientWidth || document.body.clientWidth ) ) { |
162 myWidth = document.body.clientWidth; |
162 myWidth = document.body.clientWidth; |
163 } |
163 } |
164 return myWidth; |
164 return myWidth; |
165 } |
165 } |
|
166 |
|
167 function getScrollOffset(el) |
|
168 { |
|
169 var position; |
|
170 var s = el || self; |
|
171 el = el || document; |
|
172 if ( el.scrollTop ) |
|
173 { |
|
174 position = el.scrollTop; |
|
175 } |
|
176 else if (s.pageYOffset) |
|
177 { |
|
178 position = self.pageYOffset; |
|
179 } |
|
180 else if (document.documentElement && document.documentElement.scrollTop) |
|
181 { |
|
182 position = document.documentElement.scrollTop; |
|
183 } |
|
184 else if (document.body) |
|
185 { |
|
186 position = document.body.scrollTop; |
|
187 } |
|
188 return position; |
|
189 } |