function showhide(table, key){
 theRows=document.getElementById(table).rows
 reg=new RegExp("^"+key)
 for (i=0;i<theRows.length;i++)
  if (reg.test(theRows[i].id))
     if  (theRows[i].style.display=="none")
       theRows[i].style.display=""
       else
       theRows[i].style.display="none"  
}

function highlightrows(table, key){
 theRows=document.getElementById(table).rows
 reg=new RegExp("^"+key)
 for (i=0;i<theRows.length;i++)
  if (reg.test(theRows[i].id)) {
  	theCells=theRows[i].cells
	 for(j=0;j<theCells.length;j++) {
       theCells[j].style.borderStyle="none"
       theCells[j].style.borderWidth="0px"
	 }
  }
}

function unhighlightrows(table, key){
 theRows=document.getElementById(table).rows
 reg=new RegExp("^"+key)
 for (i=0;i<theRows.length;i++)
  if (reg.test(theRows[i].id)) {
  	theCells=theRows[i].cells
	 for(j=0;j<theCells.length;j++) {
       theCells[j].style.borderStyle="none"
       theCells[j].style.borderWidth="0px"
	 }
  }
}

function togglelogfilter(image){
	var src = image.src
	var reg = new RegExp("^(.*/[^/]+)(_off|_on)(\\.[a-zA-Z0-9]+)$")
	var results = reg.exec(src)
	
	if(results==null)
		return false
	
	if(results[2]=='_on')
		image.src=results[1]+'_off'+results[3]
	else
		image.src=results[1]+'_on'+results[3]
}
