3 {php}html_header_show();{/php}
5 <style type=
"text/css">@import url
({$FORM_ACTION
}/library
/dynarch_calendar
.css
);</style>
6 <script type=
"text/javascript" src=
"{$FORM_ACTION}/library/dialog.js"></script>
7 <script type=
"text/javascript" src=
"{$FORM_ACTION}/library/textformat.js"></script>
8 <script type=
"text/javascript" src=
"{$FORM_ACTION}/library/dynarch_calendar.js"></script>
9 {php} include_once(
"{$GLOBALS['srcdir']}/dynarch_calendar_en.inc.php"); {/php}
10 <script type=
"text/javascript" src=
"{$FORM_ACTION}/library/dynarch_calendar_setup.js"></script>
12 <script type=
"text/javascript">
13 var mypcc
= '{php} echo $GLOBALS['phone_country_code
'] {/php}';
15 // Only load jquery if not already closing. This page serves two purposes now,
16 // for entring of vitals and for graphing/trending previous vitals by being embedded
17 // in the interface/patient_file/encounter/trend_form.php page.
18 if (typeof jQuery
== 'undefined') {
19 document
.write("<script type='text/javascript' src='{/literal}{php}echo $GLOBALS['webroot'];{/php}{literal}/library/js/jquery.js'><\/script>")
22 <style type=
"text/css" title=
"mystyles" media=
"all">
28 border-right:
1px solid black;
33 border-right:
1px solid black;
35 background-color: #ccc;
39 background-color: #ccc;
42 background-color: #ccc;
43 border-bottom:
1px solid #ddd;
44 border-right:
1px solid #ddd;
48 border-collapse: collapse;
64 <body bgcolor=
"{$STYLE.BGCOLOR2}">
65 <p><table><tr><td><span class=
"title">{xl
t=
"Vitals"}
</span></td><td> <a href=
"../summary/demographics.php" class=
"readonly css_button_small" onclick=
"top.restoreSession()"> <span>{xl
t=
"View Patient"}
</span></a></td></tr></table></p>
66 <form name=
"vitals" method=
"post" action=
"{$FORM_ACTION}/interface/forms/vitals/save.php" onSubmit=
"return top.restoreSession()">
67 <div id=
"chart"></div>
69 <tr><th align=
"left">{xl
t=
"Name"}
</th><th align=
"left">{xl
t=
"Unit"}
</th>
70 <th class='currentvalues' title='{xl t='Date and time of this observation'}'
>
71 <input type='text' size='
14' name='date' id='date'
72 value='{$vitals-
>get_date()|date_format:
"%Y-%m-%d %H:%M"}'
73 onkeyup='datekeyup(this,mypcc,true)' onblur='dateblur(this,mypcc,true)'
/>
74 <img src='{$FORM_ACTION}/interface/pic/show_calendar.gif' id='img_date' align='absbottom'
75 width='
24' height='
22' border='
0' alt='[?]' style='cursor:pointer'
/>
77 {foreach item=result from=$results}
78 <th class='historicalvalues'
>{$result.date|date_format:
"%Y-%m-%d %H:%M"}
</th>
81 {if $units_of_measurement ==
4}
<tr class=
"hide">{else}
<tr>{/if}
82 {if $units_of_measurement ==
2}
<td class=
"unfocus graph" id=
"weight">{else}
<td class=
"graph" id=
"weight">{/if}{xl
t=
"Weight"}
</td>
83 {if $units_of_measurement ==
2}
<td class=
"unfocus">{else}
<td>{/if}{xl
t=
"lbs"}
</td>
84 {if $units_of_measurement ==
2}
<td class=
"valuesunfocus">{else}
<td class='currentvalues'
>{/if}
85 <input type=
"text" size='
5' name='weight' id='weight_input'
value=
"{if $vitals->get_weight() != 0}{$vitals->get_weight()}{/if}" onChange=
"convLbtoKg('weight_input');" title='{xl
t=
"Decimal pounds or pounds and ounces separated by #(e.g. 5#4)"}'
/>
87 {foreach item=result from=$results}
88 <td class='historicalvalues'
>{$vitals-
>display_weight($result.weight)}
</td>
91 {if $units_of_measurement ==
3}
<tr class=
"hide">{else}
<tr>{/if}
92 {if $units_of_measurement ==
1}
<td class=
"unfocus graph" id=
"weight_metric">{else}
<td class=
"graph" id=
"weight_metric">{/if}{xl
t=
"Weight"}
</td>
93 {if $units_of_measurement ==
1}
<td class=
"unfocus">{else}
<td>{/if}{xl
t=
"kg"}
</td>
94 {if $units_of_measurement ==
1}
<td class=
"valuesunfocus">{else}
<td class='currentvalues'
>{/if}
95 <input type=
"text" size='
5' id='weight_input_metric'
value=
"{if $vitals->get_weight() != 0}{math equation="number * constant
" number=$vitals->get_weight() constant=0.45359237 format="%
.2f
"}{/if}" onChange=
"convKgtoLb('weight_input');"/>
97 {foreach item=result from=$results}
98 <td class='historicalvalues'
>{if $result.weight !=
0}{math
equation=
"number * constant" number=$result.weight constant=
0.45359237 format=
"%.2f"}{/if}
</td>
101 {if $units_of_measurement ==
4}
<tr class=
"hide">{else}
<tr>{/if}
102 {if $units_of_measurement ==
2}
<td class=
"unfocus graph" id=
"height">{else}
<td class=
"graph" id=
"height">{/if}{xl
t=
"Height"}
</td>
103 {if $units_of_measurement ==
2}
<td class=
"unfocus">{else}
<td>{/if}{xl
t=
"in"}
</td>
104 {if $units_of_measurement ==
2}
<td class=
"valuesunfocus">{else}
<td class='currentvalues'
>{/if}
105 <input type=
"text" size='
5' name='height' id='height_input'
value=
"{if $vitals->get_height() != 0}{$vitals->get_height()}{/if}" onChange=
"convIntoCm('height_input');"/>
107 {foreach item=result from=$results}
108 <td class='historicalvalues'
>{if $result.height !=
0}{$result.height}{/if}
</td>
111 {if $units_of_measurement ==
3}
<tr class=
"hide">{else}
<tr>{/if}
112 {if $units_of_measurement ==
1}
<td class=
"unfocus graph" id=
"height_metric">{else}
<td class=
"graph" id=
"height_metric">{/if}{xl
t=
"Height"}
</td>
113 {if $units_of_measurement ==
1}
<td class=
"unfocus">{else}
<td>{/if}{xl
t=
"cm"}
</td>
114 {if $units_of_measurement ==
1}
<td class=
"valuesunfocus">{else}
<td class='currentvalues'
>{/if}
115 <input type=
"text" size='
5' id='height_input_metric'
value=
"{if $vitals->get_height() != 0}{math equation="number * constant
" number=$vitals->get_height() constant=2.54 format="%
.2f
"}{/if}" onChange=
"convCmtoIn('height_input');"/>
117 {foreach item=result from=$results}
118 <td class='historicalvalues'
>{if $result.height !=
0}{math
equation=
"number * constant" number=$result.height constant=
2.54 format=
"%.2f"}{/if}
</td>
121 <tr><td class=
"graph" id=
"bps">{xl
t=
"BP Systolic"}
</td><td>{xl
t=
"mmHg"}
</td>
122 <td class='currentvalues'
><input type=
"text" size='
5'
123 name='bps' id='bps_input'
value=
"{$vitals->get_bps()}"/></td>
124 {foreach item=result from=$results}
125 <td class='historicalvalues'
>{$result.bps}
</td>
128 <tr><td class=
"graph" id=
"bpd">{xl
t=
"BP Diastolic"}
</td><td>{xl
t=
"mmHg"}
</td>
129 <td class='currentvalues'
><input type=
"text" size='
5'
130 name='bpd' id='bpd_input'
value=
"{$vitals->get_bpd()}"/></td>
131 {foreach item=result from=$results}
132 <td class='historicalvalues'
>{$result.bpd}
</td>
135 <tr><td class=
"graph" id=
"pulse">{xl
t=
"Pulse"}
</td><td>{xl
t=
"per min"}
</td>
136 <td class='currentvalues'
><input type=
"text" size='
5'
137 name='pulse' id='pulse_input'
value=
"{if $vitals->get_pulse() != 0}{$vitals->get_pulse()|string_format:"%
.0f
"}{/if}"/></td>
138 {foreach item=result from=$results}
139 <td class='historicalvalues'
>{if $result.pulse !=
0}{$result.pulse|string_format:
"%.0f"}{/if}
</td>
142 <tr><td class=
"graph" id=
"respiration">{xl
t=
"Respiration"}
</td><td>{xl
t=
"per min"}
</td>
143 <td class='currentvalues'
><input type=
"text" size='
5'
144 name='respiration' id='respiration_input'
value=
"{if $vitals->get_respiration() != 0}{$vitals->get_respiration()|string_format:"%
.0f
"}{/if}"/></td>
145 {foreach item=result from=$results}
146 <td class='historicalvalues'
>{if $result.respiration !=
0}{$result.respiration|string_format:
"%.0f"}{/if}
</td>
149 {if $units_of_measurement ==
4}
<tr class=
"hide">{else}
<tr>{/if}
150 {if $units_of_measurement ==
2}
<td class=
"unfocus graph" id=
"temperature">{else}
<td class=
"graph" id=
"temperature">{/if}{xl
t=
"Temperature"}
</td>
151 {if $units_of_measurement ==
2}
<td class=
"unfocus">{else}
<td>{/if}{xl
t=
"F"}
</td>
152 {if $units_of_measurement ==
2}
<td class=
"valuesunfocus">{else}
<td class='currentvalues'
>{/if}
153 <input type=
"text" size='
5' name='temperature' id='temperature_input'
value=
"{if $vitals->get_temperature() != 0}{$vitals->get_temperature()}{/if}" onChange=
"convFtoC('temperature_input');"/>
155 {foreach item=result from=$results}
156 <td class='historicalvalues'
>{if $result.temperature !=
0}{$result.temperature}{/if}
</td>
159 {if $units_of_measurement ==
3}
<tr class=
"hide">{else}
<tr>{/if}
160 {if $units_of_measurement ==
1}
<td class=
"unfocus graph" id=
"temperature_metric">{else}
<td class=
"graph" id=
"temperature_metric">{/if}{xl
t=
"Temperature"}
</td>
161 {if $units_of_measurement ==
1}
<td class=
"unfocus">{else}
<td>{/if}{xl
t=
"C"}
</td>
162 {if $units_of_measurement ==
1}
<td class=
"valuesunfocus">{else}
<td class='currentvalues'
>{/if}
163 <input type=
"text" size='
5' id='temperature_input_metric'
value=
"{if $vitals->get_temperature() != 0}{math equation="(number - constant2 ) * constant
" number=$vitals->get_temperature() constant=0.5556 constant2=32 format="%
.2f
"}{/if}" onChange=
"convCtoF('temperature_input');"/>
165 {foreach item=result from=$results}
166 <td class='historicalvalues'
>{if $result.temperature !=
0}{math
equation=
"(number - constant2 ) * constant" number=$result.temperature constant=
0.5556 constant2=
32 format=
"%.2f"}{/if}
</td>
169 <tr><td>{xl
t=
"Temp Location"}
<td></td></td>
170 <td class='currentvalues'
><select name=
"temp_method" id='temp_method'
/><option value=
""> </option>
171 <option value=
"Oral" {if $vitals-
>get_temp_method() ==
"Oral" || $vitals-
>get_temp_method() ==
2 } selected{/if}
>{xl
t=
"Oral"}
172 <option value=
"Tympanic Membrane" {if $vitals-
>get_temp_method() ==
"Tympanic Membrane" || $vitals-
>get_temp_method() ==
1 } selected{/if}
>{xl
t=
"Tympanic Membrane"}
173 <option value=
"Rectal" {if $vitals-
>get_temp_method() ==
"Rectal" || $vitals-
>get_temp_method() ==
3 } selected{/if}
>{xl
t=
"Rectal"}
174 <option value=
"Axillary" {if $vitals-
>get_temp_method() ==
"Axillary" || $vitals-
>get_temp_method() ==
4 } selected{/if}
>{xl
t=
"Axillary"}
175 <option value=
"Temporal Artery" {if $vitals-
>get_temp_method() ==
"Temporal Artery" } selected{/if}
>{xl
t=
"Temporal Artery"}
177 {foreach item=result from=$results}
178 <td class='historicalvalues'
>{if $result.temp_method}{xl t=$result.temp_method}{/if}
</td>
181 <tr><td class=
"graph" id=
"oxygen_saturation">{xl
t=
"Oxygen Saturation"}
</td><td>{xl
t=
"%"}
</td>
182 <td class='currentvalues'
><input type=
"text" size='
5'
183 name='oxygen_saturation' id='oxygen_saturation_input'
value=
"{if $vitals->get_oxygen_saturation() != 0}{$vitals->get_oxygen_saturation()|string_format:"%
.0f
"}{/if}"/></td>
184 {foreach item=result from=$results}
185 <td class='historicalvalues'
>{if $result.oxygen_saturation !=
0}{$result.oxygen_saturation|string_format:
"%.0f"}{/if}
</td>
188 {if $units_of_measurement ==
4 || $gbl_vitals_options
> 0}
<tr class=
"hide">{else}
<tr>{/if}
189 {if $units_of_measurement ==
2}
<td class=
"unfocus graph" id=
"head_circ">{else}
<td class=
"graph" id=
"head_circ">{/if}{xl
t=
"Head Circumference"}
</td>
190 {if $units_of_measurement ==
2}
<td class=
"unfocus">{else}
<td>{/if}{xl
t=
"in"}
</td>
191 {if $units_of_measurement ==
2}
<td class=
"valuesunfocus">{else}
<td class='currentvalues'
>{/if}
192 <input type=
"text" size='
5' name='head_circ' id='head_circ_input'
value=
"{if $vitals->get_head_circ() != 0}{$vitals->get_head_circ()}{/if}" onChange=
"convIntoCm('head_circ_input');"/>
194 {foreach item=result from=$results}
195 <td class='historicalvalues'
>{if $result.head_circ !=
0}{$result.head_circ}{/if}
</td>
198 {if $units_of_measurement ==
3 || $gbl_vitals_options
> 0}
<tr class=
"hide">{else}
<tr>{/if}
199 {if $units_of_measurement ==
1}
<td class=
"unfocus graph" id=
"head_circ_metric">{else}
<td class=
"graph" id=
"head_circ_metric">{/if}{xl
t=
"Head Circumference"}
</td>
200 {if $units_of_measurement ==
1}
<td class=
"unfocus">{else}
<td>{/if}{xl
t=
"cm"}
</td>
201 {if $units_of_measurement ==
1}
<td class=
"valuesunfocus">{else}
<td class='currentvalues'
>{/if}
202 <input type=
"text" size='
5' id='head_circ_input_metric'
value=
"{if $vitals->get_head_circ() != 0}{math equation="number * constant
" number=$vitals->get_head_circ() constant=2.54 format="%
.2f
"}{/if}" onChange=
"convCmtoIn('head_circ_input');"/>
204 {foreach item=result from=$results}
205 <td class='historicalvalues'
>{if $result.head_circ !=
0}{math
equation=
"number * constant" number=$result.head_circ constant=
2.54 format=
"%.2f"}{/if}
</td>
208 {if $units_of_measurement ==
4 || $gbl_vitals_options
> 0}
<tr class=
"hide">{else}
<tr>{/if}
209 {if $units_of_measurement ==
2}
<td class=
"unfocus graph" id=
"waist_circ">{else}
<td class=
"graph" id=
"waist_circ">{/if}{xl
t=
"Waist Circumference"}
</td>
210 {if $units_of_measurement ==
2}
<td class=
"unfocus">{else}
<td>{/if}{xl
t=
"in"}
</td>
211 {if $units_of_measurement ==
2}
<td class=
"valuesunfocus">{else}
<td class='currentvalues'
>{/if}
212 <input type=
"text" size='
5' name='waist_circ' id='waist_circ_input'
value=
"{if $vitals->get_waist_circ() != 0}{$vitals->get_waist_circ()}{/if}" onChange=
"convIntoCm('waist_circ_input');"/>
214 {foreach item=result from=$results}
215 <td class='historicalvalues'
>{if $result.waist_circ !=
0}{$result.waist_circ}{/if}
</td>
218 {if $units_of_measurement ==
3 || $gbl_vitals_options
> 0}
<tr class=
"hide">{else}
<tr>{/if}
219 {if $units_of_measurement ==
1}
<td class=
"unfocus graph" id=
"waist_circ_metric">{else}
<td class=
"graph" id=
"waist_circ_metric">{/if}{xl
t=
"Waist Circumference"}
</td>
220 {if $units_of_measurement ==
1}
<td class=
"unfocus">{else}
<td>{/if}{xl
t=
"cm"}
</td>
221 {if $units_of_measurement ==
1}
<td class=
"valuesunfocus">{else}
<td class='currentvalues'
>{/if}
222 <input type=
"text" size='
5' id='waist_circ_input_metric'
value=
"{if $vitals->get_waist_circ() != 0}{math equation="number * constant
" number=$vitals->get_waist_circ() constant=2.54 format="%
.2f
"}{/if}" onChange=
"convCmtoIn('waist_circ_input');"/>
224 {foreach item=result from=$results}
225 <td class='historicalvalues'
>{if $result.waist_circ !=
0}{math
equation=
"number * constant" number=$result.waist_circ constant=
2.54 format=
"%.2f"}{/if}
</td>
228 <tr><td class=
"graph" id=
"BMI">{xl
t=
"BMI"}
</td><td>{xl
t=
"kg/m^2"}
</td>
229 <td class='currentvalues'
><input type=
"text" size='
5'
230 name='BMI' id='BMI_input'
value=
"{if $vitals->get_BMI() != 0}{$vitals->get_BMI()|substr:0:5}{/if}"/></td>
231 {foreach item=result from=$results}
232 <td class='historicalvalues'
>{if $result.BMI !=
0}{$result.BMI|substr:
0:
5}{/if}
</td>
235 <tr><td>{xl
t=
"BMI Status"}
</td><td>{xl
t=
"Type"}
</td>
236 <td class='currentvalues'
><input type=
"text" size='
15'
237 name=
"BMI_status" id=
"BMI_status' value="{$vitals-
>get_BMI_status()}
"/></td>
238 {foreach item=result from=$results}
239 <td class='historicalvalues'>{if $result.BMI_status}{xl t=$result.BMI_status}{/if}</td>
243 <tr><td>{xl t="Other Notes
"}<td></td></td>
244 <td class='currentvalues'><input type="text
" size='20'
245 name="note
" id='note' value="{$vitals-
>get_note()}
" /></td>
246 {foreach item=result from=$results}
247 <td class='historicalvalues'>{$result.note}</td>
251 <td colspan='3' style='text-align:center'>
252 {if $patient_age <= 20 || (preg_match('/month/', $patient_age))}
253 <!-- only show growth-chart button for patients < 20 years old -->
254 <!-- <input type="button
" id="growthchart
" value="{xl
t=
"Growth-Chart"}
" style='margin-left: 20px;'> -->
255 <input type="button
" id="pdfchart
" value="{xl
t=
"Growth-Chart"} ({xl
t=
"PDF"})
" style='margin-left: 20px;'>
256 <input type="button
" id="htmlchart
" value="{xl
t=
"Growth-Chart"} ({xl
t=
"HTML"})
" style='margin-left: 20px;'>
261 <tr><td colspan='3' style='text-align:center'> </td></tr>
263 <td colspan='3' style='text-align:center'>
264 <input type="submit
" class="editonly
" name="Submit
" value="{xl
t=
"Save Form"}
">
265 <input type="button
" class="editonly
" id="cancel
" value="{xl
t=
"Don't Save"}
">
270 <input type="hidden
" name="id
" id='id' value="{$vitals-
>get_id()}
" />
271 <input type="hidden
" name="activity
" id='activity' value="{$vitals-
>get_activity()}
">
272 <input type="hidden
" name="pid
" id='pid' value="{$vitals-
>get_pid()}
">
273 <input type="hidden
" name="process
" id='process' value="true
">
277 <script language="javascript
">
278 var formdate = '{$vitals->get_date()|date_format:"%Y
%m
%d
"}';
279 // vitals array elements are in the format:
280 // date-height-weight-head_circumference
281 var vitals = new Array();
282 // get values from the current form elements
283 vitals[0] = formdate+'-{$vitals->get_height()}-{$vitals->get_weight()}-{$vitals->get_head_circ()}';
285 {foreach item=result from=$results}
286 vitals[vitals.length] = '{$result.date|date_format:"%Y
%m
%d
"}-{$result.height}-{$result.weight}-{$result.head_circ}';
288 var patientAge='{$patient_age}';
289 var patient_dob='{$patient_dob}';
290 var webroot = '{$FORM_ACTION}';
291 var pid = '{$vitals->get_pid()}';
292 var cancellink = '{$DONT_SAVE_LINK}';
293 var birth_xl='{xl t="Birth
-24 months
"}'
294 var older_xl='{xl t="2-20 years
"}';
296 function addGCSelector()
298 var options=new Array();
299 var birth={'display':birth_xl,'param':'birth'};
300 var age2={'display':older_xl,'param':'2-20'}
301 if((patientAge.indexOf('24 month')>=0) || (patientAge.indexOf('month')==-1))
303 var dob_data=patient_dob.split("-");
304 var dob_date=new Date(dob_data[0],parseInt(dob_data[1])-1,dob_data[2]);
306 for(var idx=0;idx<vitals.length;idx++)
308 var str_data_date=vitals[idx].split("-")[0];
309 var data_date=new Date(str_data_date.substr(0,4),parseInt(str_data_date.substr(4,2))-1,str_data_date.substr(6,2));
310 if(((data_date-dob_date)/86400000)<=2*365)
321 var chart_buttons_cell=$("#pdfchart
").parent("td
");
322 var select=$("<select id
='chart_type'></select
>");
323 chart_buttons_cell.prepend(select);
324 for(idx=0;idx<options.length;idx++)
326 var option=$("<option value
='"+options[idx].param+"'>"+options[idx].display+"</option
>");
327 select.append(option);
329 select.find("option
:first
").attr("selected
","true");
332 select.css("display
","none
");
336 $(document).ready(function(){
337 $("#growthchart
").click(function() { ShowGrowthchart(); });
338 $("#pdfchart
").click(function() { ShowGrowthchart(1); });
339 $("#htmlchart
").click(function() { ShowGrowthchart(2); });
340 $("#cancel
").click(function() { location.href=cancellink; });
344 function ShowGrowthchart(doPDF) {
345 // get values from the current form elements
347 vitals[0] = formdate+'-'+$("#height_input
").val()+'-'+$("#weight_input
").val()+'-'+$("#head_circ_input
").val();
349 // build the data string
351 for(var i=0; i<vitals.length; i++) {
352 datastring += vitals[i]+"~";
354 newURL = webroot+'/interface/forms/vitals/growthchart/chart.php?pid='+pid+'&data='+datastring;
355 if (doPDF == 1) newURL += "&pdf
=1";
356 if (doPDF == 2) newURL += "&html
=1";
357 newURL+="&chart_type
="+$("#chart_type
").val();
358 // do the new window stuff
359 top.restoreSession();
360 window.open(newURL, '_blank', "menubar
=1,toolbar
=1,scrollbars
=1,resizable
=1,width
=600,height
=450");
363 function convLbtoKg(name) {
364 var lb = $("#"+name).val();
365 var hash_loc=lb.indexOf("#");
368 var pounds=lb.substr(0,hash_loc);
369 var ounces=lb.substr(hash_loc+1);
370 var num=parseInt(pounds)+parseInt(ounces)/16;
375 $("#"+name+"_metric
").val("0");
377 else if (lb == parseFloat(lb)) {
380 $("#"+name+"_metric
").val(kg);
383 $("#"+name+"_metric
").val("");
386 if (name == "weight
") {
391 function convKgtoLb(name) {
392 var kg = $("#"+name+"_metric
").val();
395 $("#"+name).val("0");
397 else if (kg == parseFloat(kg)) {
406 if (name == "weight_input
") {
411 function convIntoCm(name) {
412 var inch = $("#"+name).val();
415 $("#"+name+"_metric
").val("0");
417 else if (inch == parseFloat(inch)) {
420 $("#"+name+"_metric
").val(cm);
423 $("#"+name+"_metric
").val("");
426 if (name == "height_input
") {
431 function convCmtoIn(name) {
432 var cm = $("#"+name+"_metric
").val();
435 $("#"+name).val("0");
437 else if (cm == parseFloat(cm)) {
439 inch = inch.toFixed(2);
440 $("#"+name).val(inch);
446 if (name == "height_input
") {
451 function convFtoC(name) {
452 var Fdeg = $("#"+name).val();
454 $("#"+name+"_metric
").val("0");
456 else if (Fdeg == parseFloat(Fdeg)) {
457 Cdeg = (Fdeg-32)*0.5556;
458 Cdeg = Cdeg.toFixed(2);
459 $("#"+name+"_metric
").val(Cdeg);
462 $("#"+name+"_metric
").val("");
466 function convCtoF(name) {
467 var Cdeg = $("#"+name+"_metric
").val();
469 $("#"+name).val("0");
471 else if (Cdeg == parseFloat(Cdeg)) {
472 Fdeg = (Cdeg/0.5556)+32;
473 Fdeg = Fdeg.toFixed(2);
474 $("#"+name).val(Fdeg);
481 function calculateBMI() {
483 var height = $("#height_input
").val();
484 var weight = $("#weight_input
").val();
485 if(height == 0 || weight == 0) {
488 else if((height == parseFloat(height)) && (weight == parseFloat(weight))) {
489 bmi = weight/height/height*703;
490 bmi = bmi.toFixed(1);
491 $("#BMI_input
").val(bmi);
494 $("#BMI_input
").val("");
498 Calendar.setup({inputField:"date
", ifFormat:"%Y
-%m
-%d
%H
:%M
", button:"img_date
", showsTime:true});