function convertType()
{
   var type = document.form.expType;
   for(var i=0;i<type.length;i++)
   {
      if(type.options[i].text =='I')
      {
         type.options[i].text='Individual contributor';
      }
      if(type.options[i].text =='L')
      {
         type.options[i].text='Lead';
      }
      if(type.options[i].text=='M')
      {
         type.options[i].text='Manager';
      }
      if(type.options[i].text=='E')
      {
         type.options[i].text='Executive';
      }
      if(type.options[i].text=='C')
      {
         type.options[i].text='Consultant';
      }
   }
}

function checkcities()
{
    var selectbox=document.form.city;
    var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		selectbox.remove(i);
	}
}

function removeCities()
{
   var state = document.form.state.value;
   if(state=='')
   {
       var selectBox=document.form.city;
       var j;
	   for(i=selectBox.options.length-1;i>=0;i--)
	   {
		   selectBox.remove(i);
	   }
   }
}
   
   


function convertCategory()
{
   var category = document.form.expCategory;
   for(var i=0;i< category.length;i++)
   {
      if(category.options[i].text =='T')
      {
          category.options[i].text='Technical';
      }
      if(category.options[i].text =='B')
      {
          category.options[i].text='Business';
      }
      if(category.options[i].text=='F')
      {
          category.options[i].text='Financial';
      }
   }
}

function getXMLHttp()
{
  var xmlHttp

  try
  {
    xmlHttp = new XMLHttpRequest();
  }
  catch(e)
  {
    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;
      }
    }
  }
  return xmlHttp;
}
function MakeRequest(url)
{
  var xmlHttp = getXMLHttp();
  
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      HandleResponse(xmlHttp.responseText);
    }
  }
  var countries = document.form.country.value;
  xmlHttp.open("GET", url + "/joblist.php?"+"countries="+countries,true); 
  xmlHttp.send(null);
}
function HandleResponse(response)
{
  document.getElementById('ResponseState').innerHTML = response;
}
function hideCity()
{
    var c= document.getElementById("hide_city");
    c.style.visibility="hidden";
}
function selectCities(url)
{
  var xmlHttp = getXMLHttp();
  xmlHttp.onreadystatechange = function()
  {
    if(xmlHttp.readyState == 4)
    {
      Handle(xmlHttp.responseText);
    }
  }
  var countries = document.form.country.value;
  var state = document.form.state.value;
  if(state!='')
  {
    xmlHttp.open("GET", url+"/joblist.php?"+"countries="+countries+"&"+"state="+state,true); 
    xmlHttp.send(null);
  }
  /*else
  {
    xmlHttp.open("GET","joblist.php?"+"countries="+countries,true); 
    xmlHttp.send(null);
  }*/
}
function Handle(response)
{
  document.getElementById('ResponseCity').innerHTML = response;
}


