//Ajax Start
var xmlhttp;
var divid;
function loadXMLDoc(url,ppdivid) {
    xmlhttp = null;
    divid = ppdivid;
    //document.getElementById(divid).innerHTML='<img src="/seattle/js/loading.gif">';
    if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
        xmlhttp = new XMLHttpRequest();
    }
    else {// for IE5, IE6
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    xmlhttp.onreadystatechange = state_Change;
    xmlhttp.open("GET", url, true);
    xmlhttp.send(null);
}

function state_Change()
{
if (xmlhttp.readyState==4)
  {// 4 = "loaded"
  if (xmlhttp.status==200)
    {// 200 = "OK"
    document.getElementById(divid).innerHTML=xmlhttp.responseText;
    }
  else
    {
    //alert("Problem retrieving data:" + xmlhttp.statusText);
    document.getElementById(divid).innerHTML='';
    }
  }
}
//Ajax End

function loadCategory(pdivId,catid,ctype)
{   
    var strurl;
    if (ctype =="business")
    {
    strurl="lu_business_sub_type.asp?catid=" + catid;
    //alert(pdivId + '-' + catid);
    }
    else if (ctype=="contributions")
    {
    //Vish Code Start 
    if(catid==4)
    {
        window.location="contributionsquote.asp"
        return;
    }
    //Vish Code End 
    strurl="lu_contribution_sub_type.asp?catid=" + catid;

    }
    loadXMLDoc(strurl,pdivId);   
}
