var cs1 = 300;
var cs2 = 300;
var cs3 = 100;
var cs4 = 500;
var cs32 = cs3 / 2;
var ytp = null;
var px,py;
function gjgetp(e)
{
	if (e == null)
	{
		return;
	}
	var x = e.offsetLeft, y = e.offsetTop;
	while(e=e.offsetParent){x += e.offsetLeft; y += e.offsetTop;}
	x = x + 0;
	y = y + 0;
	return {"x": x, "y": y};
}
function gj_ks()
{
	var nr = gjdx("dts");
	if (nr == null)
	{
		return;
	}
	nr.style.left = ytp.x + cs1 + 14 + "px";
	nr.style.top = ytp.y + 25 + "px";
}
function mouseMove(ev) 
{ 
ev= ev || window.event; 
var mousePos = mouseCoords(ev); 
px= mousePos.x; 
py= mousePos.y;  
}
function mouseCoords(ev) 
{ 
if(ev.pageX || ev.pageY){ 
return {x:ev.pageX, y:ev.pageY}; 
} 
return { 
x:ev.clientX + document.body.scrollLeft - document.body.clientLeft, 
y:ev.clientY + document.body.scrollTop - document.body.clientTop 
}; 
} 
document.onmousemove = mouseMove;
function gj_fd()
{
	var x = 0;
	var y = 0;
	x = px - ytp.x + document.documentElement.scrollLeft;
	y = py - ytp.y + document.documentElement.scrollTop;
	gjmdk(x, y);
	gjmxk(x, y);
	var yt = gjdx("yt");
	var dts = gjdx("dts");
	var xts = gjdx("xts");
	if (yt == null || dts == null || xts == null)
	{
		return;
	}
	yt.style.filter = "alpha(opacity=50)";
	dts.style.display = "";
	xts.style.display = "";
}
function gj_hy()
{
	var yt = gjdx("yt");
	var dts = gjdx("dts");
	var xts = gjdx("xts");
	if (yt == null || dts == null || xts == null)
	{
		return;
	}	
	yt.style.filter = "";
	dts.style.display = "none";
	xts.style.display = "none";	
  }
function gjmdk(x, y)
{
  var dts = gjdx("dts2");
  if (dts == null)
  {
    return;
  }
  var xx = 0;
  var yy = 0;
  if (x < cs32)
  {
    xx = 0;    	
  }
  else if (x > (cs1 - cs32))
  {
    xx = cs2 - cs4;
  }
  else
  {
    xx = (cs32 - x) * (cs4 - cs2) / (cs1 - cs3);
  }

  if (y < cs32)
  {
    yy = 0;
  }
  else if (y > (cs1 - cs32))
  {
    yy = cs2 - cs4;
  }
  else
  {
    yy = (cs32 - y) * (cs4 - cs2) / (cs1 - cs3);
  }
  dts.style.left = xx + "px";
  dts.style.top = yy + "px";
}

function gjmxk(x, y)
{
  var xts = gjdx("xts");
  if (xts == null)
  {
    return;
  }
  var xx = 0;
  var yy = 0;
  if (x < cs32)
  {
    xx = 0;
  }
  else if (x > (cs1 - cs32))
  {
    xx = cs1 - cs3;
  }
  else
  {
    xx = x - cs32;
  }
  if (y < cs32)
  {
    yy = 0;
  }
  else if (y > (cs1 - cs32))
  {
    yy = cs1 - cs3;
  }
  else
  {
    yy = y - cs32;
  }
  xts.style.left = (xx + ytp.x) + "px";
  xts.style.top = (yy + ytp.y) + "px";
  mxt(xx, yy);
}
function mxt(x, y)
{
  var xt = gjdx("xts2");
  if (xt == null)
  {
    return;
  }
  var xx = 0 - x;
  var yy = 0 - y;
  xt.style.left = xx + "px";
  xt.style.top = yy + "px";
}
function gjdx(id){return document.getElementById(id);}
function gjht(s1,s2)
{
gjdx("yt").src=s1;
gjdx("xt").src=s1;
gjdx("dt").src=s2;
}