
$(document).ready(function(){


  setTimeout("getareas()",500)
  setTimeout("getptypes()",1000)


 });

function getareas() {

 var a = $('#areaselect')
 if (!(a.length)) {
    return
  }
  a.html('<img class="progress" src="progress.gif" alt="loading ...">')
    $.ajax({
        type: "POST",
        url: "admin/areaselect.php",
        dataType: "html",
        success: function(stuff){
            $('.progress').remove()
            a.html(stuff)
        }
    })
}

function getptypes() {
 var a = $('#ptypeselect')
 if (!(a.length)) {
    return
  }
  a.html('<img class="progress" src="progress.gif" alt="loading ...">')
    $.ajax({
        type: "POST",
        url: "admin/ptypeselect.php",
        dataType: "html",
        success: function(stuff){
            $('.progress').remove()
            a.html(stuff)
        }
    })
}

