﻿/**
* hoverIntent is similar to jQuery's built-in "hover" function except that
* instead of firing the onMouseOver event immediately, hoverIntent checks
* to see if the user's mouse has slowed down (beneath the sensitivity
* threshold) before firing the onMouseOver event.
* 
* hoverIntent r5 // 2007.03.27 // jQuery 1.1.2+
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
* 
* hoverIntent is currently available for use in all personal or commercial 
* projects under both MIT and GPL licenses. This means that you can choose 
* the license that best suits your project, and use it accordingly.
* 
* // basic usage (just like .hover) receives onMouseOver and onMouseOut functions
* $("ul li").hoverIntent( showNav , hideNav );
* 
* // advanced usage receives configuration object only
* $("ul li").hoverIntent({
*	sensitivity: 7, // number = sensitivity threshold (must be 1 or higher)
*	interval: 100,   // number = milliseconds of polling interval
*	over: showNav,  // function = onMouseOver callback (required)
*	timeout: 0,   // number = milliseconds delay before onMouseOut function call
*	out: hideNav    // function = onMouseOut callback (required)
* });
* 
* @param  f  onMouseOver function || An object with configuration options
* @param  g  onMouseOut function  || Nothing (use configuration options object)
* @author    Brian Cherne <brian@cherne.net>
*/
/* function byCase()
{
    var qty;
    qty = document.getElementById("bycase").value;
    if (qty == '') { 
            alert('Please enter an amount of items greater than zero.'); 
        }
        else{
            var mycase = 6;
            var totalqty = mycase * qty;
            document.getElementById("qty").value = totalqty;
            return true;
        }
}
function byBottle(){
    var qty;
    qty = document.getElementById("bybottle").value;
    if (qty == '') { 
            alert('Please enter an amount of items greater than zero.'); 
        }
        else{
            document.getElementById("qty").value = qty;
            return true;
        }
} */
function verification(input) { 
    var value = input.value; 
    var regp = /[^0-9]/; 
    if (regp.test(value)) { 
        value = value.replace(regp, ''); 
        input.value = value; 
    } 
}                                    
//function empty(input) { 
//    var value = input.value; 
//    var regp = /[^0-9]/; 
//    if (value = '') { 
//       alert('Please enter an amount of items greater than zero.') 
//    } 
//}

