// JavaScript Document
var xmlHttp;
setInterval("get_news()",10000);
//--------------------------------------
function createXMLHttpRequest() 
{
	if (window.ActiveXObject) {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
	} 
	else if (window.XMLHttpRequest) { 
		xmlHttp = new XMLHttpRequest();
	}
}
//---------------------------------------
function get_news() {
	createXMLHttpRequest(); 
	
	var url = "index.php?page=home&op=get_random_fyi";

	xmlHttp.open("GET", url, true); 
	xmlHttp.onreadystatechange = callback; 
	xmlHttp.send(null); 
}
//---------------------------------------
function callback() {
	if (xmlHttp.readyState == 4) { 
		if (xmlHttp.status == 200) { 
			if(document.getElementById("random_fyi_block"))
			{
			document.getElementById("random_fyi_block").innerHTML = xmlHttp.responseText;
			//var mes = xmlHttp.responseXML.getElementsByTagName("message")[0].firstChild.data; 
			//var val = xmlHttp.responseXML.getElementsByTagName("passed")[0].firstChild.data; 
			fadetitle();
			fadetext();
			}
		}
	} 
} 
