function ajaxFunction(course, currlang)
{

	var divstyle = new String();
        divstyle = document.getElementById("test").style.visibility;
        
	var xmlhttp;
	if (window.XMLHttpRequest)
	{
		// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		alert("Your browser does not support XMLHTTP!");
	}
	xmlhttp.onreadystatechange=function()
	{
		if(xmlhttp.readyState==4)
		{
			if(divstyle.toLowerCase()=="visible")
        	{
            	document.getElementById("test").style.visibility = "hidden";
				document.getElementById('test').innerHTML  = '';

        	}
        	else
        	{
            	document.getElementById("test").style.visibility = "visible";
				document.getElementById('test').innerHTML  = xmlhttp.responseText;
        	}
			
		}
	}
	 
	xmlhttp.open("GET","lesson.php?levelid="+course+'&currlang='+currlang,true);
	xmlhttp.send(null);
	
}



function wodAjaxCall(glossary_id, Webpath)
{

	var xmlhttp;
	if (window.XMLHttpRequest)
	{
		// code for IE7+, Firefox, Chrome, Opera, Safari
		xmlhttp=new XMLHttpRequest();
	}
	else if (window.ActiveXObject)
	{
		// code for IE6, IE5
		xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	else
	{
		alert("Your browser does not support XMLHTTP!");
	}
	xmlhttp.onreadystatechange=function()
	{
            if(xmlhttp.readyState==4)
            {
                //TODO
                //alert(xmlhttp.responseText);
                xmlhttp.responseText;
            }
	}

        xmlhttp.open("GET",Webpath+"/wod_audio_ajax.php?glossary_id="+glossary_id);
	xmlhttp.send(null);

}
