function doSearch (catParam){
    if (document.getElementById('simpleSearch').sr.value.length > 0) {
        document.getElementById('simpleSearch').action="<%=path%>assetSearchSimple.jsp"+catParam;
        document.getElementById('simpleSearch').submit();
    }else{
        document.getElementById('simpleSearch').sr.focus();
    }
}

function handleEnter (field, event, catParam) {
    var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
    if (keyCode == 13) {
        document.getElementById('simpleSearch').action="<%=path%>assetSearchSimple.jsp"+catParam;
        document.getElementById('simpleSearch').submit();
        return false;
    }else{
        return true;
    }
}

function confirmAssetDeletion(productUID) {
    if (confirm('Deleting current asset and its product variations. Are you sure ?')) {
        document.location.href="assetDelete.jsp?prodUID="+productUID;
    }
}

function confirmCategoryDeletion(categoryUID) {
    if (confirm('Deleting current category and any sub-categories, products, and ' +
        'product variations. ' + 'Are you sure ?')) {
        document.location.href="categoryDelete.jsp?catUID="+categoryUID;
    }
}

function goToPage () {
    var URL = "section.jsp?s="+ document.navList.navWidget.value;
    if (document.navList.navWidget != "NONE") {
        document.location=URL;
    }
}

        function CloseProgressWindow()
            {
                try
                {
                    if (progressWindow && !progressWindow.closed)
                    {
                        progressWindow.close();
                    }
                }
                catch (dummy)
                {}
            }

            function onLoad()
            {
                if (window.onPageLoad) onPageLoad();
            }

