var ssi=0;
var a_absnum=""
var a_show=""
var a_url=""

function ajax(url,data) {
		var h;
		if(window.ActiveXObject) {
			h = new ActiveXObject("Microsoft.XMLHTTP");
		} else {
			h = new XMLHttpRequest();
		}
		h.open(data ? 'POST' : 'GET',url,false);
		h.send(data || null);
		return h.responseText;
	}


var ajvals = new Array();	

function getartdata(absnum,show, url) {
	clearInterval(ssi)
	a_absnum=absnum
	a_show=show
	a_url=url
	if (show==1)
	{
		ssi=setInterval(getartdata2, 200)
	}
	else
	{
		getartdata2()
	}
}

function getartdata2() {
	clearInterval(ssi)
	var posspan = document.getElementById('news_c');	
	var div = document.getElementById('news_c_inn');
//	alert(a_absnum)
	if(a_show)
	{
		if(!ajvals[a_absnum])
		{
			//alert(a_url+a_absnum+'.html');
			ajvals[a_absnum] = ajax(a_url+a_absnum+'.html');
		}
		div.innerHTML = ajvals[a_absnum];
		posspan.style.display = 'block';
		posspan.style.top=(pos.y-posspan.offsetHeight-10) + "px"
		posspan.style.left=(pos.x-posspan.offsetWidth/2) + "px"
	}
	else
	{
		posspan.style.display = 'none';
		div.innerHTML = ''
	}

}

var IE = document.all?true:false
if (!IE) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;
var tempX = 0
var tempY = 0
var pos= new Object()
var ii=0

function getMouseXY(e) {
  if (IE) {
   if (document.documentElement)
  	{
	var theTop = document.documentElement.scrollTop;
	var theLeft = document.documentElement.scrollLeft;
	}
	else if (document.body)
	{
	var theTop = document.body.scrollTop
	var theLeft = document.body.scrollLeft
	}

    tempX = event.clientX + theLeft
    tempY = event.clientY + theTop
  } else {
    tempX = e.pageX
    tempY = e.pageY
  }  

  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  

  pos.x = tempX
  pos.y = tempY

  return 

}


