The following is part of a javascript that, depending on the date, directs the program to go outside and read a .js file. The problem is one by one the external .js files are read from line to line. Each external .js file is quite long. I want to save bandwidth and exit out of the javascript once the correct line is executed. Or is there a way the external .js file is not read if the if statement is not satisfied?
if (month == 1 && day <15) {document.write("<script src='h1a.js'><\/script>")}
if (month == 1 && day >15) {document.write("<script src='h1b.js'><\/script>")}
if (month == 2 && day <15) {document.write("<script src='h2a.js'><\/script>")}
if (month == 2 && day >15) {document.write("<script src='h2b.js'><\/script>")}
if (month == 3 && day <15) {document.write("<script src='h3a.js'><\/script>")}
if (month == 1 && day <15) {document.write("<script src='h1a.js'><\/script>")}
if (month == 1 && day >15) {document.write("<script src='h1b.js'><\/script>")}
if (month == 2 && day <15) {document.write("<script src='h2a.js'><\/script>")}
if (month == 2 && day >15) {document.write("<script src='h2b.js'><\/script>")}
if (month == 3 && day <15) {document.write("<script src='h3a.js'><\/script>")}