function loadnews(str)
{
if (str=="")
  {
  document.getElementById('txtHint').innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById('txtHint').innerHTML=xmlhttp.responseText;
    }
    else{
     document.getElementById('txtHint').innerHTML = '<img src="logo/loading.gif">';
     }
	}
var url = "core.php?action=getnews&q=" + str + "&random=" + Math.random();
xmlhttp.open("GET",url,true);
xmlhttp.send();
}



function loadpic(str)
{
if (str=="")
  {
  document.getElementById('boardpic').innerHTML="";
  return;
  } 
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp2=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp2.onreadystatechange=function()
  {
  if (xmlhttp2.readyState==4 && xmlhttp2.status==200)
    {
   document.getElementById('boardpic').innerHTML=xmlhttp2.responseText;
    }
    else{
     document.getElementById('boardpic').innerHTML = "<img src='logo/loading.gif'>";
     }
	}
var url = "core.php?action=boardpic&page=" + str + "&random=" + Math.random();
xmlhttp2.open("GET",url,true);
xmlhttp2.send();

}

function counter()
{
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp3=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp3=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp3.onreadystatechange=function()
  {
  if (xmlhttp3.readyState==4 && xmlhttp3.status==200)
    {
   document.getElementById('counter').innerHTML=xmlhttp3.responseText;
    }
    else{
     document.getElementById('counter').innerHTML = '<img src="logo/loading.gif">';
     }
	}
var url = "core.php?action=counter&random=" + Math.random();
xmlhttp3.open("GET",url,true);
xmlhttp3.send();

}

