﻿    function numbersonly(e)
     {
     
     var unicode;
    if (window.event) unicode = window.event.keyCode;
    else if (e) unicode = e.which;
        if (unicode!=8 && unicode!=46 && unicode!=37 && unicode!=39){ //if the key isn't the backspace key (which we should allow)
        if ( (!(unicode>47 && unicode<58)) && (!(unicode>95 && unicode<106)) ) //if not a number
        return false //disable key press
        }
    }
        function MM_openBrWindow(theURL,winName,features) { //v2.0
        window.open(theURL,winName,features);
        
    }


function CheckWishListQty()
        {
        
        
          var Inputs=document.getElementsByTagName('input');
        
            for(var i=0; i<Inputs.length; i++)
            {
                if(Inputs[i].getAttribute('type')=='text')
                {
                    
                   var txt=Inputs[i];
                   
                   if((txt.value<=0 || isNaN(txt.value)) && txt.id.indexOf('Qty')!=-1 )
                    {
                    alert('Please enter valid Quantity in Gift Registry.');
                    txt.value=1;
                    txt.focus();
                    return false;
                    }
                
                }
            }
        
        
        }
