function changeLg(lg){

	var xhr = createXMLHttpRequest();
  	xhr.onreadystatechange = function() {
    if (xhr.readyState==4) { 
      if (xhr.status==200) {
        var dataList = xhr.responseText;
        refreshBrowser(dataList);
        window.location.reload();
      } else {
        alert("An error occurred.");
      }
    }
  }
  xhr.open("GET", "utilities/setLg.php?lg="+lg, true);
  xhr.send(null);
}


function refreshBrowser(resp){
	//alert("yu");
	//window.location.reload();
}


// -- Generic functions --------------------------------------------------

function createXMLHttpRequest() {
	try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {}
    try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
	try { return new XMLHttpRequest(); } catch(e) {}
    alert("XMLHttpRequest not supported");
    return null;
}


//function $(id) {
//	return document.getElementById(id);
//}
