网站的后台里一级栏目和二级栏目是关联的,我现在想加一个三级栏目与二级栏目关联,怎么修改代码 
原来的代码里有一段js,好像功能是实现二级栏目与一级栏目关联的,代码是这样的 
<script ID="clientEventHandlersJS" LANGUAGE="javascript">
<!--
function select_type()
{
    var pid = form1.pid.options(form1.pid.selectedIndex).value;       
    if (pid != "")
   {    
   //Clear major List
    for(var i=form1.cid.options.length-1;i>=0;--i)
    {
        form1.cid.options.remove(i)
    }    
    var oXMLDoc = new ActiveXObject('MSXML');
    var sURL= "get_type.asp?pid="+pid;
    oXMLDoc.url = sURL;
    var oRoot=oXMLDoc.root;
    if(oRoot.children != null)
    {
        for(var i=0;i<oRoot.children.length;i=i+2)
        {
            oItem = oRoot.children.item(i);
            oItemvalue=oRoot.children.item(i+1);
            sName = oItem.text;
            sValue = oItemvalue.text;
            var oOption = document.createElement('OPTION');
            oOption.text = sName;
            oOption.value = sValue;
            form1.cid.options.add(oOption);
        }
    }
  }  
}
-->
</script>我现在想加一个三级栏目与二级栏目关联,该怎样添加或者修改这段js呢? 
望各位不吝赐教!谢谢!!!