$(document).ready(function(){ $(".change-gwf").click(function(){ $("#gwf-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#gwf-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#gwf-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); $(".change-mef").click(function(){ $("#mef-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#mef-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#mef-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); $(".change-mcf").click(function(){ $("#mcf-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#mcf-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#mcf-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); $(".change-ep").click(function(){ $("#ep-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#ep-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#ep-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); $(".change-fracgasm").click(function(){ $("#fracgasm-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#fracgasm-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#fracgasm-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); $(".change-ef").click(function(){ $("#ef-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#ef-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#ef-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); $(".change-ef-soils-direct").click(function(){ $("#ef-soils-direct-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#ef-soils-direct-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#ef-soils-direct-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); $(".change-ef-soils-residue-direct").click(function(){ $("#ef-soils-residue-direct-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#ef-soils-residue-direct-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#ef-soils-residue-direct-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); $(".change-ef-soils-synthetic-direct").click(function(){ $("#ef-soils-synthetic-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#ef-soils-synthetic-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#ef-soils-synthetic-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); $(".change-ef-soils-organic-direct").click(function(){ $("#ef-soils-organic-direct-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#ef-soils-organic-direct-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#ef-soils-organic-direct-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); $(".change-ef-soils-indirect").click(function(){ $("#ef-soils-indirect-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#ef-soils-indirect-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#ef-soils-indirect-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); $(".change-ef-soils-residues-indirect").click(function(){ $("#ef-soils-residues-indirect-default").css('display', (($(this).attr('value') == 0) ? "" : "none")); $("#ef-soils-residues-indirect-revised").css('display', (($(this).attr('value') == 1) ? "" : "none")); $("#ef-soils-residues-indirect-revisedbutton").css('display', (($(this).attr('value') == 1) ? "" : "none")); }); }); /* updates for reseting values */ var gwfDefaults = new Array(); var mefDefaults = new Array(); var mcfDefaults = new Array(); var epDefaults = new Array(); var fracgasmDefaults = new Array(); var efDefaults = new Array(); var efSoilsDirectDefaults = new Array(); var efSoilsResidueDirectDefaults = new Array(); var efSoilsSyntheticDirectDefaults = new Array(); var efSoilsOrganicDirectDefaults = new Array(); var efSoilsIndirectDefaults = new Array(); var efSoilsResiduesIndirectDefaults = new Array(); function resetEmissions(variable) { for (var index in variable) document.getElementById(index).value = variable[index]; alert('Revised values have been reset to the default values. Please submit the form to save the new values.'); }