<!--
function Drag() {
	this.positionElement = null;
	this.eventListenElement = null;
	this.dragElement = null;
	this.dragWidth = 0;
	this.dragHeight = 0;
	this.start_left = 0;
	this.start_top  = 0;
	this.start_x = 0;
	this.start_y = 0;
	this.setPositionElement = function(el) {
		this.positionElement = el;
	}
	this.setEventListenElement = function(el) {
		this.eventListenElement = el;
	}
	this.setDragElement = function(el) {
		this.dragElement = el;
	}
	this.dragStart = function(evt) {
		var _dragStyle = Drag.positionElement.style;
		Drag.start_left = parseFloat(_dragStyle.left || 0);
		Drag.start_top  = parseFloat(_dragStyle.top  || 0);
		Drag.start_x = pointerX(evt);
		Drag.start_y = pointerY(evt);
		addListener(Drag.eventListenElement, 'mouseup',   Drag.dragEnd, false);
		//addListener(Drag.eventListenElement, 'mouseout',  Drag.dragEnd, false);
		addListener(document, 'mousemove', Drag.moveChildWindow, false);
		addListener(document, 'mousedown', Drag.mouseDown, false);
		addListener(document, 'mouseup', Drag.dragEnd, false);
	}
	this.dragEnd = function(evt) {
		removeListener(Drag.eventListenElement, 'mouseup',   Drag.dragEnd, false);
		removeListener(document, 'mousemove', Drag.moveChildWindow, false);
		removeListener(document, 'mousedown', Drag.mouseDown, false);
		removeListener(document, 'mouseup', Drag.dragEnd, false);
	}
	this.moveChildWindow = function(evt) {
		Drag.move_x = pointerX(evt) - Drag.start_x;
		Drag.move_y = pointerY(evt) - Drag.start_y;
		var newLeft = (Drag.start_left + Drag.move_x);
		var newTop  = (Drag.start_top  + Drag.move_y);   
		if (newLeft > 0) {
			Drag.positionElement.style.left = newLeft + 'px';
		}
		if (newTop > 0) {
			Drag.positionElement.style.top = newTop + 'px';
		}
		Drag.hideSelectionList(Drag.dragElement, Drag.dragWidth, Drag.dragHeight);
	}
	this.mouseDown = function(evt) {
		Drag.move_x = 0;
		Drag.move_y = 0;
	}
	this.setDragWidthHeight = function(width, height) {
	  this.dragWidth = width;
	  this.dragHeight = height;
	}
	this.hideSelectionList = function(element, width, height) {
		if (Browser.type != Browser.MSIE6) {
			return;
		}
		if (element == null || element.style.display != 'block') {
		  return;
		}
		var _selectAry = document.getElementsByTagName('SELECT');
		if (_selectAry == null || _selectAry.length < 1) {
			return;
		}
		var _poss = getElementPos(element);
		var _pose = new Pos();
		_pose.x = _poss.x + width;
		_pose.y = _poss.y + height;
		var _select;
		for (var i=0; i<_selectAry.length; i++) {
			_select = _selectAry[i];
			if (isChild(_select, element)) continue;
			var _selectPoss = getElementPos(_select);
			var _selectPose = new Pos();
			_selectPose.x = _selectPoss.x + _select.offsetWidth;
			_selectPose.y = _selectPoss.y + _select.offsetHeight;
			if ((_selectPoss.x > _pose.x) || (_selectPose.x < _poss.x) || (_selectPoss.y > _pose.y) || (_selectPose.y < _poss.y)) {
				_select.style.visibility = 'visible';
			} else {
				_select.style.visibility = 'hidden';
			}
		}
	}
	this.showSelectionList = function() {
		if (Browser.type != Browser.MSIE6) {
			return;
		}
		var _selectAry = document.getElementsByTagName('SELECT');
		if (_selectAry == null || _selectAry.length < 1) {
			return;
		}
		for (var i=0; i<_selectAry.length; i++) {
			_selectAry[i].style.visibility = 'visible';
		}
	}
}
function pointerX(event) {
	return event.pageX || (event.clientX +
		(document.documentElement.scrollLeft || document.body.scrollLeft));
	}
function pointerY(event) {
	return event.pageY || (event.clientY +
		(document.documentElement.scrollTop || document.body.scrollTop));
}
//-->

