//  Utility classes and functions for
//  prototip.
// 	author: Oliver Schneider


	/*
		pmd = pull down menu
	*/

	/*
		Checks to see, if the mouse moved upwards in relation
		to y. If so, all Prototips get closed, otherwise
		nothing happens.
		Needed because a tip shall be closed
		not only when the mouse leaves the actual tip, but the
		area that triggers showing the tip as well.
	*/
	function closePDMIfMouseMovedUpwards(y, event) {

		if (Event.pointerY(event) <= y) {
			Tips.hideAll();
		}
	}
	
	/*
		Checks to see, if the mouse moved right in relation
		to x . If so, all Prototips get closed, otherwise
		nothing happens.
		Needed because a tip shall be closed
		not only when the mouse leaves the actual tip, but the
		area that triggers showing the tip as well.
	*/
	function closePDMIfMouseMovedRight(x, event) {
	
		if (Event.pointerX(event) >= x) {
			Tips.hideAll();
		}
	}
	
	/*
		Checks to see, if the mouse moved left in relation
		to x. If so, all Prototips get closed, otherwise
		nothing happens.
		Needed because a tip shall be closed
		not only when the mouse leaves the actual tip, but the
		area that triggers showing the tip as well.
	*/
	function closePDMIfMouseMovedLeft(x, event) {
	
		if (Event.pointerX(event) <= x) {
			Tips.hideAll();
		}
	}
	
	/*
		see function closePDMIfMouseMovedUpwards
		see function closePDMIfMouseMovedRight
	*/
	function closePDMIfMouseMovedUpOrRight(y, x, event) {
		closePDMIfMouseMovedUpwards(y, event);
		closePDMIfMouseMovedRight(x, event);
	
	};
	
	/*
		see function closePDMIfMouseMovedUpwards
		see function closePDMIfMouseMovedRight
	*/
	function closePDMIfMouseMovedUpOrLeft(y, x, event) {
		closePDMIfMouseMovedUpwards(y, event);
		closePDMIfMouseMovedLeft(x, event);
	
	};
	
	
	/*
		see function closePDMIfMouseMovedUpwards
		see function closePDMIfMouseMovedLeft
		see function closePDMIfMouseMovedRight
	*/
	function closePDMIfMouseMovedUpOrLeftOrRight(y, xLeft, xRight, event) {
		closePDMIfMouseMovedUpwards(y, event);
		closePDMIfMouseMovedLeft(xLeft, event);
		closePDMIfMouseMovedRight(xRight, event);
	}