if(line+direc<1 || (line+direc)>document.all.tdt.length-1) return; var temp=document.ecform.medication[line].value; document.ecform.medication[line].value=document.ecform.medication[line+direc].value; document.ecform.medication[line+direc].value=temp
line+=direc; lightOn(line); } function delIt() { line=parseInt(event.srcElement.ln,10)
if (line>0) for (i=1;i<PLList.rows.length;i++) if (tdt[i].ln==line) { if ( document.ecform.medication[i].value.length>0 ) if (!confirm("Are you sure you want to delete this record?")) return PLList.deleteRow(i) } } function modifiedIt(field) { // field.value=checkText(field.value); modified=1 line=parseInt(event.srcElement.ln,10)
if (line>0) for (i=1;i<PLList.rows.length;i++) if (tdt[i].ln==line) document.ecform.edit[i].value=1 } function newHospitalVisit() { newRow=PLList.insertRow(PLList.rows.length); newRow.id="tdt"; newRow.ln=allCount; newRow.bgColor="#e0e0e0"; newRow.className="tableData"; newRow.onclick=lightOn;