      function enableField() {
        var d=document.getElementById("choose");
        d.anim[0].disabled=false;
        d.anim[1].disabled=false;
        d.speed[0].disabled=false;
        d.speed[1].disabled=false;
      }
      function disableField() {
        var d=document.getElementById("choose");
        d.anim[0].disabled=false;
        d.anim[1].disabled=false;
        d.anim[0].checked=true;
        d.anim[1].checked=false;
        d.speed[0].disabled=true;
        d.speed[1].disabled=true;
        d.speed[0].checked=false;
        d.speed[1].checked=false;
      }

      //This function is called when the user clicks on a valid
      //  location on the ImageMap
      //The box number is passed in as "thelink" and is one of five 
      //  variables  used to determine the final URL
      function genurl(thelink) {

        //path to images and php files
        var abspath1="http://einstein.atmos.colostate.edu/~mcnoldy/tropics/sectors/sst/";
        var abspath2="http://einstein.atmos.colostate.edu/~mcnoldy/tropics/sectors/wind/";
        var abspath3="http://einstein.atmos.colostate.edu/~mcnoldy/tropics/sectors/vort/";
        var abspath4="http://einstein.atmos.colostate.edu/~mcnoldy/tropics/sectors/tchp/";

        //Check out http://weather.msfc.nasa.gov/GOES/getsatellite.html for details on link generation
        var d=document.getElementById("choose");
        //The channel (VIS, IR, WV, SST), image quality (45%, 100%), number of 
        //  images (8, 15), and image type (SINGLE, ANIMATION) are 
        //  all set here based on form values.
        if (d.sector[0].checked) {
          thechan="vis&palette=ir.pal";
        } else if (d.sector[1].checked) {
          thechan="ir&palette=spect.pal";
        } else if (d.sector[2].checked) {
          thechan="wv&palette=ir.pal";
        }
        var thequality=(d.speed[0].checked==true)?"45":"100"
        var thelength=(d.speed[0].checked==true)?"8":"15"
        var theimage=(d.anim[0].checked==true)?"Image":"Animation&numframes="+thelength;

        //Generate the link based on which radio buttons are selected and
        //  which sector the user clicked on
        switch (thelink) {
          case 1:            
            if (d.sector[3].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath1+"gulf0.png";
              } else {
                theurl=abspath1+"gulf"+thelength+".php";
              }
	    } else if (d.sector[4].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath4+"gulf0.png";
              } else {
                theurl=abspath4+"gulf"+thelength+".php";
              }
	    } else if (d.sector[5].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath2+"gulf0.png";
              } else {
                theurl=abspath2+"gulf"+thelength+".php";
              }
	    } else if (d.sector[6].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath3+"gulf0.png";
              } else {
                theurl=abspath3+"gulf"+thelength+".php";
              }	      
            } else {
theurl="http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?&satellite=GOES-E%20CONUS&lat=21&lon=-86&info="+thechan+"&type="+theimage+"&width=600&height=525&zoom=4&quality="+thequality+"&map=latlon";
            }
            break;
          case 2:
            if (d.sector[3].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath1+"carib0.png";
              } else {
                theurl=abspath1+"carib"+thelength+".php";
              }
	    } else if (d.sector[4].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath4+"carib0.png";
              } else {
                theurl=abspath4+"carib"+thelength+".php";
              }
	    } else if (d.sector[5].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath2+"carib0.png";
              } else {
                theurl=abspath2+"carib"+thelength+".php";
              }
	    } else if (d.sector[6].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath3+"carib0.png";
              } else {
                theurl=abspath3+"carib"+thelength+".php";
              }	      	      
            } else { 
theurl="http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=GOES-E%20HURRICANE&lat=10&lon=-73&info="+thechan+"&type="+theimage+"&width=850&height=420&zoom=4&quality="+thequality;
            }
            break;
          case 3:
            if (d.sector[3].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath1+"coast0.png";
              } else {
                theurl=abspath1+"coast"+thelength+".php";
              }
	    } else if (d.sector[4].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath4+"coast0.png";
              } else {
                theurl=abspath4+"coast"+thelength+".php";
              }
	    } else if (d.sector[5].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath2+"coast0.png";
              } else {
                theurl=abspath2+"coast"+thelength+".php";
              }
	    } else if (d.sector[6].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath3+"coast0.png";
              } else {
                theurl=abspath3+"coast"+thelength+".php";
              }	      	      
            } else {
theurl="http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=GOES-E%20CONUS&lat=31&lon=-65&info="+thechan+"&type="+theimage+"&width=480&height=540&zoom=4&quality="+thequality+"&map=latlon";
            }
            break;
          case 4:   
            if (d.sector[3].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath1+"east0.png";
              } else {
                theurl=abspath1+"east"+thelength+".php";
              }
	    } else if (d.sector[4].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath4+"east0.png";
              } else {
                theurl=abspath4+"east"+thelength+".php";
              }
	    } else if (d.sector[5].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath2+"east0.png";
              } else {
                theurl=abspath2+"east"+thelength+".php";
              }
	    } else if (d.sector[6].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath3+"east0.png";
              } else {
                theurl=abspath3+"east"+thelength+".php";
              }	      	      
            } else {
//theurl="http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=Meteosat&lat=12&lon=-10&info="+thechan+"&type="+theimage+"&width=900&height=300&zoom=2&quality="+thequality;
theurl="http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=GOES-E%20FULL&lat=12&lon=-43&info="+thechan+"&type="+theimage+"&width=1000&height=600&zoom=1&quality="+thequality;

            }
            break;
          case 5:   
            if (d.sector[3].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath1+"epac0.png";
              } else {
                theurl=abspath1+"epac"+thelength+".php";
              }
	    } else if (d.sector[4].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath4+"epac0.png";
              } else {
                theurl=abspath4+"epac"+thelength+".php";
              }
	    } else if (d.sector[5].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath2+"epac0.png";
              } else {
                theurl=abspath2+"epac"+thelength+".php";
              }
	    } else if (d.sector[6].checked) {
              if (d.anim[0].checked==true) {
                theurl=abspath3+"epac0.png";
              } else {
                theurl=abspath3+"epac"+thelength+".php";
              }	      	      
            } else {
//theurl="http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=GOES-W%20PACUS&lat=17&lon=-107&info="+thechan+"&type="+theimage+"&width=750&height=470&zoom=4&quality="+thequality+"&map=latlon";
theurl="http://wwwghcc.msfc.nasa.gov/cgi-bin/get-goes?satellite=GOES-E%20FULL&lat=16&lon=-106&info="+thechan+"&type="+theimage+"&width=1000&height=600&zoom=1&quality="+thequality;
            }
            break;	    
        }
        window.document.location=theurl;
      }
