function lnkm (u,d)
{
	chiocc='@';
	ml=u+chiocc+d;
	ind_completo='mai'+'lt'+'o:'+ml;
	top.location.href=ind_completo;
}
function foto(url) 
{
	fin2 = window.open(url,'fin','scrollbars=no, resizable=no, width=10, height=10,toolbar=no, status=no, left=10, top=20');
	fin2.focus();
} 
function foto1(url) 
{
	fin2 = window.open(url,'fin','scrollbars=yes, resizable=yes, width=10, height=10,toolbar=no, status=no, left=10, top=20');
	fin2.focus();
} 

function foto_prod(url){
	fin_frame = window.open(url,'fin_prod','scrollbars=yes, resizable=yes, width=700, height=580,toolbar=no, status=no, left=10, top=20');
	fin_frame.focus();
} 
/*
function popup(url) 
{
	fin = window.open(url,'carrello','scrollbars=yes, resizable=yes, width=10, height=10,toolbar=no, status=no, left=10, top=20');
	fin.focus();
} 
*/


  function conferma(url) {
	 var annulla = window.confirm("Eliminare questo prodotto dal carrello?");
        if (annulla) {
           window.location=url;
        }
		else
		{
			return false;
		}
  }

function Validator(theForm)
{
  var checkOK = "0123456789";
  var checkStr = theForm.quantita.value;
  var allValid = true;

  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }

  if (!allValid || checkStr=="" || checkStr<=0)
  {
    alert("Indicare un valore numerico intero");
    theForm.quantita.focus();
    return (false);
  }
return (true);
} 

function popup(ID) 
{
	larg=450; 
	alt=350;
	fin = window.open('../gallery.php?ID_prodotto='+ID,'','scrollbars=yes, resizable=no, width='+larg+', height='+alt+',toolbar=no, status=no, left=50, top=60');
	fin.focus();
} 

