function resize(which, max) {
  var elem = document.getElementById(which);
  if (elem == undefined || elem == null) return false;
  if (max == undefined) max = 100;
  if (elem.width > elem.height) {
    if (elem.width > max) elem.width = max;
  } else {
    if (elem.height > max) elem.height = max;
  }
  elem.style.display = "inline";
}

function displayElement(elemId,action) {
  var object = document.getElementById(elemId);
  if(action == "show" ) {
    object.style.display = "";
  }
  else {
    object.style.display = "none";
  }
}

function displayBlock(sourceText){
	var temp = new Array();
	temp = sourceText.split("/");
	for(var i=1;i<=temp[2];i++){
		displayElement(temp[0]+i,"hide");
	}
	displayElement(temp[0]+temp[1],"show");
}