// JavaScript Document
function IsNumeric(strString)
    //  check for valid numeric strings	
    {
        var strValidChars = "0123456789.-";
        var strChar;
        var blnResult = true;

        if (strString.length == 0) return false;

        //  test strString consists of valid characters listed above
        for (i = 0; i < strString.length && blnResult == true; i++)
        { 
            strChar = strString.charAt(i);
            if (strValidChars.indexOf(strChar) == -1)
            {
                blnResult = false;
            }
        }
        return blnResult;
    }

    function addBasket(prodID,catID,count)
    {
        var qty
        //eval("qty=document.frm_prodlisting.basket_" + count + "_quantity.value")    
        //if ((qty=="Qty...") ||(qty=="Qty.") || (qty==""))
        //{
            qty = 1
        //}
        if (IsNumeric(qty) == true){
            //alert("/Basket.aspx?basket_action=1&amp;basket_product=" + prodID + "&amp;basket_category=" + catID + "&amp;basket_quantity=" + qty )        
            document.frm_product.basket_product.value = prodID
            document.frm_product.basket_category.value = catID
            document.frm_product.basket_quantity.value = qty
            //alert(prodID + "/" + catID + "/" + qty)
            document.frm_product.submit()
            //window.location="/Basket.aspx?basket_action=1&basket_product=" + prodID + "&basket_category=" + catID + "&basket_quantity=" + qty
        }else{
            alert("The quantity you entered is not valid. Please enter number only.");       
        }
    }