function rollOverOn(myID){
  
  theThing = document.getElementById(myID);
   
  var theThingSrc = theThing.src 
  
  var theThingSrcA = new Array();
  
  var findTheThingExt = theThingSrc.lastIndexOf('.');
  
  theThingSrcA[0] = theThingSrc.substring(0,findTheThingExt);
  theThingSrcA[1] = theThingSrc.substr(findTheThingExt,4);
  
  theThing.src = theThingSrcA[0] + '_x' + theThingSrcA[1];
}


function rollOverOff(myID){

  theThing = document.getElementById(myID);
  
  var theThingSrc = theThing.src 
  
  var theThingSrcA = new Array();
  
  var findTheThingExt = theThingSrc.lastIndexOf('.');
  
  theThingSrcA[0] = theThingSrc.substring(0,findTheThingExt);
  theThingSrcA[1] = theThingSrc.substr(findTheThingExt,4);
  
  theThing.src = theThingSrcA[0].substring(0,(theThingSrcA[0].length-2)) + theThingSrcA[1];
}




/*

function setRollOvers(){
  try{
	document.getElementById('nav01').onmouseover = function(){rollOverOn('nav01');} 
	document.getElementById('nav01').onmouseout = function(){rollOverOff('nav01');}
	}
	catch(err){
  }
  
  try{
	document.getElementById('nav02').onmouseover = function(){rollOverOn('nav02');} 
	document.getElementById('nav02').onmouseout = function(){rollOverOff('nav02');}
	}
	catch(err){
  }
  
  try{
	document.getElementById('nav03').onmouseover = function(){rollOverOn('nav03');} 
	document.getElementById('nav03').onmouseout = function(){rollOverOff('nav03');}
  }
	catch(err){
  }
  
  try{
	document.getElementById('nav04').onmouseover = function(){rollOverOn('nav04');} 
	document.getElementById('nav04').onmouseout = function(){rollOverOff('nav04');}
  }
	catch(err){
  }
  
  try{
	document.getElementById('nav05').onmouseover = function(){rollOverOn('nav05');} 
	document.getElementById('nav05').onmouseout = function(){rollOverOff('nav05');}
  }
	catch(err){
  }
  
}


function setSubRollOvers(){
  try{
	document.getElementById('sub-nav01').onmouseover = function(){rollOverOn('sub-nav01');} 
	document.getElementById('sub-nav01').onmouseout = function(){rollOverOff('sub-nav01');}
	}
	catch(err){
  }
  
  try{
	document.getElementById('sub-nav02').onmouseover = function(){rollOverOn('sub-nav02');} 
	document.getElementById('sub-nav02').onmouseout = function(){rollOverOff('sub-nav02');}
	}
	catch(err){
  }
  
  try{
	document.getElementById('sub-nav03').onmouseover = function(){rollOverOn('sub-nav03');} 
	document.getElementById('sub-nav03').onmouseout = function(){rollOverOff('sub-nav03');}
  }
	catch(err){
  }
  
  try{
	document.getElementById('sub-nav04').onmouseover = function(){rollOverOn('sub-nav04');} 
	document.getElementById('sub-nav04').onmouseout = function(){rollOverOff('sub-nav04');}
  }
	catch(err){
  }
  
  try{
	document.getElementById('sub-nav05').onmouseover = function(){rollOverOn('sub-nav05');} 
	document.getElementById('sub-nav05').onmouseout = function(){rollOverOff('sub-nav05');}
  }
	catch(err){
  }
  
  try{
	document.getElementById('sub-nav06').onmouseover = function(){rollOverOn('sub-nav06');} 
	document.getElementById('sub-nav06').onmouseout = function(){rollOverOff('sub-nav06');}
  }
	catch(err){
  }
  
}


*/







//var t;

function expand(theName){
  /*alert("height = '" + document.getElementById('more-info-' + theName).style.height + "'");
  clearTimeout(t);
  document.getElementById('more-info-' + theName).style.height='300%';*/
}



function showInfo(theName){
  //containerHeight.toggle();
}

/*
function showInfo(theName){
  if(document.getElementById('more-info-' + theName).style.display == 'none'){
		
		document.getElementById('more-info-' + theName).style.display='';
		//t = setTimeout("expand("+theName+")", 10);
		document.getElementById('toggle-button-arrow-' + theName).src = 'graphics/reports/collapse.gif';
		//document.getElementById('toggle-button-arrow-' + theName).className = 'toggle-button-arrow flipped';

		//document.getElementById('toggle-button-' + theName).className = 'toggle-button on';
		//document.getElementById('toggle-button-' + theName).innerHTML = 'Collapse';
		
  }
  else{
  	
  	document.getElementById('more-info-' + theName).style.display='none';
		
		document.getElementById('toggle-button-arrow-' + theName).src = 'graphics/reports/expand.gif';
		//document.getElementById('toggle-button-arrow-' + theName).className = 'toggle-button-arrow';
		
		//document.getElementById('toggle-button-' + theName).className = 'toggle-button';
		//document.getElementById('toggle-button-' + theName).innerHTML = 'Expand';
		
  }

  
}*/


function switchButton(id){
  //alert("switch" + document.getElementById('toggle-button-arrow-' + id).src);
  if( document.getElementById('toggle-button-arrow-' + id).src == 'http://www.oag.mb.ca/graphics/reports/expand.gif'){
    document.getElementById('toggle-button-arrow-' + id).src = 'http://www.oag.mb.ca/graphics/reports/collapse.gif';
  }
  else{
    document.getElementById('toggle-button-arrow-' + id).src = 'http://www.oag.mb.ca/graphics/reports/expand.gif';
  }

}



