/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function showQuery(str)
{
if (str=="")
  {
    document.getElementById("changing_content").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("changing_content").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET",str,true);
xmlhttp.send();
}

function showNews(id){
    if(id==""){
        showQuery("chnews.php");
    }else{
        showQuery("chnews.php?id=" + id);
    }
}
function showIndexNews(id){
    if(id==""){
        showQuery("indexnews.php");
    }else{
        showQuery("indexnews.php?id=" + id);
    }
}

function showEventsOn(month, day, year){
    showQuery("chevt.php?month=" + month + "&day=" + day + "&year=" + year);
}

function showCourse(page){
    showQuery('courses/' + page);
}


