var xmlhttp=false;


if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
  xmlhttp = new XMLHttpRequest();
}

function getServerName(){
    var str = window.location.protocol + '//' + window.location.hostname;
    return str;
}


function checkLanguageViaAjax(countryId){
  uri = getServerName() + "/checkLanguageViaAjax.php?countryId="+countryId;
  try{
      xmlhttp.open("GET", uri ,true);
  }catch(e){
      alert(e);
  }
  xmlhttp.onreadystatechange=function()
  {
      if (xmlhttp.readyState==4){
        returnText = xmlhttp.responseText;
        //alert(returnText);
      }
  }
  try{
    xmlhttp.send(null);
  }catch(e){

  }
}
