/*=================================================================== Parola===================
===============================================================================================
===============================================================================================
===============================================================================================
*/
function trimite_parola(x,ce)
{
  document.title = ce;
  var http = getRul();
  var myurl = 'php/check_pass.php';
  myRand = parseInt(Math.random()*999999999999999);
  var modurl = myurl+"?rand="+myRand;
  var params = "parola="+x;

  
  http.open("POST", modurl, true);
  
  http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  http.setRequestHeader("Content-length", params.length);
  http.setRequestHeader("Connection", "close");


  http.onreadystatechange = function()
    {
     if (http.readyState == 4)
	 {
     if(http.status == 200) 
	  {
 	   if(http.responseText == "1")
	  {
	    pass_v = 1;
		if(ce=="asteptare")
				  document.getElementById('Log-in-holder').style.backgroundColor = "green";
		else
	    	if(ce=="cauta")
		{
		  document.getElementById('parola_asteptare').style.backgroundColor = "green";
		   cauta_deviantii();
		}
	  }
	   else 
	     pass_v = 0;
	  } 
	 else {}
  }
 }
  http.send(params);

	
}


