//deschide o noua fereastra cu detalii despre produse

function openWin(adresa,winname) {
//  delta=100;
//  dx=parseInt(w)+50; if (dx<250) dx=250;
//          if (dx > screen.availWidth-delta)  { dx=screen.availWidth-delta;  pozx = delta/2; } else { pozx = (screen.availWidth -dx)/2; }
//  dy=parseInt(h)+130;
//          if (dy > screen.availHeight-delta) { dy=screen.availHeight-delta; pozy = delta/2; } else { pozy = (screen.availHeight-dy)/2; }

//  window.open("detalii.php?nume="+nume+"&img="+img+"&w="+w+"&h="+h,img,"toolbar=no,hotkeys=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+dx+",height="+dy+",left=" + pozx + ",screenX=" + pozx + ",top=" + pozy + ",screenY=" + pozy);
  window.open(adresa,winname,"toolbar=no,hotkeys=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width=400,height=500"); //,width="+dx+",height="+dy+",left=" + pozx + ",screenX=" + pozx + ",top=" + pozy + ",screenY=" + pozy);
}

function check_comanda_form(){

  nume      = comanda_form.numep.value;
  adresa    = comanda_form.adresa.value;
  oras      = comanda_form.oras.value;
  codpostal = comanda_form.codpostal.value;
  judet     = comanda_form.judet.value;
  telefon   = comanda_form.telefon.value;
  email     = comanda_form.email.value;
  
  if ( nume =='' ) {
    alert("Va rugam sa completati numele!");
    comanda_form.numep.focus();
    return false;
  }

  if ( adresa =='' ) {
    alert("Va rugam sa completati adresa!");
    comanda_form.adresa.focus();
    return false;
  }

  if ( oras =='' ) {
    alert("Va rugam sa completati orasul!");
    comanda_form.oras.focus();
    return false;
  }

  if ( codpostal =='' ) {
    alert("Va rugam sa completati codul postal!");
    comanda_form.codpostal.focus();
    return false;
  }

  if ( judet =='' ) {
    alert("Va rugam sa completati judetul!");
    comanda_form.judet.focus();
    return false;
  }

  if ( telefon =='' ) {
    alert("Va rugam sa completati numarul de telefon!");
    comanda_form.telefon.focus();
    return false;
  }

  if ( email =='' ) {
    alert("Va rugam sa completati adresa de email!");
    comanda_form.email.focus();
    return false;
  }

//  if ( nume =='' || adresa =='' || oras =='' || codpostal =='' || judet =='' || telefon =='' || email =='' ) {
//    alert("Va rugam sa completati toate campurile !");
//    return false;
//  }
  
  return true;
}

function check_contact_form(){

  return true;
}

function check_recomanda_form(){

  return true;
}


