function UpItem(Action,pQty,pID) {
    if (Action == 'add') {
        if (isNaN(pQty.value)) {
            alert("Valore digitato in modo scorretto !");
            pQty.focus();
        }
        else {
            window.location = "eCommTB-Basket-Update.aspx?cmd=" + Action + "&ProductQty=" + pQty.value + "&pr=" + pID
        }
    }
    else if (Action == 'del') {
        window.location = "eCommTB-Basket-Update.aspx?cmd=" + Action + "&ProductQty=" + pQty.value + "&pr=" + pID
    }
}

function Num(field) 
{ 
if (isNaN(field.value)) 
{ 
field.value=field.value.substr(0, field.value.length-1); 
}
} 


function OnChangeText(txid, txvalue) {
    var myTxt = document.getElementById(txid);
    myTxt.value = txvalue;
}

function OnChangePass(txid,txvalue) {
    var myTxt = document.getElementById(txid);
    myTxt.value = txvalue;
    myTxt.type  = 'password'
}

 function PassCheck(FrmId,TxPw1,TxPw2)
  {
  MyStr = document.getElementById(TxPw1).value;
  if (MyStr=='' || MyStr.length < 8)
    {
     alert ("la password deve essere lunga almeno 8 caratteri");
     return false; 
    }  
    if (document.getElementById(TxPw1).value != document.getElementById(TxPw2).value)
    {
     alert ("Le password digitare non sono uguali. Controlla e riprova nuovamente");
     return false; 
    } 
  
  }

  function LoadFile() {
      popupWin = window.open('EcommTB-UploadFile.asp', 'EcommTb Window', 'scrollbars,resizable,width=500,height=150,top=0, left=0')
  }

 
