//- IfEnterAction -// function IfEnterAction(oEvent, oForm, cAction, cSelId){ if ((EventKeyCode(oEvent) == 13) || (EventKeyCode(oEvent) == 3)) { oForm.Action.value = cAction; oForm.SelId.value = cSelId; oForm.submit(); return false; } return true; } //- IfEnterScript -// function IfEnterScript(oEvent, cScript) { if ((EventKeyCode(oEvent) == 13) || (EventKeyCode(oEvent) == 3)) { eval(cScript); return false; } return true; } //- EventKeyCode -// function EventKeyCode(oEvent) { return ((oEvent != null) && (oEvent.which != null) ? oEvent.which : event.keyCode); } //- ExportZip -// function ExportZip(cStream) { var cZip = cStream.replace(/\?/g, ''); return cZip; } //- ExportFon -// function ExportFon(cStream) { var cFon = ''; if (cStream.length >= 10) { cFon = cStream.substr(0, 3) + '-' + cStream.substr(3, 3) + '-' + cStream.substr(6, 4) if ((cStream.length == 15) && (cStream.substr(10, 5) != '?????')) { cFon += ' x' + cStream.substr(10, 5).replace('?', '') } } return cFon; } //- Console_AddRemove -// function Console_AddRemove(oFromSet, oToSet, bIsAll) { //+ unselect for (var hOption = 0; hOption < oToSet.length; hOption++) { oToSet.options[hOption].selected = false; } //+ move for (hOption = oFromSet.length; hOption != 0; hOption--) { if ((bIsAll == true) || (oFromSet.options[hOption - 1].selected == true)) { oToSet.options[oToSet.length] = new Option(oFromSet.options[hOption - 1].text, oFromSet.options[hOption - 1].value, false, true); oFromSet.options[hOption - 1] = null; } } } //- Console_Pack -// function Console_Pack(oSet, oField) { var cPack = ''; for (var hOption = 0; hOption < oSet.length; hOption++) { cPack += ',' + oSet.options[hOption].value; } oField.value = cPack.substring(1); } function PNGTransparent(cId, cClass) { var arVersion = navigator.appVersion.split("MSIE"); var version = parseFloat(arVersion[1]); if ((version >=5.5) && (version <7.0)) { document.getElementById(cId).className = cClass; } } //- CopyPatientInfoToReporting -// function CopyPatientInfoToReporting(oForm) { oForm['Reporter_FirstName'].value = oForm.FirstName.value; oForm['Reporter_LastName'].value = oForm.LastName.value; oForm['Reporter_Street'].value = oForm.Street.value; oForm['Reporter_Street2'].value = oForm.Street2.value; oForm['Reporter_City'].value = oForm.City.value; var cState = oForm.State.value; var o = oForm['Reporter_State']; for (var h = 0; h < o.options.length; h++) { if (o.options[h].value == cState) { oForm['Reporter_State'].selectedIndex = h; } } oForm['Reporter_Zip'].value = ExportZip(oForm.Zip.value); //oForm['Reporter_Phone'].value = ExportFon(oForm.Phone.value); oForm['Reporter_Phone'].value = oForm.Phone.value; } //- CopyPatientInfoToInsurance -// function CopyPatientInfoToInsurance(oForm, nKey) { if (nKey >= 2) { oForm['PolicyHolderName' + nKey].value = oForm.PatientFirstName.value + ' ' + oForm.PatientLastName.value; oForm['PolicyHolderBirthDate' + nKey].value = oForm.PatientBirthDate.value; oForm['PolicyHolderGender' + nKey].value = oForm.PatientGender.value; oForm['PolicyHolderEmploymentStatus' + nKey].value = oForm.PatientEmploymentStatus.value; oForm['PolicyHolderEmployer' + nKey].value = oForm.PatientEmployer.value; } else { if (nKey == -1) { oForm['PolicyHolderName'].value = ''; oForm['PolicyHolderBirthDate'].value = ''; oForm['PolicyHolderGender'].value = ''; oForm['PolicyHolderEmploymentStatus'].value = ''; oForm['PolicyHolderEmployer'].value = ''; } if (nKey == -2) { oForm['PolicyHolderName2'].value = ''; oForm['PolicyHolderBirthDate2'].value = ''; oForm['PolicyHolderGender2'].value = ''; oForm['PolicyHolderEmploymentStatus2'].value = ''; oForm['PolicyHolderEmployer2'].value = ''; } if (nKey == 1) { oForm['PolicyHolderName'].value = oForm.PatientFirstName.value + ' ' + oForm.PatientLastName.value; oForm['PolicyHolderBirthDate'].value = oForm.PatientBirthDate.value; oForm['PolicyHolderGender'].value = oForm.PatientGender.value; oForm['PolicyHolderEmploymentStatus'].value = oForm.PatientEmploymentStatus.value; oForm['PolicyHolderEmployer'].value = oForm.PatientEmployer.value; } } } //- CopyPatientInfoToGuarantor -// function CopyPatientInfoToGuarantor(oForm) { oForm['GuarantorStreet'].value = oForm.PatientStreet.value; oForm['GuarantorStreet2'].value = oForm.PatientStreet2.value; oForm['GuarantorCity'].value = oForm.PatientCity.value; var cState = oForm.PatientState.value; var o = oForm['GuarantorState']; for (var h = 0; h < o.options.length; h++) { if (o.options[h].value == cState) { oForm['GuarantorState'].selectedIndex = h; } } oForm['GuarantorCountry'].value = oForm.PatientCountry.value; oForm['GuarantorZip'].value = ExportZip(oForm.PatientZip.value); oForm['GuarantorPhone'].value = ExportFon(oForm.PatientPhone.value); oForm['GuarantorWorkPhone'].value = ExportFon(oForm.PatientWorkPhone.value); } //- CopyPatientInfoToPolicyHolder -// function CopyPatientInfoToPolicyHolder(oForm) { oForm['EmployerStreet'].value = oForm.PatientStreet.value; oForm['EmployerStreet2'].value = oForm.PatientStreet2.value; oForm['EmployerCity'].value = oForm.PatientCity.value; var cState = oForm.PatientState.value; var o = oForm['EmployerState']; for (var h = 0; h < o.options.length; h++) { if (o.options[h].value == cState) { oForm['EmployerState'].selectedIndex = h; } } oForm['EmployerZip'].value = ExportZip(oForm.PatientZip.value); oForm['EmployerPhone'].value = ExportFon(oForm.PatientPhone.value); } //- ShowRow -// function ShowRow(cKey, bIsShow) { var cRowStyleType = 'table-row'; if (navigator.appName == 'Microsoft Internet Explorer') { cRowStyleType = 'block'; } if (bIsShow == true) { document.getElementById(cKey).style.display = cRowStyleType; } else { document.getElementById(cKey).style.display = 'none'; } } //- Adam Content Navigation -// var g_nCurrentDivIndex = 1; function NavigationNext(nTotal) { var nNextIndex = 0; if (g_nCurrentDivIndex == nTotal) { nNextIndex = nTotal; }else { nNextIndex = (g_nCurrentDivIndex + 1); } NavigationButton(nNextIndex, nTotal); } function NavigationBack(nTotal) { var nBackIndex = 0; if (g_nCurrentDivIndex == 1) { nBackIndex = 1; }else { nBackIndex = (g_nCurrentDivIndex - 1); } NavigationButton(nBackIndex, nTotal); } function NavigationButton(nIndex, nTotal) { g_nCurrentDivIndex = nIndex; var cRowStyleType = 'table-row'; if (navigator.appName == 'Microsoft Internet Explorer') { cRowStyleType = 'block'; } if (g_nCurrentDivIndex == 1) { document.getElementById('AdamContentBackButton').style.display = 'none'; document.getElementById('AdamContentNextButton').style.display = cRowStyleType; } if (g_nCurrentDivIndex == nTotal) { document.getElementById('AdamContentBackButton').style.display = cRowStyleType; document.getElementById('AdamContentNextButton').style.display = 'none'; } if ((g_nCurrentDivIndex > 1) && (g_nCurrentDivIndex < nTotal)) { document.getElementById('AdamContentBackButton').style.display = cRowStyleType; document.getElementById('AdamContentNextButton').style.display = cRowStyleType; } for (n = 1; n <= nTotal; n++) { var oImage = document.getElementById('AdamContentImageButton' + n); if (n == g_nCurrentDivIndex) { oImage.src = oImage.src.replace(n + '.gif', n + "_on.gif"); document.getElementById('TextContentDiv_' + n).style.display = cRowStyleType; } else { oImage.src = oImage.src.replace(n + '_on.gif', n + ".gif"); document.getElementById('TextContentDiv_' + n).style.display = 'none'; } } }