Lines 147-152
function Dopopguarantor(link) {
Link Here
|
147 |
var newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=yes,top'); |
147 |
var newin=window.open(link,'popup','width=600,height=400,resizable=no,toolbar=false,scrollbars=yes,top'); |
148 |
} |
148 |
} |
149 |
|
149 |
|
|
|
150 |
function CalculateAge() { |
151 |
var hint = $("#dateofbirth").siblings(".hint").first(); |
152 |
hint.html(dateformat); |
153 |
|
154 |
if (dformat == 'metric' && false === CheckDate(document.form.dateofbirth)) { |
155 |
return; |
156 |
} |
157 |
|
158 |
if (!$("#dateofbirth").datepicker( 'getDate' )) { |
159 |
return; |
160 |
} |
161 |
|
162 |
var today = new Date(); |
163 |
var dob = new Date($("#dateofbirth").datepicker( 'getDate' )); |
164 |
|
165 |
var nowyear = today.getFullYear(); |
166 |
var nowmonth = today.getMonth(); |
167 |
var nowday = today.getDate(); |
168 |
|
169 |
var birthyear = dob.getFullYear(); |
170 |
var birthmonth = dob.getMonth(); |
171 |
var birthday = dob.getDate(); |
172 |
|
173 |
var year = nowyear - birthyear; |
174 |
var month = nowmonth - birthmonth; |
175 |
var day = nowday - birthday; |
176 |
|
177 |
if(day < 0) { |
178 |
month = parseInt(month) -1; |
179 |
} |
180 |
|
181 |
if(month < 0) { |
182 |
year = parseInt(year) -1; |
183 |
month = 12 + month; |
184 |
} |
185 |
|
186 |
var age_string; |
187 |
if (year || month) { |
188 |
age_string = _('Age: '); |
189 |
} |
190 |
if (year) { |
191 |
age_string += _(year > 1 ? '%s years ' : '%s year ').format(year); |
192 |
} |
193 |
|
194 |
if (month) { |
195 |
age_string += _(month > 1 ? '%s months ' : '%s month ').format(month); |
196 |
} |
197 |
|
198 |
hint.html(age_string); |
199 |
|
200 |
} |
201 |
|
150 |
$(document).ready(function(){ |
202 |
$(document).ready(function(){ |
151 |
if($("#yesdebarred").is(":checked")){ |
203 |
if($("#yesdebarred").is(":checked")){ |
152 |
$("#debarreduntil").show(); |
204 |
$("#debarreduntil").show(); |