function twoColGetHeight(){
var d=document;
var box=new Array("page-content-wide","local-nav-menu-bar");
for(x=0;x<box.length;x++){
h=d.getElementById(box[x]).offsetHeight;
for(y=0;y<box.length;y++){
test_h=d.getElementById(box[y]).offsetHeight;
if(h<test_h)h=test_h;
}
}
for(x=0;x<box.length;x++)d.getElementById(box[x]).style.height=h+"px";
//if(navigator.userAgent.indexOf("Opera")!=-1){
//var versionindex=navigator.userAgent.indexOf("Opera")+6
//if(parseInt(navigator.userAgent.charAt(versionindex))>=8){
//document.getElementById("watermarkLogo").style.backgroundImage='none';
//document.getElementById("watermarkZone").style.display='none';
//}
//}
swapPic()
}
function threeColGetHeight(){
var d=document;
var box=new Array("site-nav-menu-bar","page-content-narrow","local-nav-menu-bar");
for(x=0;x<box.length;x++){
h=d.getElementById(box[x]).offsetHeight;
for(y=0;y<box.length;y++){
test_h=d.getElementById(box[y]).offsetHeight;
if(h<test_h)h=test_h;
}
}
for(x=0;x<box.length;x++)d.getElementById(box[x]).style.height=h+"px";
//if(navigator.userAgent.indexOf("Opera")!=-1){
//var versionindex=navigator.userAgent.indexOf("Opera")+6
//if(parseInt(navigator.userAgent.charAt(versionindex))>=8){
//document.getElementById("watermarkLogo").style.backgroundImage='none';
//document.getElementById("watermarkZone").style.display='none';
//}
//}
swapPic()
}
function threeColGetHeight_SecondLevel(){
var d=document;
var box=new Array("site-nav-menu-bar","page-content-narrow","local-nav-menu-bar");
for(x=0;x<box.length;x++){
h=d.getElementById(box[x]).offsetHeight;
for(y=0;y<box.length;y++){
test_h=d.getElementById(box[y]).offsetHeight;
if(h<test_h)h=test_h;
}
}
for(x=0;x<box.length;x++)d.getElementById(box[x]).style.height=h+"px";
//if(navigator.userAgent.indexOf("Opera")!=-1){
//var versionindex=navigator.userAgent.indexOf("Opera")+6
//if(parseInt(navigator.userAgent.charAt(versionindex))>=8){
//document.getElementById("watermarkLogo").style.backgroundImage='none';
//document.getElementById("watermarkZone").style.display='none';
//}
//}

}
function twoColGetHeight_SecondLevel(){
var d=document;
var box=new Array("page-content-narrow-third-level-rhimage","local-nav-menu-bar");
for(x=0;x<box.length;x++){
h=d.getElementById(box[x]).offsetHeight;
for(y=0;y<box.length;y++){
test_h=d.getElementById(box[y]).offsetHeight;
if(h<test_h)h=test_h;
}
}
for(x=0;x<box.length;x++)d.getElementById(box[x]).style.height=h+"px";
//if(navigator.userAgent.indexOf("Opera")!=-1){
//var versionindex=navigator.userAgent.indexOf("Opera")+6
//if(parseInt(navigator.userAgent.charAt(versionindex))>=8){
//document.getElementById("watermarkLogo").style.backgroundImage='none';
//document.getElementById("watermarkZone").style.display='none';
//}
//}
third_level_rhimage_swapPic()
}

function adjustScreen(){
if(screen.width==800){
document.getElementById("column1").style.fontSize="11px";
document.getElementById("column2").style.fontSize="11px";
document.getElementById("column3").style.fontSize="11px";
document.getElementById("column4").style.fontSize="11px";
document.getElementById("column5").style.fontSize="11px";
document.getElementById("column6").style.fontSize="11px";
}
}
function checkNull4Search(){
if(document.forms[0].description.value==""){
return false;
}
else{
document.forms[0].submit();
}
}

function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
var pair = vars[i].split("=");
if (pair[0] == variable) {
return pair[1];
}
} 
}


function swapPic()
 {
 if(document.getElementById)
   {
   var thePicture=document.getElementById("main-image");
   var picPath="images/banner/"+rnd(6)+".jpg";
   thePicture.style.background="url("+picPath+") no-repeat center"; /* this line was amended by adding the repeat and center behaviour. without this, the css cannot control the centering of the image - kw 16/6/06*/
   
   }
 }

function third_level_rhimage_swapPic()
 {
 if(document.getElementById)
   {
   var thePicture=document.getElementById("index2ImageList");
   var picPath="images/third_level_rhimage/"+rnd(5)+".jpg";
   thePicture.style.background="url("+picPath+") no-repeat center"; /* this line was amended by adding the repeat and center behaviour. without this, the css cannot control the centering of the image - kw 16/6/06*/
   
   }
 }


function rnd(n)
 {
 return Math.floor(Math.random() * n) + 1;
 }



 if (getQueryVariable("SQ_DESIGN_NAME") == "printer_friendly"){
    document.write("<link rel=\"stylesheet\" href=\"css/print.css\" type=\"text/css\" >");
 }
 else{
    document.write("<link rel=\"stylesheet\" href=\"css/screen.css\" type=\"text/css\" >");

 }

var normalFont = 1.2;

function setPlusText() {
  normalFont= normalFont+0.1;
  size= normalFont+"em";
  document.getElementById('page-content').style.fontSize = size;   
  //document.getElementById('local-nav-menu-bar').style.fontSize = size;
  //document.getElementById('global-nav-menu-bar').style.fontSize = size;
  //document.getElementById('site-nav-menu-bar').style.fontSize = size;
  return false;
}
function setMinusText() {
  normalFont= normalFont-0.1;
  size= normalFont+"em";
  document.getElementById('page-content').style.fontSize = size; 
  //document.getElementById('local-nav-menu-bar').style.fontSize = size;
  //document.getElementById('global-nav-menu-bar').style.fontSize = size;
  //document.getElementById('site-nav-menu-bar').style.fontSize = size;
  return false;
}


function openPrinterDoc(){
   window.open('?SQ_DESIGN_NAME=printer_friendly','win1','width=700,height=350');
}

function msg(){
return confirm('You are now leaving the Department of Justice website to go to the Northern Territory Government Newsroom');
}