function check_form() { var mainForm = $("form[name=maintab_form]"); if (mainForm.find("[name=p_pub_sub_type]").val() == "") { alert("You must select Publication Sub Type"); return false; } else { if (mainForm.find("[name=p_pub_type]").val() == "") { if ((mainForm.find("[name=p_pub_sub_type]").val() != "Thesis")&&(mainForm.find("[name=p_pub_sub_type]").val() != "Dissertation")) { alert("You must select Publication Type"); return false; } } var draftStatus; for (var i=0; i < maintab_form.p_snapshot_status.length; i++) { if (maintab_form.p_snapshot_status[i].checked) { draftStatus = maintab_form.p_snapshot_status[i].value; } } if (draftStatus == "S") { if (mainForm.find("[name=p_pub_sub_type]").val() == "JournalArticles") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_article_title]").val() == "") { alert("Article Title is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } if (mainForm.find("[name=p_journal_name]").val() == "") { alert("Journal Name is required"); return false; } if (mainForm.find("[name=p_page_number]").val() == "" && mainForm.find("[name=p_number_pages]").val() == "") { alert("Either Page Number(s) or Number of Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } if (mainForm.find("[name=p_journal_name]").val() == "") { alert("Journal Name is required"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } if (mainForm.find("[name=p_journal_name]").val() == "") { alert("Journal Name is required"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "ConferenceAndSymposiaProceedings") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } if (mainForm.find("[name=p_page_number]").val() == "" && mainForm.find("[name=p_number_pages]").val() == "") { alert("Either Page Number(s) or Number of Pages must be filled in"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published" || mainForm.find("[name=p_stage_of_pub]").val() == "InPreperation") { if (!isYear(maintab_form.p_year.value)) { alert("Year is an invalid year"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages must be filled in"); return false; } } if (mainForm.find("[name=p_title_of_proceeding]").val() == "") { alert("Title of Proceedings Paper is required"); return false; } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } if ((!isDate_MMDDYYYY(maintab_form.p_conference_date.value)) && mainForm.find("[name=p_conference_date]").val() != "") { alert("Conference/Metting Date is not a valid date"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status_part]").val() == "") { alert("Referee Status is required"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "EditedBooks") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } if (mainForm.find("[name=p_name_of_editor]").val() == "") { alert("Name of Editor is required"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } if (mainForm.find("[name=p_page_number]").val() == "" && mainForm.find("[name=p_number_pages]").val() == "") { alert("Either Page Number(s) or Number of Pages must be filled in"); return false; } /* if (mainForm.find("[name=p_editors_contribution]").val() == "") { alert("Editor's Contribution is required"); return false; }*/ } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } if (mainForm.find("[name=p_name_of_editor]").val() == "") { alert("Name of Editor is required"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } /* if (mainForm.find("[name=p_editors_contribution]").val() == "") { alert("Editor's Contribution is required"); return false; }*/ } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } if (mainForm.find("[name=p_name_of_editor]").val() == "") { alert("Name of Editor is required"); return false; } /* if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Either Number of Manuscript Pages must be filled in"); return false; }*/ if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } /* if (mainForm.find("[name=p_editors_contribution]").val() == "") { alert("Editor's Contribution is required"); return false; }*/ } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPreperation") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } /* if (mainForm.find("[name=p_editors_contribution]").val() == "") { alert("Editor's Contribution is required"); return false; }*/ if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "EditedSpecialIssuesJournals") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of Special Issue is required"); return false; } if (mainForm.find("[name=p_name_of_editor]").val() == "") { alert("Name of Editor is required"); return false; } if (mainForm.find("[name=p_journal_name]").val() == "") { alert("Journal Name is required"); return false; } if (mainForm.find("[name=p_page_number]").val() == "" && mainForm.find("[name=p_number_pages]").val() == "") { alert("Either Page Number(s) or Number of Pages must be filled in"); return false; } if (mainForm.find("[name=p_editors_contribution]").val() == "") { alert("Editor's Contribution is required"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of Special Issue is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } if (mainForm.find("[name=p_name_of_editor]").val() == "") { alert("Name of Editor is required"); return false; } if (mainForm.find("[name=p_journal_name]").val() == "") { alert("Journal Name is required"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } if (mainForm.find("[name=p_editors_contribution]").val() == "") { alert("Editor's Contribution is required"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of Special Issue is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } if (mainForm.find("[name=p_name_of_editor]").val() == "") { alert("Name of Editor is required"); return false; } if (mainForm.find("[name=p_journal_name]").val() == "") { alert("Journal Name is required"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages must be filled in"); return false; } if (mainForm.find("[name=p_editors_contribution]").val() == "") { alert("Editor's Contribution is required"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPreperation") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of Special Issue is required"); return false; } /* if (mainForm.find("[name=p_editors_contribution]").val() == "") { alert("Editor's Contribution is required"); return false; }*/ if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "Books") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation" && mainForm.find("[name=p_stage_of_pub]").val() != "Published") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } if (mainForm.find("[name=p_page_number]").val() == "" && mainForm.find("[name=p_number_pages]").val() == "") { alert("Either Page Number(s) or Number of Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages must be filled in"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPreperation") { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "Textbooks") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } if (mainForm.find("[name=p_page_number]").val() == "" && mainForm.find("[name=p_number_pages]").val() == "") { alert("Either Number of Pages or Page Number(s) be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages must be filled in"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPreperation") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "BookChapters" || mainForm.find("[name=p_pub_sub_type]").val() == "ArticlesInBooks") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status_part]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_number_pages]").val() == "" && mainForm.find("[name=p_page_number]").val() == "") { alert("Either Number of Pages or Page Number(s) must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } } if (mainForm.find("[name=p_title_of_chapter]").val() == "") { alert("Title of the Chapter is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the Book is required"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } if (mainForm.find("[name=p_name_of_editor]").val() == "") { alert("Name of Editor is required"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "BookReviews") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } /*if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } }*/ if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (maintab_form.p_title.value.length > 4000) { alert("Title can only be 4000 characters. Currently it has " + maintab_form.p_title.value.length + " characters"); return false; } if (mainForm.find("[name=p_title]").val() == "") { alert("Title is required"); return false; } if (mainForm.find("[name=p_authors_name]").val() == "") { alert("Author's Name is required"); return false; } if (mainForm.find("[name=p_br2_publisher]").val() == "") { alert("Publisher is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_br2_pub_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } if (mainForm.find("[name=p_BR2_NUMBER_MANUSCRIPT]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isDate_MMDDYYYY(maintab_form.p_BR2_PUBLICATION_DATE.value)) { alert("Publication Date is not a valid date"); return false; } if (mainForm.find("[name=p_br2_page_number]").val() == "" && mainForm.find("[name=p_br2_number_pages]").val() == "") { alert("Either Page Number(s) or Number of Pages must be filled in"); return false; } } else //in press { if (mainForm.find("[name=p_BR2_NUMBER_MANUSCRIPT]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_br2_pub_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } } else { if (!isDate_MMDDYYYY(maintab_form.p_br2_preperation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "Monographs") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the book is required"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } if (mainForm.find("[name=p_year_of_pub]").val() == "") { alert("Year of Publication is required"); return false; } if (mainForm.find("[name=p_number_pages]").val() == "" && mainForm.find("[name=p_page_number]").val() == "") { alert("Either Number of Pages or Page Number(s) must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the book is required"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is an invalid date"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_title_of_book]").val() == "") { alert("Title of the book is required"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "ArticleReview") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (maintab_form.p_title.value.length > 4000) { alert("Title can only be 4000 characters. Currently it has " + maintab_form.p_title.value.length + " characters"); return false; } if (mainForm.find("[name=p_title]").val() == "") { if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { alert("Title is required"); return false; } else { alert("Working Title is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_number_pages]").val() == "" && mainForm.find("[name=p_page_number]").val() == "") { alert("Either Number of Pages or Page Number(s) must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } } if (mainForm.find("[name=p_title_article_reviewed]").val() == "") { alert("Title of the article that was reviewed is required"); return false; } if (mainForm.find("[name=p_journal_name_review_appears]").val() == "") { alert("Journal name the review appears in is required"); return false; } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "ReviewArticles") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_number_pages]").val() == "" && mainForm.find("[name=p_page_number]").val() == "") { alert("Either Number of Pages or Page Number(s) must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } } if (maintab_form.p_title.value.length > 4000) { alert("Title can only be 4000 characters. Currently it has " + maintab_form.p_title.value.length + " characters"); return false; } if (mainForm.find("[name=p_title]").val() == "") { alert("Title is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_journal_name]").val() == "") { alert("Journal Name is required"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "Abstracts") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } /*if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } }*/ if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } if (mainForm.find("[name=p_title_of_abstract]").val() == "") { alert("Title of the abstract is required"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } if ((!isDate_MMDDYYYY(maintab_form.p_conference_date.value)) && mainForm.find("[name=p_conference_date]").val() != "") { alert("Date of the conference/meeting is not a valid date"); return false; } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "NewsLetters") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_number_pages]").val() == "" && mainForm.find("[name=p_page_number]").val() == "") { alert("Either Number of Pages or Page Number(s) must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } } if (mainForm.find("[name=p_newsletter_title]").val() == "") { alert("Newsletter/article title is required"); return false; } if (mainForm.find("[name=p_where_newsletter_published]").val() == "") { alert("Where the newsletter was published is required"); return false; } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "TechnicalReports") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub_na]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub_na]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (((maintab_form.p_month_of_publication_nr.value*1) < 1 || (maintab_form.p_month_of_publication_nr.value*1) > 12 || isNaN(maintab_form.p_month_of_publication_nr.value)) && mainForm.find("[name=p_month_of_publication_nr]").val() != "") { alert("Month of Publication is not a valid month"); return false; } if (mainForm.find("[name=p_name_of_report]").val() == "") { alert("Name of the report is required"); return false; } if (mainForm.find("[name=p_who_report_issued]").val() == "") { alert("Who/what the report was issued for is required"); return false; } if (mainForm.find("[name=p_stage_of_pub_na]").val() == "Published") { if ((!isYear(maintab_form.p_year_of_pub.value) && (!isYear(maintab_form.p_year_issued.value)))) { alert("Either Year of Publication or Year Issued is required (YYYY)"); return false; } /*if (!isYear(maintab_form.p_year_issued.value)) { alert("Year Issued is not a valid year"); return false; }*/ } else if (mainForm.find("[name=p_stage_of_pub_na]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } else if (mainForm.find("[name=p_stage_of_pub_na]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } if (mainForm.find("[name=p_stage_of_pub_na]").val() == "Published") { if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } } else if (mainForm.find("[name=p_stage_of_pub_na]").val() == "InPress") { if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } } else if (mainForm.find("[name=p_stage_of_pub_na]").val() == "Submitted") { if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "MeetingReports") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year Issued/Published is not a valid year"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_number_pages]").val() == "" && mainForm.find("[name=p_page_number]").val() == "") { alert("Either Number of Pages or Page Number(s) must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } } if (mainForm.find("[name=p_title_of_meeting]").val() == "") { alert("Title of the meeting report is required"); return false; } if (mainForm.find("[name=p_publisher]").val() == "" && mainForm.find("[name=p_agency_report_created]").val() == "") { alert("Either Publishing Venue or Report written for (name of Agency/Organization) is required"); return false; } if (mainForm.find("[name=p_name_of_meeting]").val() == "") { alert("Name of the meeting is required"); return false; } if (mainForm.find("[name=p_date_of_meeting]").val() != "") { if (!isDate_MMDDYYYY(maintab_form.p_date_of_meeting.value)) { alert("Date of the meeting is not a valid date"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "WebPublications") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_name_of_software]").val() == "") { alert("Name of the software program is required"); return false; } if (mainForm.find("[name=p_available_at_website]").val() == "") { alert("Available at website is required"); return false; } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "Thesis") { if (mainForm.find("[name=p_title_of_thesis]").val() == "") { alert("Title of the Thesis is required"); return false; } if (mainForm.find("[name=p_name_of_university]").val() == "") { alert("Name of university is required"); return false; } if (mainForm.find("[name=p_date_accepted_status]").val() != "" && !isDate_MMDDYYYY(maintab_form.p_date_accepted_status.value)) { alert("Date accepted (status) is not a valid date"); return false; } if (mainForm.find("[name=p_date_presented_status]").val() != "" && !isDate_MMDDYYYY(maintab_form.p_date_presented_status.value)) { alert("Date presented (status) is not a valid date"); return false; } if (mainForm.find("[name=p_date_defended_status]").val() != "" && !isDate_MMDDYYYY(maintab_form.p_date_defended_status.value)) { alert("Date defended (status) is not a valid date"); return false; } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "Dissertation") { if (mainForm.find("[name=p_title_of_dissertation]").val() == "") { alert("Title of the Dissertation is required"); return false; } if (!isDate_MMDDYYYY(maintab_form.p_date.value)) { alert("Date is not a valid date"); return false; } if (mainForm.find("[name=p_type_of_dissertation]").val() == "") { alert("Type of Dissertation (Doctoral) is required"); return false; } if (mainForm.find("[name=p_name_of_university]").val() == "") { alert("Name of university is required"); return false; } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "ReviewEssays") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_number_pages]").val() == "" && mainForm.find("[name=p_page_number]").val() == "") { alert("Either Number of Pages or Page Number(s) must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } } if (maintab_form.p_title.value.length > 4000) { alert("Title can only be 4000 characters. Currently it has " + maintab_form.p_title.value.length + " characters"); return false; } if (mainForm.find("[name=p_title]").val() == "") { alert("Title is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_journal_name]").val() == "") { alert("Journal Name is required"); return false; } } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "PostersTutorialsMisc") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } if (mainForm.find("[name=p_where_publication_appear]").val() == "") { alert("Where does the publication appear is required"); return false; } if (!isMonthYear(maintab_form.p_month_year.value)) { alert("Month/Year of Presentation is not valid"); return false; } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "Translations") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_number_pages]").val() == "" && mainForm.find("[name=p_page_number]").val() == "") { alert("Either Number of Pages or Page Number(s) must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } } if (maintab_form.p_comments.value.length > 256) { alert("Comments can only be 256 characters. Currently it has " + maintab_form.p_comments.value.length + " characters"); return false; } if (maintab_form.p_title.value.length > 4000) { alert("Title can only be 4000 characters. Currently it has " + maintab_form.p_title.value.length + " characters"); return false; } if (mainForm.find("[name=p_title]").val() == "") { alert("Title is required"); return false; } if (mainForm.find("[name=p_original_authors_name]").val() == "") { alert("Original Author's Name is required"); return false; } if (mainForm.find("[name=p_original_publication_name]").val() == "") { alert("Original Publication Name is required"); return false; } if (!isYear(maintab_form.p_original_pub_date.value) && mainForm.find("[name=p_original_pub_date]").val() != "") { alert("Original Publication Year is not a valid year"); return false; } if (mainForm.find("[name=p_publisher_of_translation]").val() == "") { alert("Publication Venue of Translation is required"); return false; } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "ReferenceEntries") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_number_pages]").val() == "" && mainForm.find("[name=p_page_number]").val() == "") { alert("Either Number of Pages or Page Number(s) must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages must be filled in"); return false; } } if (maintab_form.p_editor_free_form_nr.value.length > 2000) { alert("Editor can have a maximum of 2000 characters. Currently it has " + maintab_form.p_editor_free_form_nr.value.length + " characters"); return false; } if (mainForm.find("[name=p_reference_encyclopedia_name]").val() == "") { alert("Reference/Encyclopedia Name is required"); return false; } if (mainForm.find("[name=p_title_of_pub]").val() == "") { alert("Title of the publication is required"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "Commentary") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() != "InPreperation") { if (mainForm.find("[name=p_referee_status]").val() == "") { alert("Referee Status is required"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (!isYear(maintab_form.p_year_of_pub.value)) { alert("Year of Publication is not a valid year"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (!isDate_MMDDYYYY(maintab_form.p_acceptance_date.value)) { alert("Acceptance Date is not a valid date"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (!isDate_MMDDYYYY(maintab_form.p_submission_date.value)) { alert("Submission Date is not a valid date"); return false; } } else { if (!isDate_MMDDYYYY(maintab_form.p_preparation_date.value)) { alert("Preparation Date is not a valid date"); return false; } } if (mainForm.find("[name=p_stage_of_pub]").val() == "Published") { if (mainForm.find("[name=p_number_pages]").val() == "" && mainForm.find("[name=p_page_number]").val() == "") { alert("Either Number of Pages or Page Number(s) must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "InPress") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "" && mainForm.find("[name=p_number_galley_pages]").val() == "") { alert("Either Number of Manuscript Pages or Number of Galley Pages must be filled in"); return false; } } else if (mainForm.find("[name=p_stage_of_pub]").val() == "Submitted") { if (mainForm.find("[name=p_number_manuscript_pages]").val() == "") { alert("Number of Manuscript Pages is required"); return false; } } if (mainForm.find("[name=p_title_article_reviewed]").val() == "") { alert("Title of the article that was reviewed is required"); return false; } if (mainForm.find("[name=p_journal_name_review_appears]").val() == "") { alert("Journal name the review appears in is required"); return false; } if (mainForm.find("[name=p_editors]").val() == "") { alert("Editors is required"); return false; } if (mainForm.find("[name=p_publisher]").val() == "") { alert("Publisher is required"); return false; } } else if (mainForm.find("[name=p_pub_sub_type]").val() == "Other") { if (mainForm.find("[name=p_pub_type]").val() == "") { alert("Publication Type is required"); return false; } if (mainForm.find("[name=p_stage_of_pub]").val() == "") { alert("Stage of Publication is required"); return false; } } if (mainForm.find("[name=p_pub_sub_type]").val() != "EditedBooks" && mainForm.find("[name=p_pub_sub_type]").val() != "EditedSpecialIssuesJournals") { if (mainForm.find("[name=p_author_first_name]").val() == "") { alert("First Name is required for all authors"); return false; } if (mainForm.find("[name=p_author_last_name]").val() == "") { alert("Last Name is required for all authors"); return false; } if (candidates_contribution_div.style.display == "block" && candidates_contribution_td.className == "required") //its displayed and shows as required { if (mainForm.find("[name=p_candidates_contribution]").val() == "") { alert("Candidate's Contribution is required"); return false; } } } return true; } else return true; } }