﻿function attribute(varID) {
    var quantity = 1;
    if (document.getElementById("Quantity"))
        var quantity = document.getElementById("Quantity").value;
        
    if(isDigit(quantity)) {
        if (quantity < 1) alert('Quantity should be greater than zero.');
        else AjaxTemplate.getProductMessage(varID,defaultValue,quantity);
    }
    else alert('Please Input Digit Value.');
}
function isDigit(s) { 
    var patrn=/^[0-9]{1,20}$/; 
    if (!patrn.exec(s)) return false; 
    return true; 
} 

