/*/
	Template: RolloverImroc.js
	Author:	Alex Zui and Ralph Wayment of Streetnet Pty Ltd and x51 Pty Ltd
	Creation Date: 1999-11-21
        Modification Date: 2002-06-23
	Version: v3.52 of preloadImages() ...
	- any number of parameters
	- sequences of images enclosed in <>, e.g. <0-7>, with optionally up to 4 leading zeros e.g. <01-17>
	- 3.01 ... fix for Netscape, where parseInt() interprets a leading zero as an octal
	- 3.02 ... ANY number of leading zeros
/*/

function preloadImages() {
  var imgFiles, i, j, k, kb, kc;
  var s1, s2, s2s, s2sl, s2v, s2b, s3, s3s, s3sl, s3v, s3b, sl, bb, s1s, s4s;

  if (document.images) {
    imgFiles = preloadImages.arguments;
    if (document.preloadArray == null)
      document.preloadArray = new Array();
    i = document.preloadArray.length;
    with (document) {
      for (j = 0; j < imgFiles.length; j++) {
        s1 = imgFiles[j].indexOf('<');
        sl = imgFiles[j].length;
        if (s1 != -1) {
          s2s = imgFiles[j].substring(s1,sl); s2 = s2s.indexOf('-')+s1;
          if (s2 > s1+1) {
            s3s = imgFiles[j].substring(s2,sl); s3 = s3s.indexOf('>')+s2;
            if (s3 > s2+1) {
              s1s = imgFiles[j].substring(0,s1);
              s2s = imgFiles[j].substring(s1+1,s2); s2sl = s2s.length;
              s3s = imgFiles[j].substring(s2+1,s3); s3sl = s3s.length;
              s4s = imgFiles[j].substring(s3+1,sl);
              s2b = 0;
              while (s2sl > s2b+1 && s2s.substring(s2b,s2b+1) == '0') s2b++;
              s2v = parseInt(s2s.substring(s2b,s2sl));
              s3b = 0; 
              while (s3sl > s3b+1 && s3s.substring(s3b,s3b+1) == '0') s3b++;
              s3v = parseInt(s3s.substring(s3b,s3sl));
              for (k = s2v; k <= s3v; k++) {
                bb = s1s; kc = 10;
                for (kb = 0; kb < s2b; kb++) {
                  if (k < kc) bb += "0";
                  kc *= 10;
                }
                bb += k + s4s;
                preloadArray[i] = new Image;
                preloadArray[i++].src = bb;
              }
            }
          }
        }
        else {
          preloadArray[i] = new Image;
          preloadArray[i++].src = imgFiles[j];
        }
      }
    }
  }
}

function findObj(n, d) { //v4.0
  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=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function swapImage() { //v3.01
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-1);i+=2)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+1];}
}

function swapImgRestore() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

var xwin;
// focused image popup
function pop(url) {
	xwin = window.open(url,"xx",'top=15,left=15,width=560,height=465,status=no,scrollbars=yes,resizable=no');
  xwin.focus();
}
function pop2(url,width,height) {
  xwin = window.open(url,"xx",'top=15,left=15,width='+width+',height='+height+',status=no,scrollbars=yes,resizable=no');
  xwin.focus();
}


function unpop(loc) {
	window.opener.location.href=loc;
	window.opener.focus();
}

// focused results popup
function results(url) {
  var y = window.open(url,"yy",'top=15,left=15,width=690,height=510,status=no,scrollbars=yes,resizable=yes');
  y.focus();
}

// focused privacy popup
function priv(url) {
  var z = window.open(url,"zz",'top=15,left=15,width=600,height=510,status=no,scrollbars=yes,resizable=no');
  z.focus();
}

// go back one page
function previous()
{
	(history.go(-1));
	return;
}

// default submit actions
function submitaf(fld,actn,nm) {
	var frm = fld.form;
	frm.action = actn;
	if (nm) frm.fn.value = nm;
	else frm.fn.value = fld.name;	
	frm.submit();
}

function submitf(fld,nm) {
	var frm = fld.form;
	if (nm) frm.fn.value = nm;
	frm.fn.value = fld.name;
	frm.submit();
}

// quicklink re-direct
function shortc(){
selected=document.forms['shortcut'].shortdrop.selectedIndex;
loc=document.forms['shortcut'].shortdrop[selected].value;
document.location=loc;
}

if (top != self)
top.location.href = location.href;


function showdate(thedate)
{
  var a, b, d, y;

  if (!thedate) {
    a = new Date(document.lastModified);
    if (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) == "3") {
      y = a.getYear(); if (y < 30) { y += 2000; a.setYear(y); } else y += 1900;
    }
    else {
      y = a.getFullYear(); if (y < 1930) { y += 100; a.setFullYear(y); }
    }
    d = a.getDate().toString(); if (d.length == 1) d = "0"+d;
    b = a.toString();
    thedate = b.substring(0,4) + d + "-" + b.substring(4,7) + "-" + y;
  }
  document.write(thedate);
}