/*
* This function will alter visibility
*/
function visibilityElement(ID_, visibility_) {
	var tab = document.getElementById(ID_);
	tab.style.visibility = visibility_;
}


/*
* This function will somehow calculate absolute position of an element... i dont get it, but it works so what the hell.
*/
function getElementPosition(elemID){
	var offsetTrail = document.getElementById(elemID);
	var offsetLeft = 0;
	while (offsetTrail){
		offsetLeft += offsetTrail.offsetLeft;
		offsetTrail = offsetTrail.offsetParent;
	}
	if (navigator.userAgent.indexOf('Mac') != -1 && typeof document.body.leftMargin != 'undefined'){
		offsetLeft += document.body.leftMargin;
	}
	return offsetLeft;
}
