/************************************************************************
 *
 *   FILE hide_go-up.js
 *   Framework "Charite - Campus Virchow-Klinikum - Klinik fuer Strahlenheilkunde"
 *   (C) 2004 Scotty - IPPO - Charite Berlin, CVK, Klinik fuer Strahlenheilkunde
 *
 * hide "Seitenanfang" link at bottom of page
 *
 ************************************************************************/


/************************************************************************
 *   FUNCTION hide_go_up()
 *
 * hide  "Seitenanfang" link if content height is smaller than browser window height
 ************************************************************************/

function hide_go_up() {
	var goUpBox;

	// get element to hide (browser dependent)
	if(document.layers)
		goUpBox = false;
	else if(document.all)
		goUpBox = document.all.go_up_box;
	else if(document.getElementById)
		goUpBox = document.getElementById("go_up_box");
	else
		goUpBox = false;

	if(goUpBox) {
		// get window heigth
		if(window.innerHeight)
			winHeight = window.innerHeight;
		else if(document.body.offsetHeight)
			winHeight = document.body.offsetHeight;
		else
			winHeight = 0;
		// get content heigth
		contHeight = goUpBox.offsetTop;

		if(winHeight > contHeight) {   // hide page top link and box
				goUpBox.style.visibility = "hidden";
				goUpBox.style.border = "none";
		}
	}
}
