function hideshow(id) {
  imgname = id + "img";

  iLen = String(document.images[imgname].src).length;
  //alert(iLen);
  teststring = String(document.images[imgname].src).substring(iLen, iLen - 8);

  //alert(teststring);
  if(teststring == "plus.gif") {		
	document.images[imgname].src="diyimg/minus.gif";
	showdiv(id);
  }
  else {
	document.images[imgname].src="diyimg/plus.gif";
	hidediv(id);
  }
}
function hidediv(id) {
  //safe function to hide an element with a specified id
  
  for(var i = 0; i < document.getElementsByName(id).length; i++) {
	var currentElement = document.getElementsByName(id)[i];
	currentElement.style.display = 'none';
  }
}

function showdiv(id) {
  for(var i = 0; i < document.getElementsByName(id).length; i++) {
	var currentElement = document.getElementsByName(id)[i];
	currentElement.style.display = 'block';
  }
}


