function getData(regid, ident) {  
    var xmlhttp;
    var url;
    var theend;
    var sectionid = regid;   
    if (ident == "ctype"){
        url="handler.php?sectionid=" + sectionid;
    }
    else if (ident == "info"){
        url="detail.php?sectionid=" + sectionid;
    }
    else if (ident == "edit"){
        ident = 'info';
        url="editor.php?sectionid=" + sectionid;
    }
    else if (ident == "pay"){
        url="payinsert.php?sectionid=" + sectionid;
    }    
    function GetXmlHttpObject() {
        if (window.XMLHttpRequest) {
            // code for IE7+, Firefox, Chrome, Opera, Safari
            return new XMLHttpRequest();
        }
        if (window.ActiveXObject) {
            // code for IE6, IE5
            return new ActiveXObject("Microsoft.XMLHTTP");
        }
        return null;
    }    
    xmlhttp=GetXmlHttpObject();
    if (xmlhttp==null){
        alert ("Browser does not support HTTP Request");
        return;
    }    
    function handleSectionSelectionChanged() {
        //alert(ident);
        obj = document.getElementById(ident);
        if(ident == "ctype"){
            if (xmlhttp.readyState==4){
                document.getElementById("smallgif").style.display = "none";
                document.getElementById("ctype").style.display = "block";
                obj.innerHTML = xmlhttp.responseText;
            }
        }
        else{
            //alert(document.getElementById(ident).value);
            if (xmlhttp.readyState==4){
                theend = "n";
                loader(theend);
                obj.innerHTML = xmlhttp.responseText;
            }
        }
    }
    xmlhttp.onreadystatechange=handleSectionSelectionChanged;
    xmlhttp.open("GET",url,true);    
    xmlhttp.send(null);    
}


