var dragswitch=0;
var nsx;
var nsy;
var nstemp;

function drag_dropns(name)
{
	temp=eval(name);
	temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP);
	temp.onmousedown=gons;
	temp.onmousemove=dragns;
	temp.onmouseup=stopns;
}
function gons(e)
{
	temp.captureEvents(Event.MOUSEMOVE);
	nsx=e.x;
	nsy=e.y;
}
function dragns(e)
{
	if (dragswitch==1)
	{
		temp.moveBy(e.x-nsx,e.y-nsy);
		return false;
	}
}
function stopns()
{
	temp.releaseEvents(Event.MOUSEMOVE);
}
var dragapproved=false;
function drag_dropie(e)
{
	e=e||event;
	if (dragapproved==true)
	{
		Public_tt.style.left=tempx+e.clientX-iex + 'px';
		Public_tt.style.top=tempy+e.clientY-iey + 'px';
		return false;
	}
}

function drag_up()
{
	Public_tt.className = null;
}

function initializedragie(e)
{	
	iex=e.clientX;
	iey=e.clientY;
	tempx=parseInt(Public_tt.style.left.replace(/px/i,''));
	tempy=parseInt(Public_tt.style.top.replace(/px/i,''));
	dragapproved=true;
	
	Public_tt.onmousemove=drag_dropie;
	Public_tt.onmouseup = drag_up;
	Public_tt.className = 'op';
}
	
document.onmouseup=new Function("dragapproved=false");

function hidebox()
{	
	Public_tt.style.display="none";
	//Public_tt.parentNode.removeChild(Public_tt);
}