/**
 *
 * @access public
 * @return void
 **/
function showHelp(id, visible)
{
	if ( visible == 1 )
		document.getElementById(id).style.display = 'block';
	else
		document.getElementById(id).style.display = 'none';
}

function showcover(url)
{	fenster_c=window.open(url,"Titelseite","toolbar=no,menubar=no,location=no,scrollbar=no,height=560,width=420");
	fenster_c.focus();
	return false;
}

function popUpInfo(url, title, features)
{
	win = window.open(url, title, features);
	win.focus();
	return false;
}

var isIE = (navigator.appName.toLowerCase().indexOf('internet explorer')+1?1:0);

var fieldtip = {
	leftPos : 0,  /* used for the tip-field offset left */
	topPos : -4, /* used for the tip-field offset top */
	tipClass : 'hint', /* assumed classname for the tip, used to _find_ it */
	activeTip : null, /* used to store the active tip */
	get : function(parent) {
		for(var i = 0; i < parent.childNodes.length; i++){

			if(parent.childNodes[i].className && parent.childNodes[i].className.indexOf(this.tipClass) > -1 ){
				return parent.childNodes[i]; //found the tip, YAY!
			}//nope, keep looking then
		}
		return null;// didn't find the tip, BORK!
	},
	show : function(t){
		var _fieldTop = t.offsetTop;
		var _fieldLeft = t.offsetLeft;

		var _y = _fieldTop;
		var _x = _fieldLeft;

		this.activeTip = this.get(t.parentNode);
		var _tipHeight = this.activeTip.offsetHeight;

		var _tipCanvas = document.getElementsByTagName((document.compatMode && document.compatMode == "CSS1Compat") ? "HTML" : "BODY")[0];

		var _canvWidth = (_tipCanvas.clientWidth) ? _tipCanvas + _tipCanvas.scrollLeft : window.innerWidth + window.pageXOffset;
		var _canvHeight = (window.innerHeight) ? window.innerHeight + window.pageYOffset : _tipCanvas.clientHeight + _tipCanvas.scrollTop;

		//this.activeTip.style.width = ((this.activeTip.max_width) && (this.activeTip.offsetWidth > this.activeTip.max_width)) ? this.max_width + "px" : "auto";

		this.activeTip.style.left = (_x + this.leftPos) + "px";
		this.activeTip.style.top = (_y + this.topPos - _tipHeight) + "px";

		if (isIE) {
			this.activeTip.style.left = "0px";
		}

		/* check canvas bounds */
		if( _x + this.activeTip.offsetWidth > _canvWidth ){
			this.activeTip.style.left = (_canvWidth - this.activeTip.offsetWidth) + "px";
		}
		if( _y + this.activeTip.offsetHeight > _canvHeight ){
			this.activeTip.style.top = (_canvHeight - this.activeTip.offsetHeight) + "px";
		}

		this.activeTip.style.visibility = "visible";
	},
	hide : function(){
		if(this.activeTip != null){
			this.activeTip.style.visibility = "hidden";
			this.activeTip = null;
		}
	}

}