<!--

//if (window.top != window.self) {
//	window.top.location = window.location;
//}

//var screenWidthPixels = screen.width;
//var screenHeightPixels = screen.height;

var showHideFlag = 0 ;
var externalAlertFlag = false;

function changecss(theClass,element,value) {
	//documentation for this script at http://www.shawnolson.net/a/503/
	var cssRules;
	if (document.all) {
  		cssRules = 'rules';
	}
	else if (document.getElementById) {
		cssRules = 'cssRules';
	}
	for (var S = 0; S < document.styleSheets.length; S++){
		for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
			if (document.styleSheets[S][cssRules][R].selectorText == theClass) {
	    		document.styleSheets[S][cssRules][R].style[element] = value;
	   		}
	  	}
	 }	
}

// Show hide a DIV - each time it is called, it flip flops between show and hide

function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}









// Removes excess dots on the ends of URLS

var urlString = location.href
var lastOne = urlString.substring(urlString.length - 1);
if (lastOne == "." ) {
	window.location = (urlString.substring(0,urlString.length-1));
}


function emptySearch(){
document.SearchForm.SEARCH_STR.value = ""
	}

function MM_displayStatusMsg(msgStr)  { //v3.0
	status=msgStr; document.MM_returnValue = true;
}

function openWin(wName,wURL) {
	window.open(wURL,wName,'Scrollbars=no,Status=yes,directories=no,titlebar=no,width=500,screenX=0,screenY=0,height=340');
}

function MM_popupMsg(theMsg) { //v2.0
  alert(theMsg);
}
	
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_displayStatusMsg(msgStr) { //v2.0
  status=msgStr;
  document.MM_returnValue = true;
}

function MM_openRandomWindow(theURL,features) { 
	var randomNumber = Math.floor(32767*Math.random()+1)
	window.open(theURL,randomNumber,features);
}

