﻿function getPage(pageno)
{
    allowOper = false;          // 锁定操作
    var result = products.getPagination(pageno,cls, idd).value;
    if(result.Code != -1)
    {
        alert(result.Message);
        allowOper = true;       // 解除锁定
        return;
    }
    GetControl("divList").innerHTML = result.Message;
    GetControl("pageCount").innerHTML = result.Pagination[0];
    GetControl("pageButtons").innerHTML = result.Pagination[1];
    allowOper = true;           // 解除锁定
}

var childSortID;        // 全部变量，记录上次打开二级目录的ID号
function getProductSort(productID)
{
    var childSort = GetControl(childSortID);
    if(childSort != null)
        childSort.parentElement.style.display = 'none';
        
    childSortID = "tdChildSort"+productID;
    var td = GetControl(childSortID);
    var result = products.getProductSort(productID).value;
    td.innerHTML = result;
    td.parentElement.style.display = '';
}

function myPageload()
{
    getProductSort(cls);
}