var http_requestInfo = false;
var _UrlInfoRoot = "/news/panel_news.aspx";
var pas = 2;
var h_fen = "100px";


function getInfo() {
	http_requestInfo = false;

	if (window.XMLHttpRequest) { // Mozilla, Safari,...
		http_requestInfo = new XMLHttpRequest();
		if (http_requestInfo.overrideMimeType) {
			http_requestInfo.overrideMimeType('text/plain');
		}
	} else if (window.ActiveXObject) { // IE
		try {
			http_requestInfo = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
			http_requestInfo = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
	}

	if (!http_requestInfo) {
		alert('Cannot create an XMLHTTP instance');
		return false;
	}
	var date = new Date();
	var ticks = date.getTime();
	_UrlInfo = _UrlInfoRoot + "?time=" + ticks;
	http_requestInfo.onreadystatechange = endRequestInfo;
	http_requestInfo.open('GET', _UrlInfo, true);
	http_requestInfo.send(null);
}

function endRequestInfo() {
	if (http_requestInfo.readyState == 4) {
		if (http_requestInfo.status == 200) {
		
			var output = http_requestInfo.responseText;
			try {
				showInfo(output);
			}
			catch(e){}			
		}
	}
}

function scrollInfo() {
	if (parseInt(mrq.style.top) > -h_mrq)
		mrq.style.top = parseInt(mrq.style.top) - pas + "px";
	else
		mrq.style.top=parseInt(h_fen) + "px";
}

function initScroll() {
	mrq = document.getElementById("div_conteneur"); 
	fen = document.getElementById("div_news"); 
	fen.onmouseover = function() {
		stoc = pas;
		pas = 0;
	};
	fen.onmouseout = function() {
		pas = stoc;
	};
	fen.style.height = h_fen;
	h_mrq = mrq.offsetHeight;
	with(mrq.style) {
		position = "absolute";
		top = h_fen;
	}
	setInterval("scrollInfo()", 100);
}

function showInfo(_output) {
	_ELEM = document.getElementById("div_news");
	_ELEM.innerHTML = "<div id=\"div_conteneur\" class=\"div_conteneur\">" + _output + "</div>";
	initScroll();
}

getInfo();