
	// #######################################
	// ######## MOUSE DRAG FUNCTIONS #########
	// #######################################

	N = (document.all) ? false : true;
	
	var ob;
	var over = false;

	var overChat = false;
	
	document.onmousedown = SplitterDrag_MD;
	document.onmousemove = SplitterDrag_MM;
	document.onmouseup = SplitterDrag_MU;

	/*
	document.oncontextmenu = showContext;
	
	function showContext() {
	
		if (overChat) {
			return true;
		} else {
			return false;
		}
	
	}
	*/



	function SplitterDrag_MD(e)
	{
		if (overChat) { return true; } 
		else {
	
			lastob = null;
			if (N)
			{
				//disable right-click
				if (e.which != 1)
					return false;

				if (over)
				{
					ob = document.getElementById("divFrameSeparator");
					Y = e.layerY;
				}

				return false;
			}

			else
			{
				//disable right-click
				if (event.button != 1)
					return false;
			
				if (over)
				{
					ob = document.getElementById("divFrameSeparator");
					ob = ob.style;
					Y = event.offsetY;
				}
			}
	
		}

	}


	function SplitterDrag_MM(e)
	{
		if (ob)
		{
			var top = 0;

			if (N)
			{
				/*
				if (e.clientY < 92) {
					ob = null;
					return false;
				}
				*/
				top = e.pageY - Y;
				
				if (top > 92 && top < availScreenHeight - 200)
				{
					//ob.style.top = top;
					parent.IToolContainer_TopResize(top - 36);					
				}
			}
			else
			{
				if (event.clientY < 90) {
					ob = null;
					return false;
				}
				
				top = event.clientY + 2; //- Y + document.body.scrollTop;
				
				if (top > 97 && top < availScreenHeight - 200)
				{
					//ob.pixelTop = top - 185;
					parent.IToolContainer_TopResize(top - 41);
				}
				
				return false;      			
      		}			
   		}
	}


	function SplitterDrag_MU()
	{
		ob = null;
	}

	


	// #######################################
	// ######## KILL DRAG FUNCTIONS ##########
	// #######################################

	function SplitterDrag_DivAboveOver(e)
	{
		if (document.all)
			e = event;

		if (MM_findObj("divAllToolsArea").style.pixelTop - e.clientY > 30)
			ob = null;
	}
		
	function SplitterDrag_DivBelowOver(e)
	{
		if (document.all)
			e = event;

		if (e.clientY - MM_findObj("divAllToolsArea").style.pixelTop > 30)
			ob = null;
	}


