function GetEncodeUri(val)
{
    if (isArray(val))
    {
        for(var j=0;j<val.length;j++)
        {
            val[j] = GetEncodeUri(val[j]);
        }
        return val;
    }
    else
        return encodeURI(val);
}

function isArray(v) {
    return Object.prototype.toString.apply(v) === "[object Array]";
}

function ShowElement(divId,isShow)
{
    var div = document.getElementById(divId);
    if (div!=null)
    {
        if (div.tagName == 'TR')
            div.style.display=(isShow?'table-row':'none');
        else
            div.style.display=(isShow?'block':'none');
    }
}

function ShowElements(arrDivIds,isShow)
{
    if (isArray(arrDivIds))
        for (var i = 0; i < arrDivIds.length; i++) {
            ShowElement(arrDivIds[i],isShow);
        }
}




