function LoadStates(el,Selected)
{
 var xmlHttp;
 function ProcessStatesResult()
 {
  if ((xmlHttp) && (xmlHttp.readyState==4))
  {
   while (el.length>0) el.remove(el.length-1);
   el.options.add(new Option("Select State","",true));   
   var a = new Array();
   a = xmlHttp.responseText.split("#");
   for(i=0;i<a.length;i++)
   {
    sel = false;
    if(Selected != 'undefined' && Selected ==a[i+1]) sel = true;
    el.options.add(new Option(a[i],a[i+1],sel));
    i++;
   }
  }
 }
 try
 {xmlHttp=new XMLHttpRequest();/* Firefox, Opera 8.0+, Safari*/}
 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;
   }
  }
 }
 try
 {
  xmlHttp.open("GET","/functions/load_states.php",true);
  xmlHttp.onreadystatechange=ProcessStatesResult;
  xmlHttp.send(null);  
 }
 catch(e)
 {alert(e.descr);} 
 return true; 
}

