function formlogin()
{
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=='1')
			{
				window.location = "soontowed/?x=12";
			}
		else if (xmlHttp.responseText=='2') 
			{
				window.location = "professionals/?x=3";
			}
		else if (xmlHttp.responseText=='3') 
			{
				window.location = "writters/?x=7";
			}
		else
			{
			document.getElementById('resp').innerHTML = xmlHttp.responseText;
			}
      }
    }
	
	
	var url="login.php";
	url=url+"?username="+document.getElementById('username').value+"&password="+document.getElementById('password').value;
			
     xmlHttp.open("GET",url,true);
     xmlHttp.send(null);

  }	