var xmlHttp;

function updateSubJobAreas(str)
{ 
xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 
var url="/getSubJobAreas.php";
url=url+"?jobarea="+str;
var randomnumber = Math.random();
url=url+"&rand="+randomnumber;
xmlHttp.onreadystatechange=stateChangedSubJobAreas;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}

function stateChangedSubJobAreas() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("subjobarea").innerHTML=xmlHttp.responseText;
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function showRequestCV(str) {
    if (document.getElementById(str).style.display=="block")
    {
        document.getElementById(str).style.display="none";
    } else {
        document.getElementById(str).style.display="block";
    }
}

function confirmDelete(item)
{
    return confirm("Are you sure you want to delete "+item+"?");
}