function link_http(strURL,strid) {//alert(strURL);	
		var creg=/\%/gi;

		mystring = new String(strURL);
		var strURL = mystring.replace(creg, '<=|=>');	
	
	  //alert(strURL);
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else {
    alert('Browser tidak menunjang AJAX');
    }
    self.xmlHttpReq.open('GET', strURL, true);
    send_dt(self,strid);
    self.xmlHttpReq.send(null);
}
function link_del(strURL,strid) {
  var valid = confirm('Apakah anda yakin dengan transaksi ini?');
  if (valid) {		
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else {
    alert('Browser tidak menunjang AJAX');
    }
    self.xmlHttpReq.open('GET', strURL, true);
    send_dt(self,strid);
    self.xmlHttpReq.send(null);
  }  
}
function send_dt(self,id_div){
		self.xmlHttpReq.onreadystatechange = function() {
        //if (self.xmlHttpReq.readyState == 1 || self.xmlHttpReq.readyState == 2) {
            //onlooadingpage(id_div);
        //}
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText,id_div);
        }
    }

}
function updatepage(str,id_div){
    document.getElementById(id_div).innerHTML = str;
}
function onlooadingpage(id_div){
    document.getElementById(id_div).innerHTML = '<br><center><img src="images/loading.gif"></center>';
}
function link_tutup(strid) {   
    document.getElementById(strid).innerHTML = "";
}
function link_logout() {   
   document.getElementById("frmDiv").innerHTML = "";
   document.getElementById("menuDiv").innerHTML = "";
   window.location.replace('http://local.kopdit.com');
}
