var errors = new Array(); var errFields = new Array(); var prevErrFields = new Array(); var currentErr = ''; var ns4 = (document.layers) ? true : false ; var ie = (document.all) ? true : false ; var ns6 = (document.getElementById && ! document.all) ? true : false ; errors['full_cant_less_than_or_equal_zero'] = "# of Full Packages can not be less than or equal zero."; errors['full_or_partial_packages'] = "Must enter full or partial packages."; errors['inactive_prod_sel'] = "Problem with product entered, Contact Novartis Customer Service or try selecting another product."; errors['inactive_prod_sel_scanone'] = "Problem with Product or Package Count is zero - verify in SAP."; errors['no_prod_cnt_sel'] = "Enter package count for the full/partial pkgs"; errors['numberic_field'] = "Enter only numbers for full pkgs/partial pkgs/package Size"; errors['full_more_cnt'] = "Entering incorrect package size for # of full pkgs, please check the original product size"; errors['product_entry'] = "Please enter product information."; errors['parial_more_cnt'] = "Entering incorrect package size for # of partial pkgs, please check the original product size"; errors['parial_more_cnt1'] = "Partial package size cannot be equal to or greater than product package size."; errors['partial_not_1'] = "# of partial pkgs can not be greater than or less than 1"; errors['kit_dup_dea'] = "Enter your DEA# or Third Party DEA#, not both"; errors['full_partial'] = "Enter either # of partial pkgs or # of full pkgs, not both"; errors['no_prod_sel'] = "Pelase select product from the drop down list for # of pkgs entered"; errors['select_wholesaler'] = "Please select a Wholesaler or Distributor to receive a credit on your behalf"; errors['confirm_tp_dea'] = "Confirm On Behalf of DEA Name/Address"; errors['confirm_dea'] = "Confirm DEA Name/Address"; errors['tp_dea_number'] = "Enter your Third Party DEA number and click LookUp button to get DEA information"; errors['behalf_of_dea_number'] = "Enter On Behalf of DEA number and click LookUp button to get DEA information"; errors['blank_dea'] = "Enter your DEA# or Third Party DEA# and then click continue"; errors['VRAF_Invalid_LotExp_NotNull']= "Lot Expiration date should not be blank."; errors['VRAF_Invalid_LotExp_ReceiptDate']= "Enter a valid Lot Expiration date."; errors['CRAF_Invalid_LotExp_ReceiptDate']= "Enter a valid Expiration date."; errors['kit_submit_by_missing'] = "Enter your name in the Submitted By field"; errors['print_ra_Make_Selection']= "Enter a valid debit memo number or RA number."; errors['print_ra_Select_Only_One']= "Enter only debit memo number or RA number."; errors['VRAF_price_valid']= "Enter valid price."; errors['VRAF_price_zero']= "Price should be greater than zero."; errors['VRAF_price_numeric']= "Price should be a Numeric Value."; errors['VRAF_price_decimal']= "Price can not have more than 2 decimal places."; errors['VRAF_lotnumber']= "Lot Number has to be entered along with the Expiration Date."; errors['VRAF_return_for_nocredit']= "Price should be zero for the chosen Reason code - Return For No Credit."; errors['select_third_party_account']= "Select a third party account."; //Return Kit errors['select_raf'] = "No RAF is selected." errors['select_scanone_raf'] = "No Detail record selected for delete." errors['print_confirmation'] = "Starting form 222 Number cannot be blank." errors['print_formnumber'] = "Starting Form number is 1 more than the Last Form Number Printed." errors['search_form222'] = "Enter atleast one search criteria." errors['enter_to_222_number'] = "Enter To Form 222 Number." errors['enter_from_222_number'] = "Enter From 222 Number." errors['invalid_startingnumber'] = "Starting form 222 number must be greater than zero"; errors['invalid_startingnumber1']= "There are invalid character(s) in the Starting form 222 number."; //Scan One Suspended RAF errors['search_scanonedebit'] = "Enter at least one search criteria." errors['enter_from_date'] = "Enter From Date." errors['enter_to_date'] = "Enter To Date." errors['scanone_invalid_date']= "Enter a valid date."; errors['scanone_invalid_from_date']= "Enter a valid From date."; errors['scanone_invalid_to_date']= "Enter a valid To date."; errors['invalid_scanone_debitmemo']= "There are invalid character(s) in the Debit Memo field."; errors['invalid_scanone_custnum']= "There are invalid character(s) in the Customer Number field."; errors['invalid_scanone_custname']= "There are invalid character(s) in the Customer Name field."; errors['fromdate_futureDate']= "From date should not be future date."; errors['todate_futureDate']= "To date should not be future date."; errors['select_service']="Select a service"; errors['old_password']="Old password not entered"; errors['new_password']="Password should be greater than 6 & less than 10 characters"; errors['confirm_password']="Confirm password not entered"; errors['invalid_old_password']="Enter a valid old password"; errors['invalid_new_password']="Enter a valid new password"; errors['invalid_confirm_password']="Enter a valid confirmation password"; errors['check_con_new_password']="Confirm old password and new password are not the same"; errors['check_old_new_password']="Old and new password cannot be the same"; errors['first_char'] = "First character of User ID should be non numeric"; errors['user_id'] = "Enter at least 8 charecters for User ID"; errors['valid_user_id'] = "Enter a valid User ID"; errors['valid_pwd'] = "Please enter a valid password."; errors['xsector_name'] = "Enter a linked account name"; errors['xsector_name_first_char'] = "First character of linked account name should be non-numeric"; errors['search_field_error1'] = "The search field cannot have embedded blanks"; errors['search_field_error2'] = "Search field is missing or invalid"; errors['invalidEntry'] = "Invalid value entered"; errors['select_same_service']="Primary and secondary location cannot be the same"; errors['select_prim_location']="Select at least one primary location"; errors['select_consumerhealth_account']="Select at least one Consumer Health account"; errors['select_pharma_account']="Select at least one Pharmaceutical account"; errors['select_proper_service_loc']="Select a service & a location for the selected division"; errors['account_answer']="Enter the answer to the account specific question"; errors['first_name']="Enter a valid first name"; errors['last_name']="Enter a valid last name"; errors['division']="Enter a valid division"; errors['department']="Enter a valid department"; errors['zip_code']="Enter only numeric values for zip code"; errors['zip_code_value']="Enter a value for zip code"; errors['phone_number1']="Enter a three digit numeric value for the first field of the phone number"; errors['phone_number2']="Enter a three digit numeric value for the second field of the phone number"; errors['phone_number3']="Enter a four digit numeric value for the last field of the phone number"; errors['fax_number1']="Enter a three digit numeric value for the first field of the fax number"; errors['fax_number2']="Enter a three digit numeric value for the second field of the fax number"; errors['fax_number3']="Enter a four digit numeric value for the last field of the fax number"; errors['city']="Enter a valid city name"; errors['address1']="Enter a valid address in the Address1 field"; errors['address2']="Enter a valid address in the Address2 field"; errors['email_address']='Enter a valid email format (example: johndoe@mycompany.com )'; errors['mail_address']="Enter an email address"; errors['select_sector']="Select at least one division"; errors['end_date'] = "End date should not be blank"; errors['start_date'] = "Start date should not be blank"; errors['check_start_date']="Verify your start date"; errors['check_end_date']="Verify your end date"; errors['compare_date']="End date cannot be before start date"; errors['purchase_order']="Enter a numeric value for the purchase order number"; errors['invoice_number']="Enter a numeric value for the invoice number"; errors['search_criteria']="Select search criteria"; errors['blank_char'] = "User ID should not contain any blank characters"; errors['ip_address']="Enter a valid IP address"; errors['ip_number']="IP address should be numeric (example: 123.456.89.9 )."; errors['order_delete']="Select the order notification line(s) to delete"; errors['select_notification']="Select notification type"; errors['clozaril_zipcode_error1'] = "You cannot have embedded blanks in the Zip Code field."; errors['clozaril_dea_error1'] = "You cannot have embedded blanks in the DEA field."; errors['clozaril_dea_error2'] = "You have invalid character(s) in the DEA field."; errors['clozaril_pharmacy_error1'] = "You cannot have embedded blanks in the pharmacy selection field."; errors['clozaril_pharmacy_error2'] = "You have invalid character(s) in the pharmacy selection field."; errors['clozaril_selection_error'] = "You must select either a state, a zip code or a DEA number. No combinations are allowed."; errors['passwd_exp']="Enter a positive integer in the password expiration field"; errors['veri_que']="Enter a verification question"; errors['ip_veri']="Check if anyone utilizes IP level user verfication"; errors['sector_name']="Enter a division name"; errors['service_name']="Enter a service name"; errors['invalid_service_name']="Special character(s) are not allowed in the Service Description field."; errors['select_sec']="Select a sector"; errors['select_account']="Select an account"; errors['ent_account']="Enter a valid account name"; errors['ent_classification']="Enter a group classification or select a classification type"; errors['invalid_ent_classification']="Enter a valid group classification"; errors['product_family_NDC']="Enter an NDC or select a product family"; // //CH_ORDER_ENTRY ERROR MESSSAGES // errors['ch_order_qty']="Enter an order quantity between 1 and 999,999,999"; errors['ch_ponum']="Enter a PO Number, 1-25 Characters"; errors['reqship_dt_blank']="Enter a valid date (MM/DD/YYYY)"; errors['reqship_dt_notvalid']="Enter a date that is greater than 3 days from today's date"; //Chargeback Reconciliation Error Messages errors['CB_Recon_Make_Selection']= "Enter either a date range or debit memo number."; errors['CB_Recon_Select_Only_One']= "Enter either a date range or debit memo number, not both."; errors['CB_Recon_Invalid_From_Date']= "Enter a valid from date."; errors['CB_Recon_Invalid_To_Date']= "Enter a valid to date."; errors['CB_Recon_Invalid_Date_Range']= "The From date is greater than the To date."; errors['CB_Recon_Invalid_Debit_Memo']= "There are invalid character(s) in the debit memo field."; errors['CB_Recon_Invalid_Date_Request']= "You cannot request more than 1 years' worth of data."; errors['DM_Invalid_ReceiptDate_NotNull']= "Debit memo receipt date should not be blank."; errors['DM_Invalid_DebitMemo_ReceiptDate']= "Enter a valid debit memo receipt date."; errors['DM_DebitMemo_ReceiptDate_FutureDate']= "Debit memo receipt date should not be future date."; errors['DM_DebitMemo_ReceiptDate_NoOfDays']= "Debit memo receipt date should not be older than 60 days."; errors['DM_invalidEntry'] = "Invalid Debit Memo."; errors['DM_invalidEntry1'] = "Debit memo number is required."; errors['DM_invalidCartonCount'] = "Enter Number Of Cartons to Return."; errors['DM_invalidCartonCount1'] = "Number of cartons is invalid. Please enter numeric value."; errors['DM_invalidCartonCount2'] = "Cartons must be greater than zero"; errors['ICR_invalidEntry'] = "The invoice or credit memo entered is invalid."; errors['ICR_invalidChar'] = "There are invalid character(s) in the field."; errors['Invoice_Blank'] = "Enter a valid invoice Number Or Purchase Order Number"; errors['ReturnsRecon_Blank'] = "Enter a valid Debit Memo Number Or RGA Number"; errors['noerror']=" "; errors['select_subscriber']= "Select a subscriber."; errors['select_location']= "Select a location."; errors['select_userid']= "Select a user ID."; errors['select_subscription']= "Select a subscription."; errors['subscription_id']= "Enter a subscription ID."; errors['valid_subscription_id']= "Enter a valid subscription ID."; errors['subscription_desc']= "Enter a subscription description."; errors['valid_subscription_desc']= "Enter a valid subscription description."; errors['select_subscription_information']= "Select subscription information."; errors['no_subscription_information']= "No subscription information available."; errors['select_state']= "Select a state."; // PH Order Inquiry Errors. errors['po_invoice'] = "Enter either a Purchase Order number or a Novartis invoice number. Do not select both. "; errors['po_invalid'] = "Invalid starting purchase order number "; errors['ndc_invalid'] = "Invalid NDC number"; errors['start_greater'] = "Start Date is greater than current date"; errors['invalid_start_date'] = "Invalid start date"; errors['invalid_end_date'] = "Invalid end date "; errors['invoice_invalid'] = "Invalid Novartis invoice number"; errors['ndc_both'] = "Enter an NDC # in the text field or select one from the list." errors['answer_select'] = "Please answer at least one question." errors['old_password_not_correct'] = "Please check your old password ." errors['monthly_daily'] = "You must select at least one YES to receive daily changes report or to receive monthly report." function error(errkey) { for(var i = 0; i < arguments.length ; i++) { if(arguments[i] != null) { errFields[ i ] = (( arguments[i].id == null || arguments[i].id == '' ) ? arguments[i].name: arguments[i].id ); } } currentErr = errors[errkey]; writeOnTop( currentErr ); } function writeOnTop(msg) { if (ns4) rewriteLayer ("topMsgDiv", '