var xmlHttp = false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp = false;
  }
}
@end @*/
if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
  xmlHttp = new XMLHttpRequest();
}
//---------------------------------------------------------------------------------------------------------
function loading(divid) {
	document.getElementById(divid).innerHTML="<div><img src='load.gif' alt='load'>Загрузка...</div>";
}
function joke_next() {
  var url = "ajax/joke.php"; 
  xmlHttp.open("GET", url, true); 
  xmlHttp.onreadystatechange = joke_result; 
  xmlHttp.send(null);
}
function joke_result() {
  if (xmlHttp.readyState == 4) { 
  	var response = xmlHttp.responseText; 
	  document.getElementById("joke").innerHTML = response; 
  }
}
//-----------------------------------------------------------------\\





