
// Rotate pictures
var Pix1Count = 13; // No. of pictures in series 1
var Pix2Count = 8; // No. of pictures in series 2
var Pix3Count = 8; // No. of pictures in series 3
var Pix4Count = 15; // No. of pictures in series 4

var Pix1Idx = Math.ceil(Pix1Count * Math.random());
Pix1Idx = "" + Pix1Idx;
if (Pix1Idx.length < 2) {Pix1Idx = "0" + Pix1Idx;}
Pix1 = new Image();
Pix1.src = "graf/series1_" + Pix1Idx + ".gif";

var Pix2Idx = Math.ceil(Pix2Count * Math.random());
Pix2Idx = "" + Pix2Idx;
if (Pix2Idx.length < 2) {Pix2Idx = "0" + Pix2Idx;}
Pix2 = new Image();
Pix2.src = "graf/series2_" + Pix2Idx + ".gif";

var Pix3Idx = Math.ceil(Pix3Count * Math.random());
Pix3Idx = "" + Pix3Idx;
if (Pix3Idx.length < 2) {Pix3Idx = "0" + Pix3Idx;}
Pix3 = new Image();
Pix3.src = "graf/series3_" + Pix3Idx + ".gif";

var Pix4Idx = Math.ceil(Pix4Count * Math.random());
Pix4Idx = "" + Pix4Idx;
if (Pix4Idx.length < 2) {Pix4Idx = "0" + Pix4Idx;}
Pix4 = new Image();
Pix4.src = "graf/series4_" + Pix4Idx + ".gif";

function LoadPix() {
  document.images['Pix1'].src = Pix1.src;
  document.images['Pix2'].src = Pix2.src;
  document.images['Pix3'].src = Pix3.src;
  document.images['Pix4'].src = Pix4.src;
}

var HelpObject = null;  // initialize
function SearchHelp() {
  HelpObject = window.open("searchhelp.htm","searchhelp", "width=260,height=400,scrollbars,screenX=0,screenY=170,left=0,top=170");
}

var SearchObject = null;  //initialize
function Search() {
  SearchObject = window.open("searching.htm","searchpopup", "width=260,height=400,scrollbars,screenX=0,screenY=140,left=0,top=140");
  document.form1.submit();
}

function finalize() {
  if (HelpObject != null && !HelpObject.closed) {
    HelpObject.close();
  }
}

function ResetFields() {
  document.form1.reset();
}

function SelectState(SelectedState) {
  for (var i=0; i<document.form1.StateCode.length; i++) {
    if (document.form1.StateCode.options[i].value == SelectedState) {
      document.form1.StateCode.selectedIndex = i;
    }
  }
}

// Set default values for state times in case app server down
var time_act = "00:00";
var time_nsw = "00:00";
var time_nt = "00:00";
var time_qld = "00:00";
var time_sa = "00:00";
var time_tas = "00:00";
var time_vic = "00:00";
var time_wa = "00:00";

