function register_pr(el_id, params)
{
	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)
	      {
	      alert("Your browser does not support AJAX!");
	      return false;
	      }
	    }
	  }	
	xmlHttp.onreadystatechange=function()
    {
	    if(xmlHttp.readyState==4)
	      {					
			if (xmlHttp.responseText.match("grantted") || parseInt(xmlHttp.responseText) != "NaN"){
				if (document.getElementById(el_id).checked == true) document.getElementById(el_id).checked = false;
				else document.getElementById(el_id).checked = true;				
				if (parseInt(xmlHttp.responseText) == 0){
					//document.getElementById('many_point_valgt').onmouseover = "";
//					document.getElementById('many_point_valgt').onmouseout = "";
					document.getElementById('many_point_valgt_tr').style.display = "none";
				} else {
					if (parseInt(xmlHttp.responseText) == 1){
						td = document.getElementById('many_point_valgt');
						document.getElementById('many_point_valgt_tr').style.display = "inline";
						//td.style.display = "block";
						fifteenth = org_fifteenth.replace("X", xmlHttp.responseText);
					} else fifteenth = org_fifteenth.replace("X", xmlHttp.responseText)+"er";									
					if (second2 && counter == 0) second2();										
				}				
			} else {
				alert("Java script error;");
			}
	      //document.myForm.time.value=xmlHttp.responseText;
	      }
    }
	xmlHttp.open("GET","../../site/fritid/engine/valgs_register.php?"+params,true);
	xmlHttp.send(null);
}