function MM_openRatesWindow(theURL,winName,features) { //v2.0
  alert("Remember to enter all 8 digits (including zeros) of your reference number.\n\nIf you have any problems, refer to \'Problems and Tips\' at the bottom of the page you have just come from.\n\nA payment window will open once you click OK");
  window.open(theURL,winName,features);
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function showData(id, show) {
   document.all[id].style.display = show;
}

function buttonHover(loc,cls){
	if(loc.className)
		loc.className=cls;}

function form_check(casey_feedback)
{
  if (document.casey_feedback.radio_value[0].checked == false && document.casey_feedback.radio_value[1].checked == false)
  {
    alert("\nWas this page useful? Please click \'Yes\' or \'No\' and include some comments before you click \'Send\'.\n\nClick OK to continue.\n");
    return (false);
  }
  
/*  
  if ( casey_feedback.COMMENTS.value == "")
  {
    alert("\nWe'd ask you tell us why you found this page helpful.\n\nPlease note that this form is for comments about the information on this page only.\n\nIf you have a request or query, please go to the \'Contact Us\' section on the website.\n\nClick OK to continue.\n");
    commentsFlag = 1;
    return (false);
  }

  if ( casey_feedback.COMMENTS.value == "")
  {
    alert("\nWe'd ask you tell us why you didn't find this page helpful.\n\nPlease note that this form is for comments about the information on this page only.\n\nIf you have a request or query, please go to the \'Contact Us\' section on the website.\n\nClick OK to continue.\n");
    commentsFlag = 1;
    return (false);
  }
    

  if (document.casey_feedback.radio_value[0].checked == true && casey_feedback.contact_me.checked == true && casey_feedback.COMMENTS.value == "")
  {
    alert("\nIf you\'d like to be contacted by us, we'd ask you tell us why you\nfound this page helpful.\n\nPlease note that this form is for comments about the information on this page only.\n\nIf you have a request or query, please go to the \'Contact Us\' section on the website.\n\nClick OK to continue.\n");
   commentsFlag = 1;
     
   // casey_feedback.email.focus();
    return (false);
  }

    if (document.casey_feedback.radio_value[1].checked == true && casey_feedback.contact_me.checked == true && casey_feedback.COMMENTS.value == "")
  {
    alert("\nIf you\'d like to be contacted by us, we'd ask you tell us why you\ndidn't find this page helpful.\n\nPlease note that this form is for comments about the information on this page only.\n\nIf you have a request or query, please go to the \'Contact Us\' section on the website.\n\nClick OK to continue.\n");
   commentsFlag = 1;
   
   // casey_feedback.email.focus();
    return (false);
  }

*/
  
  
  if (casey_feedback.contact_me.checked == true && casey_feedback.comments.value == "")
  {
    alert("\nIf you\'d like to be contacted by us, please include comments about the information on this page.\n\nClick OK to continue.\n");
   // casey_feedback.email.focus();
    return (false);
  }
  
  if (casey_feedback.contact_me.checked == true && casey_feedback.email.value == "")
  {
    alert("\nIf you\'d like to be contacted by us, please include your email address so that we can reply to you.\n\nClick OK to continue.\n");
   // casey_feedback.email.focus();
    return (false);
  }
 
  return (true);
 
}

function GP_popupConfirmMsg(msg) { //v1.0
  document.MM_returnValue = confirm(msg);
}

function contact_form_check(casey_contact_feedback)
{
  if (casey_contact_feedback.CM_NAME.value == "")
  {
    alert("Please remember to include your name and phone number,\nemail address or postal address so that we may contact you.");
    // casey_contact_feedback.CM_NAME.focus();
    return (false);
  }

  if ((casey_contact_feedback.CM_PHONE_AH.value == "") && (casey_contact_feedback.CM_EMAIL.value == "") && (casey_contact_feedback.CM_PHONE_MOB.value == "") && (casey_contact_feedback.CM_PHONE_BH.value == "") && (casey_contact_feedback.CM_STREET.value == ""))
  {
    alert("Please remember to include your name and phone number,\nemail address or postal address so that we may contact you.");
    return (false);
  }
  return (true);
}

var commentsFlag = 0;


// Anti Double Clicker

var clicks = 0;
function countClicks() {
	clicks++;
	if (clicks > 1) {
		alert ("Please click the Submit button only once.");
		return false;
	} else {
		return true;
	}
}

// Show / hide layer

function toggleVisibility(id, NNtype, IEtype, WC3type) {
    if (document.getElementById) {
        eval("document.getElementById(id).style.visibility = \"" + WC3type + "\"");
    } else {
        if (document.layers) {
            document.layers[id].visibility = NNtype;
        } else {
            if (document.all) {
                eval("document.all." + id + ".style.visibility = \"" + IEtype + "\"");
            }
        }
    }
}

/* 
	Begin functions: Article Search Suggest  
	Adapted from http://www.objectgraph.com/dictionary/
*/

	var req;
	var urlArticleSearch ="/search/quickSearch.asp?search_str=";
	
	function SendSearchQuery(key)
	{
		toggleVisibility('autocomplete','hidden','hidden','hidden');
		Initialize();
		
		// Closes query if ESCape key is pressed		
		if (event.keyCode == 27 )
			{
		 	toggleVisibility('quickSearchAutocomplete','hidden','hidden','hidden');
			return (false);
		}
		
		if(req!=null)
		{
			req.onreadystatechange = ProcessQuickSearch;
			req.open("GET", urlArticleSearch + key, true);
			req.send(null);
		}
	}
	
	function ProcessQuickSearch()
	{
		if (req.readyState == 4)
			{
			// only if "OK"
				if (req.status == 200)
				{
					if(req.responseText=="")
						//document.getElementById("autocomplete").innerHTML ="<span class='quickSuggest'><font color='#AAAAAA'>No results found</font></span>";
						document.getElementById("quickSearchAutocomplete").innerHTML ="<table cellpadding='2' cellspacing='0' border='0'><tr><td><table width='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='#999999'><tr><td height='30' valign='middle' align='left'><div style='color:#fff'><strong>&nbsp;&nbsp;&nbsp;Quick Search</strong></div></td><td align='right' valign='middle' class='quickSuggest'><a href=\"javascript:toggleVisibility('quickSearchAutocomplete','hidden','hidden','hidden')\" class=\"quickSuggest\">Close</a>&nbsp;&nbsp;</td></tr></table><table width='320' border='1' cellpadding='5' cellspacing='0' bordercolor='#492c01' bgcolor='#EEEEEE'><tr><td valign='top'><p style='color: #000; margin-bottom: 5px; '>No suggestions</p></p></td></tr></table></td></tr></table>";
					else
					{
						ShowDiv("quickSearchAutocomplete");
						document.getElementById("quickSearchAutocomplete").innerHTML =req.responseText;
					}
				}
				else
				{
					//document.getElementById("autocomplete").innerHTML="There was a problem retrieving data:<br>"+req.statusText;
					document.getElementById("quickSearchAutocomplete").innerHTML ="<table cellpadding='2' cellspacing='0' border='0'><tr><td><table width='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='#694c21'><tr><td height='30' valign='middle' align='left'><div style='color:#fff'><strong>&nbsp;&nbsp;&nbsp;Quick Search</strong></div></td><td align='right' valign='middle' class='quickSuggest'><a href=\"javascript:toggleVisibility('quickSearchAutocomplete','hidden','hidden','hidden')\" class=\"quickSuggest\">Close</a>&nbsp;&nbsp;</td></tr></table><table width='320' border='1' cellpadding='5' cellspacing='0' bordercolor='#492c01' bgcolor='#EEEEEE'><tr><td valign='top' class='quickSuggest'>There was a problem:<br />" + req.statusText + "</td></tr></table></td></tr></table>";
				}
			}
	}

	function FocusOnQuickSearch()
	{
		document.SearchForm.SEARCH_STR.focus();
	
	}
	
	function ShowDiv(divid)
	{
	   if (document.layers) document.layers[divid].visibility="show";
	   else document.getElementById(divid).style.visibility="visible";
	}
	
	function HideDiv(divid)
	{
	   if (document.layers) document.layers[divid].visibility="hide";
	   else document.getElementById(divid).style.visibility="hidden";
	}
	
	function Initialize()
	{
		try
		{
			req=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(e)
		{
			try
			{
				req=new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(oc)
			{
				req=null;
			}
		}
		if(!req&&typeof XMLHttpRequest!="undefined")
		{
			req=new XMLHttpRequest();
		}
	}
	

/* 
	End functions: Article Search Suggest 
*/



























function FocusOnArticleSearch()
{
	document.SearchForm.SEARCH_STR.focus();
}


/*

StyleSwitcher - loads up larger font CSS style sheets

*/

function fontsizeup() {
  active = getActiveStyleSheet();
  switch (active) {
    case 'A--' : 
      setActiveStyleSheet('A-');
      break;
    case 'A-' : 
      setActiveStyleSheet('A');
      break;
    case 'A' : 
      setActiveStyleSheet('A+');
      break;
    case 'A+' : 
    //  setActiveStyleSheet('A++');
      break;
    case 'A++' :
      break;
    default :
      setActiveStyleSheet('A');
      break;
  }
}

function fontsizedown() {
  active = getActiveStyleSheet();
  switch (active) {
    case 'A++' : 
      setActiveStyleSheet('A+');
      break;
    case 'A+' : 
      setActiveStyleSheet('A');
      break;
    case 'A' : 
      setActiveStyleSheet('A-');
      break;
    case 'A-' : 
      //setActiveStyleSheet('A--');
      break;
    case 'A--' : 
       break;
    default :
      setActiveStyleSheet('A--');
      break;
  }
}

function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  return ('A-');
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

/* onload and onunload functions now in the #bodyOnLoadCommand# in ASP script 
window.onload = function(e) {
  var cookie = readCookie("style");
  var title = cookie ? cookie : getPreferredStyleSheet();
  setActiveStyleSheet(title);
}

window.onunload = function(e) {
  var title = getActiveStyleSheet();
  createCookie("style", title, 365);
}
*/
var cookie = readCookie("style");
var title = cookie ? cookie : getPreferredStyleSheet();
if (title == 'null') {
  title = getPreferredStyleSheet();
}

setActiveStyleSheet(title);


/* 
	End functions: StyleSwitcher
*/

/************* MAPPING ***************/

function showMap (insertafter, width, latitude, longitude, caption) {
	if (!insertafter) return true;
	if (!width) var width = '100%';
	if (!latitude) return true;
	if (!longitude) return true;
	if (!caption) var caption = '';
	if (insertafter.nextSibling != null && classExists(insertafter.nextSibling, 'map')) { // collapse video player if already open
		if (insertafter != null) classRemove(insertafter, 'active');
		insertafter.nextSibling.parentNode.removeChild(insertafter.nextSibling);
	}
	else {
		classAdd(insertafter, 'active');
		var div = document.createElement('DIV');
		div.className = 'map';
		div.style.width = width;
		div.style.height = '1px';
		insertafter.parentNode.insertBefore(div, insertafter.nextSibling);
		resize16x9(div);
		div.innerHTML = ('<iframe src="http://www.abc.net.au/news/maps/smallmap.htm?latitude='+encodeURIComponent(latitude)+'&amp;longitude='+encodeURIComponent(longitude)+'&amp;caption='+encodeURIComponent(caption)+'" width="100%" height="100%" frameborder="0" scrolling="no"></iframe>');
	}
	if (insertafter.blur) insertafter.blur(); // removes dotted outline from link in Mozilla browsers
	return false;
}

function copyToClipboard()
{
var x=document.getElementById('copythis');
document.form.copyArea.value=x.innerHTML;
y = document.form.copyArea.createTextRange();
y.select();
y.execCommand("Copy");
}

//-->