var xmlhttp;

function getVote(int)
{
xmlhttp=GetXmlHttpObject();
if (xmlhttp==null)
  {
  alert ("Browser does not support HTTP Request");
  return;
  }
var url="poll_vote.php";
url=url+"?vote="+int;
url=url+"&sid="+Math.random();
xmlhttp.onreadystatechange=stateChanged;
xmlhttp.open("GET",url,true);
xmlhttp.send(null);
}

function stateChanged()
{
  if (xmlhttp.readyState==4)
  {
  document.getElementById("poll").innerHTML=xmlhttp.responseText;
  }
}

function GetXmlHttpObject()
{
var objXMLHttp=null;
if (window.XMLHttpRequest)
  {
  objXMLHttp=new XMLHttpRequest();
  }
else if (window.ActiveXObject)
  {
  objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
return objXMLHttp;
}


// JavaScript Document 
function language() 

{ 
        if (navigator.appName == 'Netscape') 
                var language = navigator.language; 
        else 
                var language = navigator.userLanguage; 
        if (language.indexOf('eng') > -1) document.location.href = 'int/index.html';				//Engelsk 

        else if (language.indexOf('gb') > -1) document.location.href = 'gb/home.html';				//UK 
        else if (language.indexOf('en-gb') > -1) document.location.href = 'gb/home.html';			//UK 
        else if (language.indexOf('cy') > -1) document.location.href = 'gb/home.html'; 			//UK 
        else if (language.indexOf('fr-be') > -1) document.location.href = 'gbl_fr/home.html';		//Belgien fransk 
        else if (language.indexOf('nl-be') > -1) document.location.href = 'gbl_fl/home.html';		//Belgien Hollandsk 
        else if (language.indexOf('fr') > -1) document.location.href = 'gps_fr/home.html';			//France 
        else if (language.indexOf('nl') > -1) document.location.href = 'gbl_nl/home.html';		//Hollandsk 
        else if (language.indexOf('at') > -1) document.location.href = 'gws/home.html';			//¯strig 
        else if (language.indexOf('de') > -1) document.location.href = 'gws/home.html';			//tyskland 

        
        else document.location.href = 'int/index.html';                                                        //SPROG SOM IKKE ER P LISTEN 
}