// SWAP IMAGES

function btnClick_tools(obj){
    obj.style.backgroundImage = (obj.style.backgroundImage.indexOf('dn')<0) ?
    "url('http://www.canberra.edu.au/__data/assets/image/0010/648289/btn_dn.gif')" : "url('http://www.canberra.edu.au/__data/assets/image/0011/648290/btn_up.gif')";
}


// FONT CONTROL

function increaseFontSize() {
	var min=9;
	var max=13;
	
   var li = document.getElementsByTagName('li');
   for(i=0;i<li.length;i++) {
      if(li[i].style.fontSize) {
         var s = parseInt(li[i].style.fontSize.replace("pt",""));
      } else {
         var s = 9;
      }
      if(s!=max) {
         s += 1;
      }
      li[i].style.fontSize = s+"pt"
   }
	var a = document.getElementsByTagName('a');
   for(i=0;i<a.length;i++) {
      if(a[i].style.fontSize) {
         var s = parseInt(a[i].style.fontSize.replace("pt",""));
      } else {
         var s = 9;
      }
      if(s!=max) {
         s += 1;
      }
      a[i].style.fontSize = s+"pt"
   }
	
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("pt",""));
      } else {
         var s = 9;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"pt"
   }
}
function decreaseFontSize() {
	var min=9;
	var max=13;
   
  var li = document.getElementsByTagName('li');
   for(i=0;i<li.length;i++) {
      if(li[i].style.fontSize) {
         var s = parseInt(li[i].style.fontSize.replace("pt",""));
      } else {
         var s = 9;
      }
      if(s!=min) {
         s -= 1;
      }
      li[i].style.fontSize = s+"pt"
   }   
   
   var a = document.getElementsByTagName('a');
   for(i=0;i<a.length;i++) {
      if(a[i].style.fontSize) {
         var s = parseInt(a[i].style.fontSize.replace("pt",""));
      } else {
         var s = 9;
      }
      if(s!=min) {
         s -= 1;
      }
      a[i].style.fontSize = s+"pt"
   }   
   
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("pt",""));
      } else {
         var s = 9;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"pt"
   }   
}
