// JavaScript Document
function setVisibility(divname, visible) {
	e = findElement(divname);
//	alert(e.style.visibility);
	if (e) {
		if (visible) {
			e.style.visibility = "visible";
		}
		else {
			e.style.visibility = "hidden";
		}
	}
//	alert(e.style.visibility);
}

function findElement(id) {
	// alert("Find Element "+id);
  e = null;
  if (document.getElementById) { // is this a DOM compliant browser
    // alert('getElementById');
    e = document.getElementById(id);
  }
  else if (document.all) {  // well, then is the IE API is supported
    // alert('document.all');
	e = document.all[id];
  }
  else if (document.layers) {  // well, then Netscape API is supported
    // alert('document.layers');
  	e = document.layers[id];
  }
  else {
    alert("Could not get element due to incompatible browser");
  }	
  return e;
}  

function FindElement(id) {return findElement(id) };


function getScrollY() {
	if (document) {
		top1 = document.body.scrollTop;
		top2 = document.documentElement.scrollTop;
		if (top1 == 0)
			return top2;
		else
			return top1;
	}
	return 0;
}
