<!-- Hide from old browsers 

// Javascripts: 

// ****************** FORM VALIDATION ROUTINES *********************** //

function checkUserInput() {
				 
			//Has a name been entered? Notify user if comments have not been entered.
  if (document.Survey_Form.any_name.value=="") {
			   window.alert("Thanks! Click to Send.")
			   documents.Survey_Form.any_name.focus()
			   return false
	  }     // END IF condition //
			
			//All validation correct
			return true
			}

// ***************** END FORM VALIDATION SECTION ********************* //

// **********************  MATHS FUNCIONS **************************** //

function square() {
                             // REF: The Survey Guy
i = 1                        // Initialise the count //
T = 0                        // Zero the total
S = 0                        // Zero the square
while (i <= 20) {
  document.write("<tr>")     // For index value, open a table row. //
  document.write("<td>")     // Open 1st table item. //
  document.write(i)          // Write the index .. //
  document.write("</td>")    // Close 1st table item //
  document.write("<td>")     // Open 2nd table item //
  S = i*i                    // 
  document.write(S)          // Write the square value //
  document.write("</td>")    // Close the 2nd table item //
  document.write("</tr>")    // Close this row ... //
  T = S + T                  // Add the squares
  i++                        // Increment the index
  
  }                          // END while loop
 }                           // END Square function
 
// ******************* END MATHS Functions *******************  //


// .....................  START Random Images ............. 
// Randomly pick a background image to display upon page load.

bkPix = new Array(
"./slide_show/HeraldSun_00.gif",
"./slide_show/HeraldSun_01.gif",
"./slide_show/HeraldSun_02.gif",
"./slide_show/Heraldsun_03.gif")
imgCt = bkPix.length

function anyPic() {
	if (document.images) {
		randomNum = Math.floor((Math.random()*imgCt))
		document.myPicture.src = bkPix[randomNum]
	}
}
//   ..............  END Random images ......................................  

//   ..............  Open Google Earth Window height=480  .................. 
function openWin_GE(URL) {
  aWindow_GE=window.open(URL, "rules_window", "toolbar=yes,width=600, height=400, status=no,scrollbars=yes,resize=yes,menubar=no");
  }
// ...............  End Google Earth Window Function  .............................

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
} 

/* ........... Time & Date Scripts, courtesy Janet Bott, Swinburne ................ */

 // display current date and time
 // SOURCE: Janet bott, Swinburne TAFE.
 // Problem: this writes the date & time all on the one line. How do u break the LocaleString?
          function displayDate()
          {
              var now=new Date()
              document.write(now.toLocaleString())
          }
          // calculate and display current time
		  function showTime()
		  {
		       var now=new Date()
			   var h=now.getHours()
			   var m=now.getMinutes()
			   var s=now.getSeconds()
			   
			  // var elapsedTime=0
			   
			   // add 0 in front of numbers less than 10
			   m=checkTime(m)
			   s=checkTime(s)
			   
			   document.getElementById('etime').innerHTML=h +":" +m +":" +s
			   
			   //elapsedTime = elapsedTime + s
			  //  document.write(elapsedTime.toLocaleString())	   
			   setTimeout("showTime()", 1000)
		 }
		 
		 function checkTime(value)
		 {
		       if (value<10) {
			       value="0" +value
			   }
			   return value
		}

/* ............ END Time & Date Scripts ..................................... */

// .........  End hiding from old browsers  ............................. 
 -->
