function loadJavaUpdateCom(idb)
{
	var namaText = escape(document.getElementById('namaform').value);
	var alamatWeb = escape(document.getElementById('alamatwebform').value);
	var isiForm = escape(document.getElementById('isiform').value);

	try {ajaxcom = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");}  catch (e) { alert("Upgrade Browser!!");}
         document.getElementById('infoupdate').innerHTML = '- Loading Info Update -';
	 ajaxcom.onreadystatechange = function(){
                 if ((ajaxcom.readyState == 4) && (ajaxcom.status == 200)) {
                        document.getElementById('infoupdate').innerHTML = ajaxcom.responseText;
                 }
         }
         ajaxcom.open('get', 'index.php?act=simcom&idb='+idb+'&nama='+namaText+'&alamt='+alamatWeb+'&isi='+isiForm);
         ajaxcom.send(null);
	 return false;
}
function kopasiti(id, kopAwal, kopAkhir, millisec) {
    var speed = Math.round(millisec / 100);
    var timer = 0;

    if(kopAwal > kopAkhir) {
        for(i = kopAwal; i >= kopAkhir; i--) {
            setTimeout("gantiKopasiti(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
	
	
    } else if(kopAwal < kopAkhir) {
        for(i = kopAwal; i <= kopAkhir; i++)
            {
            setTimeout("gantiKopasiti(" + i + ",'" + id + "')",(timer * speed));
            timer++;
	     if(i == kopAkhir){
	    document.getElementById(id).style.display='block';
	    }
        }
    }
    return false;
}

function gantiKopasiti(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
}
function loadIP()
{
	try {ajaxip = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");}  catch (e) { alert("Upgrade Browser!!");}
         document.getElementById('infoip').innerHTML = '- Loading Info IP -';
	 ajaxip.onreadystatechange = function(){
                 if (ajaxip.readyState == 4) {
                        document.getElementById('infoip').innerHTML = ajaxip.responseText;
                 }
         }
         ajaxip.open("GET", "infoip.php");
         ajaxip.send(null);
}
function LoadPage(page,usediv) {
         try {xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");}  catch (e) { alert("Upgrade Browser!!");}
         document.getElementById(usediv).innerHTML = 'Loading Page...';
         xmlhttp.onreadystatechange = function(){
                 if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
                        document.getElementById(usediv).innerHTML = xmlhttp.responseText;
                 }
         }
         xmlhttp.open("GET", page);
         xmlhttp.send(null);
         return false;
}
