// JavaScript Document //Subform controls $(document).ready(function(){ // Functions for removal of Table columns and rows $.fn.removeCol = function(col){ // Make sure col has value if(!col){ col = 1; } $('tr td:nth-child('+col+'), tr th:nth-child('+col+')', this).remove(); return this; }; function removeTableRow(jQtable){ jQtable.each(function(){ if($('tbody', this).length > 0){ $('tbody tr:last', this).remove(); }else { $('tr:last', this).remove(); } }); }; var sec_ctrl1=document.MainSection.s_Only_1.value; var sec_ctrl2=document.MainSection.s_Only_2.value; var sec_ctrl3=document.MainSection.s_Only_3.value; var sec_ctrl4=document.MainSection.s_Only_4.value; var sec_ctrl5=document.MainSection.s_Only_5.value; var sec_ctrl6=document.MainSection.s_Only_6.value; var sec_ctrl7=document.MainSection.s_Only_7.value; var sec_ctrl8=document.MainSection.s_Only_8.value; var sec_ctrl9=document.MainSection.s_Only_9.value; var subform=document.MainSection.subform_table.value; var $app_purpose=$("[name=application$app_purpose]").val(); var $orig_app_purpose=$("[name=orig_app_purpose]").val(); var $display_only=$("[name=d_Only]").val(); var $curcopy1=$("[name=cur_copy_1]").val(); var $curcopy2=$("[name=cur_copy_2]").val(); var $curcopy3=$("[name=cur_copy_3]").val(); var $curcopy4=$("[name=cur_copy_4]").val(); var $curcopy5=$("[name=cur_copy_5]").val(); var $curcopy6=$("[name=cur_copy_6]").val(); var $curcopy7=$("[name=cur_copy_7]").val(); var $curcopy8=$("[name=cur_copy_8]").val(); var $curcopy9=$("[name=cur_copy_9]").val(); if (subform == "" || subform =="empty") { //$("input").scrollTop(); window.scrollTo(0,0); } //Ownership Group if (sec_ctrl1 == 'Y') { if ($curcopy1 == 0) { document.getElementById("Cownership_group").value="Enter Station Information"; $("div#DIVOG").hide("slow"); } else { document.getElementById("Cownership_group").value="Collapse Subform"; $("div#DIVOG").show("fast"); if (subform == "ownership_group") { $("input[id^='OGCALLSGN']").focus(); if ($app_purpose == "AMD") { $("div#OGAC").hide("fast"); } } } } else { document.getElementById("Cownership_group").value="Enter Station Information"; $("div#DIVOG").hide("slow"); }; //Click Function $("input#Cownership_group").click(function(event){ if (document.getElementById("Cownership_group").value == "Enter Station Information"){ document.getElementById("Cownership_group").value="Collapse Subform"; document.MainSection.s_Only_1.value='Y'; $("div#DIVOG").show("slow"); if ($curcopy1 == 0) { $("input#Downership_group").hide("slow"); $("input#OGVS").hide("slow"); $("input#OGSS").hide("slow"); $("div#OGCB").hide("slow"); $('#OGTBLI').removeCol(6); } } else { document.MainSection.s_Only_1.value='N'; document.getElementById("Cownership_group").value="Enter Station Information"; $("div#DIVOG").hide("slow"); } }); // Check all check boxes $("#OSCBOXALL").click(function(event){ $("INPUT[id^='stationlist']").attr('checked', $('#OSCBOXALL').is(':checked')); }); $("input#OGMC").click(function(event){ var copies=$("#OGAMC").val(); var $curcopy1=$("[name=cur_copy_1]").val(); for (i=1;i<=5;i++){ $("table#OGTBLI tr").eq($curcopy1).after('This is tThis is tThis is tThis is tThis is tThis is tThis is t'); } event.preventDefault(); }); //Ownership Contract if (sec_ctrl2 == 'Y') { if ($curcopy2 == 0) { document.getElementById("Cownership_contract").value="Enter Contract Information"; $("div#DIVCT").hide("fast"); } else { document.getElementById("Cownership_contract").value="Collapse Subform"; $("div#DIVCT").show("slow"); if (subform == "ownership_contract" ) { setTimeout( function() { $("input[id^='OCCD']").focus(); } , 500); } } } else { document.getElementById("Cownership_contract").value="Enter Contract Information"; $("div#DIVCT").hide("fast"); }; //Click Function $("input#Cownership_contract").click(function(event){ if (document.getElementById("Cownership_contract").value == "Enter Contract Information"){ document.getElementById("Cownership_contract").value="Collapse Subform"; document.MainSection.s_Only_2.value='Y'; $("div#DIVCT").show("slow"); if ($curcopy2 == 0) { $("input#Downership_contract").hide("slow"); $("input#OCVS").hide("slow"); $("input#OCSS").hide("slow"); $("div#OCCB").hide("slow"); } } else { document.MainSection.s_Only_2.value='N'; document.getElementById("Cownership_contract").value="Enter Contract Information"; $("div#DIVCT").hide("slow"); } }); // Check all check boxes $("#OCONCBOXALL").click(function(event){ $("INPUT[id^='contractcbox']").attr('checked', $('#OCONCBOXALL').is(':checked')); }); //Ownership Capitalization if (sec_ctrl3 == 'Y') { if ($curcopy3 == 0) { document.getElementById("Cownership_capitalization").value="Enter Capitalization Information"; $("div#DIVCAP").hide("fast"); } else { document.getElementById("Cownership_capitalization").value="Collapse Subform"; $("div#DIVCAP").show("slow"); if (subform == "ownership_capitalization" ) { setTimeout( function() { $("input[id^='OCCOSO']").focus(); } , 500); } } } else { document.getElementById("Cownership_capitalization").value="Enter Capitalization Information"; $("div#DIVCAP").hide("fast"); }; // Click Function $("input#Cownership_capitalization").click(function(event){ if (document.getElementById("Cownership_capitalization").value == "Enter Capitalization Information"){ document.getElementById("Cownership_capitalization").value="Collapse Subform"; document.MainSection.s_Only_3.value='Y'; $("div#DIVCAP").show("slow"); if ($curcopy3 == 0) { $("input#Downership_capitalization").hide("slow"); $("input#OCPVS").hide("slow"); $("input#OCPSS").hide("slow"); $("div#OCPCB").hide("slow"); } } else { document.MainSection.s_Only_3.value='N'; document.getElementById("Cownership_capitalization").value="Enter Capitalization Information"; $("div#DIVCAP").hide("slow"); } }); // Check all check boxes $("#OCAPCBOXALL").click(function(event){ $("INPUT[id^='capzcbox']").attr('checked', $('#OCAPCBOXALL').is(':checked')); }); //Ownership Structure if (sec_ctrl4 == 'Y') { if ($curcopy4 == 0) { document.getElementById("Cownership_structure").value="Enter Ownership Interests Information"; $("div#DIVOS").hide("fast"); } else { $("div#SPECFRN").hide("slow"); document.getElementById("Cownership_structure").value="Collapse Subform"; $("div#DIVOS").show("slow"); if (subform == "ownership_structure" ) { setTimeout( function() { $("input[id^='OSNAME']").focus(); } , 500); } } } else { document.getElementById("Cownership_structure").value="Enter Ownership Interests Information"; $("div#DIVOS").hide("fast"); }; //$("div#SPECFRN").hide("slow"); $("[id^='OSSUFRN']").click(function(event){ //var $name=$(this).attr("name"); // var $frn=$("[name=sufrn]").val(); //$("div#SPECFRN").show("slow"); if (confirm("Respondents must provide an FCC Registration Number (FRN) for all persons and entities reported in Question 3(a) of this Report. If, after using diligent and good-faith efforts, Respondent is unable to obtain a Social Security Number in order to generate an FRN for any specific individual whose FRN must be reported on Form 323, Respondent may click on the button below to generate an interim 'Special Use FRN' solely for the purposes of completing this Report. Respondents selecting this option should first read the Commission's Form 323 Frequently Asked Questions concerning the 'Special Use FRN', available at http://www.fcc.gov/bureaus/mb/industry_analysis/form323faqs.html. \n\nNOTE: The 'Special Use FRN' generated by selecting the button may be used only to file this biennial ownership report on FCC Form 323 and may not be used for any other purpose at the FCC. Respondents who use a non-SSN based 'Special Use FRN' will be deemed fully compliant with the Form 323 filing obligation for purposes of this initial filing and the lack of SSN-based FRNs in response to Question 3(a) will not subject Respondents to enforcement action. To proceed with generating the 'Special Use FRN', select the button ('OK') below. ")){ //var $name=$(this).attr("name"); // $("#" + $name).val($frn); var $fid=$(this).attr("id"); // $("input[name='hidspecnum']").val(); // $(this).value=''; $("input[name='hidspecnum']").val($fid.substr(7,2)); //("hidspecnum").val($fid.substring(7,10)); } else { if (event.preventDefault) { event.preventDefault(); } else { event.returnValue = false; }}; }); $("input#Cownership_structure").click(function(event){ if (document.getElementById("Cownership_structure").value == "Enter Ownership Interests Information"){ document.getElementById("Cownership_structure").value="Collapse Subform"; document.MainSection.s_Only_4.value='Y'; $("div#DIVOS").show("slow"); if ($curcopy4 == 0) { $("input#Downership_structure").hide("slow"); $("input#OSVS").hide("slow"); $("input#OSSS").hide("slow"); $("div#OSCB").hide("slow"); } event.preventDefault(); } else { document.MainSection.s_Only_4.value='N'; document.getElementById("Cownership_structure").value="Enter Ownership Interests Information"; $("div#DIVOS").hide("slow"); event.preventDefault(); } }); // Check all check boxes $("#OSTCBOXALL").click(function(event){ $("INPUT[id^='owncbox']").attr('checked', $('#OSTCBOXALL').is(':checked')); }); //Ownership Broadcast Interests if (sec_ctrl5 == 'Y') { if ($curcopy5 == 0) { document.getElementById("Cownership_other_intB").value="Broadcast Interests Subform"; $("div#DIVAT").hide("fast"); } else { document.getElementById("Cownership_other_intB").value="Collapse Subform"; $("div#DIVAT").show("slow"); if (subform == "ownership_other_intB" ) { setTimeout( function() { $("input[id^='OOINAMEB']").focus(); } , 500); } } } else { document.getElementById("Cownership_other_intB").value="Broadcast Interests Subform"; $("div#DIVAT").hide("fast"); }; $("input#Cownership_other_intB").click(function(event){ if (document.getElementById("Cownership_other_intB").value == "Broadcast Interests Subform"){ document.getElementById("Cownership_other_intB").value="Collapse Subform"; document.MainSection.s_Only_5.value='Y'; $("div#DIVAT").show("slow"); if ($curcopy5 == 0) { $("input#Downership_other_intB").hide("slow"); $("input#OOIBVS").hide("slow"); $("input#OOIBSS").hide("slow"); $("div#OOIBCB").hide("slow"); } } else { document.MainSection.s_Only_5.value='N'; document.getElementById("Cownership_other_intB").value="Broadcast Interests Subform"; $("div#DIVAT").hide("slow"); } }); //Check all check boxes $("#OOIBCBOXALL").click(function(event){ $("INPUT[id^='blistcbox']").attr('checked', $('#OOIBCBOXALL').is(':checked')); }); //Ownership Newspaper Interests if (sec_ctrl6 == 'Y') { if ($curcopy6 == 0) { document.getElementById("Cownership_other_intN").value="Newspaper Interests Subform"; $("div#DIVNEW").hide("fast"); } else { document.getElementById("Cownership_other_intN").value="Collapse Subform"; $("div#DIVNEW").show("slow"); if (subform == "ownership_other_intN" ) { setTimeout( function() { $("input[id^='OOINAMEN']").focus(); } , 500); } } } else { document.getElementById("Cownership_other_intN").value="Newspaper Interests Subform"; $("div#DIVNEW").hide("fast"); }; $("input#Cownership_other_intN").click(function(event){ if (document.getElementById("Cownership_other_intN").value == "Newspaper Interests Subform"){ document.getElementById("Cownership_other_intN").value="Collapse Subform"; document.MainSection.s_Only_6.value='Y'; $("div#DIVNEW").show("slow"); if ($curcopy6 == 0) { $("input#Downership_other_intN").hide("slow"); $("input#OOINVS").hide("slow"); $("input#OOINSS").hide("slow"); $("div#OOINCB").hide("slow"); } } else { document.MainSection.s_Only_6.value='N'; document.getElementById("Cownership_other_intN").value="Newspaper Interests Subform"; $("div#DIVNEW").hide("slow"); } }); //Check all check boxes $("#OOINCBOXALL").click(function(event){ $("INPUT[id^='nlistcbox']").attr('checked', $('#OOINCBOXALL').is(':checked')); }); //Enter Familial Relationships Information if (sec_ctrl7 == 'Y') { if ($curcopy7 == 0) { document.getElementById("Cownership_relationships").value="Enter Familial Relationships Information"; $("div#DIVREL").hide("fast"); } else { document.getElementById("Cownership_relationships").value="Collapse Subform"; $("div#DIVREL").show("slow"); if (subform == "ownership_relationships" ) { setTimeout( function() { $("input[id^='ORNAMES']").focus(); } , 500); } } } else { document.getElementById("Cownership_relationships").value="Enter Familial Relationships Information"; $("div#DIVREL").hide("fast"); }; $("input#Cownership_relationships").click(function(event){ if (document.getElementById("Cownership_relationships").value == "Enter Familial Relationships Information"){ document.getElementById("Cownership_relationships").value="Collapse Subform"; document.MainSection.s_Only_7.value='Y'; $("div#DIVREL").show("slow"); if ($curcopy7 == 0) { $("input#Downership_relationships").hide("slow"); $("input#ORVS").hide("slow"); $("input#ORSS").hide("slow"); $("div#ORCB").hide("slow"); } } else { document.MainSection.s_Only_7.value='N'; document.getElementById("Cownership_relationships").value="Enter Familial Relationships Information"; $("div#DIVREL").hide("slow"); } }); //Check all check boxes $("#ORCBOXALL").click(function(event){ $("INPUT[id^='relistcbox']").attr('checked', $('#ORCBOXALL').is(':checked')); }); // Subform 8 -- Attributable Exemption if (sec_ctrl8 == 'Y') { if ($curcopy8 == 0) { document.getElementById("Cownership_exemptions").value="Enter Attribution Exemption Information"; $("div#DIVEX").hide("fast"); } else { document.getElementById("Cownership_exemptions").value="Collapse Subform"; $("div#DIVEX").show("slow"); if (subform == "ownership_exemptions" ) { setTimeout( function() { $("input[id^='OENAMES']").focus(); } , 500); } } } else { document.getElementById("Cownership_exemptions").value="Enter Attribution Exemption Information"; $("div#DIVEX").hide("fast"); }; $("input#Cownership_exemptions").click(function(event){ if (document.getElementById("Cownership_exemptions").value == "Enter Attribution Exemption Information"){ document.getElementById("Cownership_exemptions").value="Collapse Subform"; document.MainSection.s_Only_8.value='Y'; $("div#DIVEX").show("slow"); if ($curcopy8 == 0) { $("input#Downership_exemptions").hide("slow"); $("input#OEVS").hide("slow"); $("input#OESS").hide("slow"); $("div#OECB").hide("slow"); } } else { document.MainSection.s_Only_8.value='N'; document.getElementById("Cownership_exemptions").value="Enter Attribution Exemption Information"; $("div#DIVEX").hide("fast"); } }); //Check all check boxes $("#OECBOXALL").click(function(event){ $("INPUT[id^='exemptcbox']").attr('checked', $('#OECBOXALL').is(':checked')); }); // Subform 9 -- Respondent if ($app_purpose == "OB" || $orig_app_purpose == "OB") { if (sec_ctrl9 == 'Y') { if ($curcopy9 == 0) { document.getElementById("Cownership_interests").value="Enter Respondent Interests Held Information"; $("div#DIVRESP").hide("slow"); } else { document.getElementById("Cownership_interests").value="Collapse Subform"; $("div#DIVRESP").show("slow"); if (subform == "ownership_interests" ) { setTimeout( function() { $("input[id^='OINAMEXX']").focus(); } , 500); } } } else { document.getElementById("Cownership_interests").value="Enter Respondent Interests Held Information"; $("div#DIVRESP").hide("fast"); } $("input#Cownership_interests").click(function(event){ if (document.getElementById("Cownership_interests").value == "Enter Respondent Interests Held Information"){ document.getElementById("Cownership_interests").value="Collapse Subform"; document.MainSection.s_Only_9.value='Y'; $("div#DIVRESP").show("slow"); if ($curcopy9 == 0) { $("input#Downership_interests").hide("slow"); $("input#OIVS").hide("slow"); $("input#OISS").hide("slow"); $("div#OICB").hide("slow"); $("div#RDC").hide("slow"); } } else { document.MainSection.s_Only_9.value='N'; document.getElementById("Cownership_interests").value="Enter Respondent Interests Held Information"; $("div#DIVRESP").hide("slow"); } }); //Check all check boxes $("#ORSCBOXALL").click(function(event){ $("INPUT[id^='respcbox']").attr('checked', $('#ORSCBOXALL').is(':checked')); }); } window.focus(0,0); //---------------------------------------------------------------------------------------// // Subform 1 ---- StationList $("#Downership_group").click(function(event){ var purpose = $("input[id^='stationlistcbox']:checked").val(); if (purpose == undefined) { if (document.MainSection.cur_copy_1.value > 0) { alert('Station Lists Information: Please select copies to delete'); } else { alert('Station Lists Information: There are no copies in this subform to delete'); } } else { if ($("input[id^='stationlistcbox']").attr('value') == 'X') { if (confirm("Station Lists Information: Are you sure you want to delete the copies?")){ document.MainSection.deletesub.value='Y'; document.MainSection.subform_table.value="ownership_group"; //document.MainSection.action = myAction; } else { } } else { if (document.MainSection.cur_copy_1.value > 0) { alert('Station Lists Information: Please select copies to delete'); } else { alert('Station Lists Information: There are no copies in this subform to delete'); } }//end confirm } //end undefined });//end of ownership_group // Subform 2 ------- ContractList $("#Downership_contract").click(function(event){ var purpose = $("input[id^='contractcbox']:checked").val(); if (purpose == undefined) { if (document.MainSection.cur_copy_2.value > 0) { alert('Ownership Contract Information: Please select copies to delete'); } else { alert('Ownership Contract Information: There are no copies in this subform to delete'); } } else { if ($("input[id^='contractcbox']").attr('value') == 'X') { if (confirm("Ownership Contract Information: Are you sure you want to delete the copies?")){ document.MainSection.deletesub.value='Y'; document.MainSection.subform_table.value="ownership_contract"; //document.MainSection.action = myAction; $("input[id^='contractcbox']").each ( function( intIndex ){ var val = $(this).val(); var count = intIndex + 1; // if($(this).attr("checked")) { $("#OCATLMA" + count).removeAttr('name'); $("#OCATNAA" + count).removeAttr('name'); $("#OCATOTH" + count).removeAttr('name'); $("#OCEDNA" + count).removeAttr('name'); // $("#ORRFLG3" + count).attr('checked', false); //} } //end function );//end each } else { } } else { if (document.MainSection.cur_copy_2.value > 0) { alert('Ownership Contract Information: Please select copies to delete'); } else { alert('Ownership Contract Information: There are no copies in this subform to delete'); } }//end confirm } //end undefined });//end of ownership_contract // Subform 3 -- Capitalization $("#Downership_capitalization").click(function(event){ var purpose = $("input[id^='capzcbox']:checked").val(); if (purpose == undefined) { if (document.MainSection.cur_copy_3.value > 0) { alert('Ownership Capitalization Information: Please select copies to delete'); } else { alert('Ownership Capitalization Information: There are no copies in this subform to delete'); } } else { if ($("input[id^='capzcbox']").attr('value') == 'X') { if (confirm("Ownership Capitalization Information: Are you sure you want to delete the copies?")){ document.MainSection.deletesub.value='Y'; document.MainSection.subform_table.value="ownership_capitalization"; //document.MainSection.action = myAction; $("input[id^='capzcbox']").each ( function( intIndex ){ var val = $(this).val(); var count = intIndex + 1; // if($(this).attr("checked")) { $("#OCCOSF1" + count).removeAttr('name'); $("#OCCOSF2" + count).removeAttr('name'); $("#OCCOSF3" + count).removeAttr('name'); $("#OCVF1" + count).removeAttr('name'); $("#OCVF2" + count).removeAttr('name'); // $("#ORRFLG3" + count).attr('checked', false); //} } //end function );//end each } else { } } else { if (document.MainSection.cur_copy_3.value > 0) { alert('Ownership Capitalization Information: Please select copies to delete'); } else { alert('Ownership Capitalization Information: There are no copies in this subform to delete'); } }//end confirm } //end undefined });//end of ownership_capitalization // Subform 4 -- Ownership interests $("#Downership_structure").click(function(event){ var purpose = $("input[id^='owncbox']:checked").val(); if (purpose == undefined) { if (document.MainSection.cur_copy_4.value > 0) { alert('Ownership Interests Information: Please select copies to delete'); } else { alert('Ownership Interests Information: There are no copies in this subform to delete'); } } else { if ($("input[id^='owncbox']").attr('value') == 'X') { if (confirm("Ownership Interests Information: Are you sure you want to delete the copies?")){ document.MainSection.deletesub.value='Y'; document.MainSection.subform_table.value="ownership_structure"; //document.MainSection.action = myAction; $("input[id^='owncbox']").each ( function( intIndex ){ var val = $(this).val(); var count = intIndex + 1; // if($(this).attr("checked")) { $("#OSLTF1" + count).removeAttr('name'); $("#OSLTF2" + count).removeAttr('name'); $("#OSRF1" + count).removeAttr('name'); $("#OSRF2" + count).removeAttr('name'); $("#OSRF3" + count).removeAttr('name'); $("#OSPIOFF" + count).removeAttr('name'); $("#OSPIDIR" + count).removeAttr('name'); $("#OSPIPAR" + count).removeAttr('name'); $("#OSPILIM" + count).removeAttr('name'); $("#OSPILLC" + count).removeAttr('name'); $("#OSPIOWN" + count).removeAttr('name'); $("#OSPISTK" + count).removeAttr('name'); $("#OSPICRD" + count).removeAttr('name'); $("#OSPIINV" + count).removeAttr('name'); $("#OSPIOTH" + count).removeAttr('name'); $("#OSPINA" + count).removeAttr('name'); $("#OSGF1" + count).removeAttr('name'); $("#OSGF2" + count).removeAttr('name'); $("#OSEF1" + count).removeAttr('name'); $("#OSEF2" + count).removeAttr('name'); $("#OSRACEFLG1" + count).removeAttr('name'); $("#OSRACEFLG2" + count).removeAttr('name'); $("#OSRACEFLG3" + count).removeAttr('name'); $("#OSRACEFLG4" + count).removeAttr('name'); $("#OSRACEFLG5" + count).removeAttr('name'); $("#OSRACEFLG6" + count).removeAttr('name'); //$("#ORRFLG1" + count).attr('checked', false); // $("#ORRFLG2" + count).attr('checked', false); // $("#ORRFLG3" + count).attr('checked', false); //} } //end function );//end each } else { } } else { if (document.MainSection.cur_copy_4.value > 0) { alert('Ownership Interests Information: Please select copies to delete'); } else { alert('Ownership Interests Information: There are no copies in this subform to delete'); } }//end confirm } //end undefined });//end of ownership_structure // Subform 5 Broadcast List $("#Downership_other_intB").click(function(event){ var purpose = $("input[id^='blistcbox']:checked").val(); if (purpose == undefined) { if (document.MainSection.cur_copy_5.value > 0) { alert('Broadcast Interests Subform: Please select copies to delete'); } else { alert('Broadcast Interests Subform: There are no copies in this subform to delete'); } } else { if ($("input[id^='blistcbox']").attr('value') == 'X') { if (confirm("Broadcast Interests: Are you sure you want to delete the copies?")){ document.MainSection.deletesub.value='Y'; document.MainSection.subform_table.value="ownership_other_intB"; //document.MainSection.action = myAction; $("input[id^='blistcbox']").each ( function( intIndex ){ var val = $(this).val(); var count = intIndex + 1; // if($(this).attr("checked")) { $("#OOIBOFF" + count).removeAttr('name'); $("#OOIBDIR" + count).removeAttr('name'); $("#OOIBPAR" + count).removeAttr('name'); $("#OOIBLIM" + count).removeAttr('name'); $("#OOIBSTK" + count).removeAttr('name'); $("#OOIBOWN" + count).removeAttr('name'); $("#OOIBENT" + count).removeAttr('name'); $("#OOIBINT" + count).removeAttr('name'); $("#OOIBOTHFLG" + count).removeAttr('name'); //$("#ORRFLG1" + count).attr('checked', false); // $("#ORRFLG2" + count).attr('checked', false); // $("#ORRFLG3" + count).attr('checked', false); //} } //end function );//end each } else { } } else { if (document.MainSection.cur_copy_5.value > 0) { alert('Broadcast Interests Subform: Please select copies to delete'); } else { alert('Broadcast Interests Subform: There are no copies in this subform to delete'); } }//end confirm } //end undefined });//end of ownership_other_int //Subform 6 News List $("#Downership_other_intN").click(function(event){ var purpose = $("input[id^='nlistcbox']:checked").val(); if (purpose == undefined) { if (document.MainSection.cur_copy_6.value > 0) { alert('Newspaper Interests Subform: Please select copies to delete'); } else { alert('Newspaper Interests Subform: There are no copies in this subform to delete'); } } else { if ($("input[id^='nlistcbox']").attr('value') == 'X') { if (confirm("Newspaper Interests Subform: Are you sure you want to delete the copies?")){ document.MainSection.deletesub.value='Y'; document.MainSection.subform_table.value="ownership_other_intN"; //document.MainSection.action = myAction; $("input[id^='nlistcbox']").each ( function( intIndex ){ var val = $(this).val(); var count = intIndex + 1; // if($(this).attr("checked")) { $("#OOINOFF" + count).removeAttr('name'); $("#OOINDIR" + count).removeAttr('name'); $("#OOINPAR" + count).removeAttr('name'); $("#OOINLIM" + count).removeAttr('name'); $("#OOINSTK" + count).removeAttr('name'); $("#OOINOWN" + count).removeAttr('name'); $("#OOINENT" + count).removeAttr('name'); $("#OOININT" + count).removeAttr('name'); $("#OOINOTHFLG" + count).removeAttr('name'); //$("#ORRFLG1" + count).attr('checked', false); // $("#ORRFLG2" + count).attr('checked', false); // $("#ORRFLG3" + count).attr('checked', false); //} } //end function );//end each } else { } } else { if (document.MainSection.cur_copy_6.value > 0) { alert('Newspaper Interests Subform: Please select copies to delete'); } else { alert('Newspaper Interests Subform: There are no copies in this subform to delete'); } }//end confirm } //end undefined });//end of ownership_other_int //Subform 7 --RelationshipList $("#Downership_relationships").click(function(event){ var purpose = $("input[id^='relistcbox']:checked").val(); if (purpose == undefined) { if (document.MainSection.cur_copy_7.value > 0) { alert('Familial Relationships Information: Please select copies to delete'); event.preventDefault(); } else { alert('Familial Relationships Information: There are no copies in this subform to delete'); } } else { if ($("input[id^='relistcbox']").attr('value') == 'X') { if (confirm("Familial Relationships Information: Are you sure you want to delete the copies?")){ document.MainSection.deletesub.value='Y'; document.MainSection.subform_table.value="ownership_relationships"; //document.MainSection.action = myAction; $("input[id^='relistcbox']").each ( function( intIndex ){ var val = $(this).val(); var count = intIndex + 1; var first='ORRFLG1' + count // if($(this).attr("checked")) { $("#ORRFLG1" + count).removeAttr('name'); $("#ORRFLG2" + count).removeAttr('name'); $("#ORRFLG3" + count).removeAttr('name'); //$("#ORRFLG1" + count).attr('checked', false); // $("#ORRFLG2" + count).attr('checked', false); // $("#ORRFLG3" + count).attr('checked', false); //} } //end function );//end each } else { } } else { if (document.MainSection.cur_copy_7.value > 0) { alert('Familial Relationships Information: Please select copies to delete'); } else { alert('Familial Relationships Information: There are no copies in this subform to delete'); } }//end confirm } //end undefined });//end of ownership_relationships //Exemption List $("#Downership_exemptions").click(function(event){ var purpose = $("input[id^='exemptcbox']:checked").val(); if (purpose == undefined) { if (document.MainSection.cur_copy_8.value > 0) { alert('Exemption Relationships Information: Please select copies to delete'); } else { alert('Exemption Relationships Information: There are no copies in this subform to delete'); } } else { if ($("input[id^='exemptcbox']").attr('value') == 'X') { if (confirm("Exemption Relationships Information: Are you sure you want to delete the copies?")){ document.MainSection.deletesub.value='Y'; document.MainSection.subform_table.value="ownership_exemptions"; //document.MainSection.action = myAction; } else { } } else { if (document.MainSection.cur_copy_8.value > 0) { alert('Exemption Information: Please select copies to delete'); } else { alert('Exemption Information: There are no copies in this subform to delete'); } }//end confirm } //end undefined });//end of ownership_exemption // Respondent List $("#Downership_interests").click(function(event){ var purpose = $("input[id^='respcbox']:checked").val(); if (purpose == undefined) { if (document.MainSection.cur_copy_9.value > 0) { alert('Respondent Interests Held: Please select copies to delete'); } else { alert('Respondent Interests Held: There are no copies in this subform to delete'); } } else { if ($("input[id^='respcbox']").attr('value') == 'X') { if (confirm("Respondent Interests Held: Are you sure you want to delete the copies?")){ document.MainSection.deletesub.value='Y'; document.MainSection.subform_table.value="ownership_interests"; //document.MainSection.action = myAction; } else { } } else { if (document.MainSection.cur_copy_9.value > 0) { alert('Respondent Interests Held: Please select copies to delete'); } else { alert('Respondent Interests Held: There are no copies in this subform to delete'); } }//end confirm } //end undefined });//end of ownership_interest });