// JavaScript Document// random splash generatorfunction randomSplash(){var splashImage=new Array()// location of images in this arraysplashImage[1]="assets/ZW9J4793_HIBISCUS_TRIONUM_B.jpg";splashImage[2]="assets/CRW_2080_artichoke_detail.jpg";splashImage[3]="assets/CRW_2099_sunflower.jpg";splashImage[4]="assets/RT16_1803_RT16_sat3.jpg";splashImage[5]="assets/ZW9J1121_ORCHID.jpg";splashImage[6]="assets/H_S_1493_RT16.jpg";splashImage[7]="assets/IMG_0762_blur.jpg";splashImage[8]="assets/IMG_1385.jpg";splashImage[9]="assets/IMG_0764_new.jpg";splashImage[10]="assets/IMG_1120.jpg";splashImage[11]="assets/ZX7T4293_CORNFLOWER_SAT3_RN.jpg";splashImage[12]="assets/ZX7T4360_LOVE_IN_MIST_WHITE.jpg";splashImage[13]="assets/CRW_1947_RT16.jpg";var splashCaption=new Array()// captionssplashCaption[1]="Hibiscus Trionum Bud";splashCaption[2]="Artichoke Thistle Spikes";splashCaption[3]="Sunflower Detail";splashCaption[4]="Onopordum Thistle";splashCaption[5]="Orchid '<em>Phalaenopsis I</em>' ";splashCaption[6]="Poppy '<em>Somniferum VI</em>' ";splashCaption[7]="Poppy '<em>Somniferum II</em>' ";splashCaption[8]="Iris IV";splashCaption[9]="Poppy '<em>Somniferum V</em>'";splashCaption[10]="Lily '<em>Stargazer</em>'";splashCaption[11]="Cornflower I";splashCaption[12]="White Nigella '<em>Love In The Mist</em>'";splashCaption[13]="Allium Christophii '<em>Star Of Persia II</em>'";var getRan=Math.floor(Math.random()*splashImage.length)if (getRan==0)getRan=1document.write('<p><img src=\"'+splashImage[getRan]+'\" alt="macro close up Flower photography" title="Flowers" width="400" height="267" \/>');document.write('<p>'+splashCaption[getRan]+'<br/>');document.write('View more images in the <a href="gallery_gateway.html">gallery</a></p>');}// swap image and caption function swapPhoto(photoSRC,theCaption,theSubCap) {  var displayedCaption = document.getElementById("caption");	  displayedCaption.firstChild.nodeValue = theCaption;	  if (typeof theSubCap != "undefined") {    var inserted = document.createElement("em");    inserted.appendChild(document.createTextNode(" \"" + theSubCap + "\""));    if (displayedCaption.childNodes.length > 1) {      displayedCaption.replaceChild(inserted, displayedCaption.lastChild);      }    else {      displayedCaption.appendChild(inserted);      }    }	    if (typeof theSubCap == "undefined" && displayedCaption.childNodes.length > 1) {    displayedCaption.removeChild(displayedCaption.lastChild);    }  document.images.imgPhoto.src = "assets/" + photoSRC;}  // this function is need to work around   // a bug in IE related to element attributes  function hasClass(obj) {     var result = false;     if (obj.getAttributeNode("class") != null) {         result = obj.getAttributeNode("class").value;     }     return result;  }    function stripe(id) {    // the flag we'll use to keep track of     // whether the current row is odd or even    var even = false;      // if arguments are provided to specify the colours    // of the even & odd rows, then use the them;    // otherwise use the following defaults:    var evenColor = arguments[1] ? arguments[1] : "#fff";    var oddColor = arguments[2] ? arguments[2] : "#eee";      // obtain a reference to the desired table    // if no such table exists, abort    var table = document.getElementById(id);    if (! table) { return; }        // by definition, tables can have more than one tbody    // element, so we'll have to get the list of child    // &lt;tbody&gt;s     var tbodies = table.getElementsByTagName("tbody");    // and iterate through them...    for (var h = 0; h < tbodies.length; h++) {         // find all the &lt;tr&gt; elements...       var trs = tbodies[h].getElementsByTagName("tr");            // ... and iterate through them      for (var i = 0; i < trs.length; i++) {	    // avoid rows that have a class attribute        // or backgroundColor style	    if (!hasClass(trs[i]) && ! trs[i].style.backgroundColor) {          // get all the cells in this row...          var tds = trs[i].getElementsByTagName("td");                  // and iterate through them...          for (var j = 0; j < tds.length; j++) {                    var mytd = tds[j];            // avoid cells that have a class attribute            // or backgroundColor style	        if (! hasClass(mytd) && ! mytd.style.backgroundColor) {        		      mytd.style.backgroundColor = even ? evenColor : oddColor;                          }          }        }        // flip from odd to even, or vice-versa        even =  ! even;      }    }  }