function global_load(id, url) {
  xmlHttp = new XMLHttpRequest()
  xmlHttp.onreadystatechange = function() {
    if (xmlHttp.readyState == 4) {
      document.getElementById(id).innerHTML = xmlHttp.responseText
    } else {
      document.getElementById(id).innerHTML = '<br /><center><img src="loader.gif"><br /><font color="#666666">Harap tunggu ...</font></center>'
    }
  }
  xmlHttp.open('GET', url)
  xmlHttp.send(0)
}

function global_load1(id, url) {
  xmlHttp1 = new XMLHttpRequest()
  xmlHttp1.onreadystatechange = function() {document.getElementById(id).innerHTML = xmlHttp1.responseText}
  xmlHttp1.open('GET', url)
  xmlHttp1.send(0)
}

function global_load2(id, url) {
  xmlHttp2 = new XMLHttpRequest()
  xmlHttp2.onreadystatechange = function() {document.getElementById(id).innerHTML = xmlHttp2.responseText}
  xmlHttp2.open('GET', url)
  xmlHttp2.send(0)
}

function global_load3(id, url) {
  xmlHttp3 = new XMLHttpRequest()
  xmlHttp3.onreadystatechange = function() {document.getElementById(id).innerHTML = xmlHttp3.responseText}
  xmlHttp3.open('GET', url)
  xmlHttp3.send(0)
}

function global_enc(value) {return encodeURIComponent(value)}

function global_hint_show(hintID) {document.getElementById(hintID).style.visibility = 'visible'}

function global_hint_hide(hintID) {document.getElementById(hintID).style.visibility = 'hidden'}

hint_mouseover = 0

function global_hint_blur(hintID) {if (hint_mouseover == 0) {global_hint_hide(hintID)}}

function global_hint_mouseover() {hint_mouseover = 1}

function global_hint_mouseout() {hint_mouseover = 0}

function global_hint_select(parentID, parentValue, hintID) {
  PID = document.getElementById(parentID)
  PID.value = parentValue
  PID.focus()
  global_hint_hide(hintID)
  hint_mouseover = 0
}

function retribusi_validasi(frm, id, url) {
   elm = 8
  for(i = 0; i < elm; i++) {
    if (frm.elements[i].value == '') {
      alert('MAAF, ISIAN BELUM LENGKAP.')
      frm.elements[i].focus()
      return 0
    }
  }
  if (elm = 8) {global_load(id, url)}
}

