// <!CDATA[

function CreateSubMenu(cid) {
    //document.activeElement
    //cell = document.createElement("td");
    //cell.setAttribute("colSpan", colspan);
    ////cell.attributes.getNamedItem("colspan").nodeValue = colspan; 
    //text = CreateHtmlNode("div", divItems.innerHTML);
    //cell.appendChild(text);
    //GridView1.insertRow(rowindex + 1);
    //GridView1.rows[rowindex + 1].appendChild(cell);
    //alert(GridView1.rows[rowindex].cells[0].id);
    //GridView1.rows[rowindex].cells[0]..innerHTML = divItems.innerHTML;

    var a = document.getElementById(cid).getElementsByClassName("details")[0];//.getElementsByTagName("div")[0];
    a.innerHTML = divItems.innerHTML;
    //for(var i=0; i<a.length; i++)
    //{
    //    if (a[i].id == "divDetails")
    //    {
    //        a[i].innerHTML=divItems.innerHTML;
    //        break;
    //    }
    //}
}

function CloseSubMenu(cid) {
    var a = document.getElementById(cid).getElementsByClassName("details")[0];
    a.innerHTML = "";
}


function CreateHtmlNode(tag, text) {

    var n = document.createElement(tag);
    if (text) n.innerHTML = text;
    return n;
}

// ]]>