	var srcobj = null;
	var ypos = 0;
	var xpos = 0;
	
	var ie5 = document.all != null && document.getElementsByTagName != null;
	
	function getReal(el) {
		temp = el;
	
		while ((temp != null) && (temp.tagName != "BODY")) {
			if ((temp.className == "quicksearch")){
				el = temp;
				return el;
			}
			temp = temp.parentElement;
		}
		return el;
	}
	
	function drag_qrmousedown() {
		if (window.event) {
			element = getReal(window.event.srcElement);
			if (element.className == "quicksearch") { 
				srcobj = element;
				ypos = window.event.clientY - getTopPos(srcobj);
				xpos = window.event.clientX - getLeftPos(srcobj);
			}
		}
	}
	
	function drag_qrmouseup() {
		if (srcobj) {
			srcobj = null;
		}
	}	
	
	function drap_qrmousemove() {
		if (srcobj) {
			if (window.event.clientX >= 0 && window.event.clientY >= 0) {
				srcobj.style.left = window.event.clientX - xpos;
				srcobj.style.top = window.event.clientY - ypos;
			}
			window.event.returnValue = false;
			window.event.cancelBubble = true;
		}
		
	}
	
	function getLeftPos(el) {
		if (el.currentStyle.left == "auto")
			return 0;
		else
			return parseInt(el.currentStyle.left);
	}
	
	function getTopPos(el) {
		if (el.currentStyle.top == "auto")
			return 0;
		else
			return parseInt(el.currentStyle.top);
	}

	document.onmousedown = drag_qrmousedown;
	document.onmouseup = drag_qrmouseup;
	document.onmousemove = drap_qrmousemove;	
