function ajaxFunction(str,itm,oth,file)
  {
  var xmlHttp;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        document.getElementById(file).innerHTML="<span class='xontextnormal'>Some Contents on the Page is incompatable with your Browser.  Try Updating your Internet Browser to a later version.</span>";
        return false;
        }
      }
    }
    xmlHttp.onreadystatechange=function()
      {
      if(xmlHttp.readyState==1)
        {
        document.getElementById(file).innerHTML="&nbsp;&nbsp;&nbsp;<img alt='Loading' src='../xonTAB/img/ajax-loader.gif' width='16' height='16'/> <span class='xontextnormal'>Loading Module... Please Wait</span>";
        }
      if(xmlHttp.readyState==4)
        {
        document.getElementById(file).innerHTML=xmlHttp.responseText;
		if (file=="noticesdata") expand("1");
        }
      }
    xmlHttp.open("GET",file+".php?"+itm+"="+str+"&"+oth,true);
    xmlHttp.send(null);
  }
fyear="All";
syear="";
ssem="";
dyear="";
dview="";
ayear="";
asem="";
function newsfilter(yr) { //v1.0 by xonTAB
	ajaxFunction(yr,'filternewsyear','searchnews='+document.getElementById("searchnews").value,'noticesdata'); 
	changeDisplay('filternews'); 
	changeText('newsfiltertxt','Filter - Year '+yr); 
	fyear=yr;
}
function yearfilter(yr) { //v1.0 by xonTAB
	ajaxFunction(yr,'filterunitsyear','filterunitssem='+ssem,'sunitsdata'); 
	changeDisplay('filterunits'); 
	syear=yr;
}
function semfilter(sem) { //v1.0 by xonTAB
	ajaxFunction(sem,'filterunitssem','filterunitsyear='+syear,'sunitsdata'); 
	changeDisplay('filterunits'); 
	ssem=sem;
}
function assyearfilter(yr) { //v1.0 by xonTAB
	ajaxFunction(yr,'filterassyear','filterasssem='+asem,'assignmentsdata'); 
	changeDisplay('filterass'); 
	ayear=yr;
}
function asssemfilter(sem) { //v1.0 by xonTAB
	ajaxFunction(sem,'filterasssem','filterassyear='+ayear,'assignmentsdata'); 
	changeDisplay('filterass'); 
	asem=sem;
}
function downfilter(yr) { //v1.0 by xonTAB
	ajaxFunction(yr,'filterdownloadsyear','downloadview='+dview,'downloadsdata'); 
	changeDisplay('filterdownloads'); 
	clearBar('searchdwl');
	if (yr!=="All") changeText('filtertxtdown','Filter - Year '+yr);
	else  changeText('filtertxtdown','Filter - All Records');
	dyear=yr;
}
function dviewfilter(view) { //v1.0 by xonTAB
	ajaxFunction(view,'downloadview','filterdownloadsyear='+dyear+'&searchdownloads='+document.getElementById('searchdwl').value,'downloadsdata'); 
	changeDisplay('viewdownloads'); 
	dview=view;
	if (view=="grid") document.getElementById('dviewimg').src="../xonTAB/img/grid3.jpg";
	else if (view=="list") document.getElementById('dviewimg').src="../xonTAB/img/list1.jpg"
}
function dsearchfilter() { //v1.0 by xonTAB
	ajaxFunction(document.getElementById('searchdwl').value,'searchdownloads','downloadview='+dview,'downloadsdata');
	changeDisplay('filterdownloads'); 
	changeText('filtertxtdown','Filter - Search "'+document.getElementById("searchdwl").value.substr(0,8)+'"');
	dyear="";
}