
// RANDOM IMAGE

        var n = 1; // default image
        var r = 7; // total number of images -1       


	// find browser name and version
	var bName = navigator.appName;
	var bVersion = parseInt(navigator.appVersion);

	// Math.random does not work in NS2
        if (!(bName == "Netscape" && bVersion == 2)) {
	    n = (Math.round(Math.random()*r) + 1);
        } 

        function random_image() {
            if (n == 1) {
               document.write('<a href="#"><font color="red"><IMG alt="Computation of nitric oxide transport along kidney arteriole" border="1" title="Computation of nitric oxide transport along kidney arteriole" src="https://www.math.duke.edu/images/dms-bio2.jpg" width="100"></font></a>');

            } else if (n == 2) {
               document.write('<a href="#"><font color="blue"><IMG alt="Caustics of gravitational lenses (J. Wambsganss)" border="2" title="Caustics of gravitational lenses (J. Wambsganss)" src="https://www.math.duke.edu/images/dms-caustics1.jpg" width="100"></font></a>');

            } else if (n == 3) {
               document.write('<a href="#"><font color="blue"><IMG alt="Caustics of gravitational lenses (J. Wambsganss)" border="2" title="Caustics of gravitational lenses (J. Wambsganss)" src="https://www.math.duke.edu/images/dms-caustics2.jpg" width="100"></font></a>');

            } else if (n == 4) {
               document.write('<a href="#"><font color="#224e7c"><IMG alt="Topaz dynamics" border="2" title="Topaz dynamics" src="https://www.math.duke.edu/images/dms-topaz.jpg" width="100"></font></a>');

            } else if (n == 5) {
               document.write('<a href="#"><font color="red"><IMG alt="Computation of nitric oxide transport along kidney arteriole" border="1" title="Computation of nitric oxide transport along kidney arteriole" src="https://www.math.duke.edu/images/dms-kidney.jpg" width="100"></font></a>');

            } else if (n == 6) {
               document.write('<a href="#"><font color="gray"><IMG alt="Computation of nitric oxide transport along kidney arteriole" border="0" title="Computation of nitric oxide transport along kidney arteriole" src="https://www.math.duke.edu/images/dms-kidney2.jpg" width="100"></font></a>');

            } else if (n == 7) {
               document.write('<a href="#"><font color="#00930f"><IMG alt="Shear bands in granular materials" border="3" title="Shear bands in granular materials" src="https://www.math.duke.edu/images/dms-dgs2.gif" width="100"></font></a>');

            } else if (n == 8) {
               document.write('<a href="#"><font color="#275eb8"><IMG alt="Photon" border="2" title="Photon" src="https://www.math.duke.edu/images/dms-photon.jpg" width="100"></font></a>');
               


          //  } else if (n == 2) {
          //     document.write('<IMG alt="A quartic surface" title="A Kummer surface"  border="0" src="https://www.math.duke.edu/images/dm-kum-transp2.gif" width="100">');

	    // } else if (n == 3) {
            //    document.write('<IMG alt="A fluid drying up computation" title="A fluid drying up computation" src="https://www.math.duke.edu/images/dm-dewet.jpg" width=150>');
    }
}



