/***********************************************************************************
*
* $Workfile: SplitterScript.js $ 
* SafeFile : $Archive: /ContentSystem/HelpSystem/Source/HelpSystemWeb/Scripts/SplitterScript.js $
* 
* $Revision: 0 $ 
*
* Purpose : 
*
* Modified : $Author: $ $Modtime: $
*
* Initial version by Alexey Kropotin (Hound) on Oct, 2004
* Copyright 2005 Saxo Bank. All rights reserved.
***********************************************************************************/

isDragMode = false

function OnMouseOver()
{
	splitter.style.cursor = "w-resize"
}

function OnMouseDown()
{
	isDragMode = true
}

function OnMouseUp()
{
	isDragMode = false
}

function OnMouseMove()
{
	if(!isDragMode)
		return		
	
	if(window.event != null && window.event.button == 1)
	{
		if(window.event.x > 0)
			lColumn.width = window.event.x;		
		
	}	
	
	if(leftframe.window.event != null && leftframe.window.event.button == 1)
	{
		if(leftframe.window.event.x > 0)
			lColumn.width = leftframe.window.event.x;
			
	}
	
	if(content.window.event != null && content.window.event.button == 1)
	{
		if(content.window.event.x > 0)
			lColumn.width = lColumn.width - splitter.width + content.window.event.x;
	}	
}

function OnGlossaryDescriptionMouseMove()
{
	if(!isDragMode)
		return		
	
	if(leftframe.frames[0].window.event != null && leftframe.frames[0].window.event.button == 1)
	{
		if(leftframe.frames[0].window.event.x > 0)
			lColumn.width = leftframe.frames[0].window.event.x;
	}
}