<script language="JavaScript" type="text/javascript">
var ii=0;



  function check_recomend(id){
    if (document.getElementById(id).checked==false) ii--;
      else ii++;

    if (ii>0) document.getElementById('dell').disabled=false;
      else  document.getElementById('dell').disabled=true;
    }

  function chk(id){
    if (document.getElementById(id).checked==false) ii--;
      else ii++;

    if (ii>0) document.getElementById('ss').disabled=document.getElementById('mv').disabled=false;
      else document.getElementById('ss').disabled=document.getElementById('mv').disabled=true;
    }


  function delconfirm(get,info){
  	if (confirm("Уверены, что хотите удалить "+info+" ?"))
      this.location=location.pathname+'?'+get;
	}
	function delconfirmnews(get,formnam,Id){
  	if (confirm("Уверены, что хотите удалить новость ?")){
     // this.location=location.pathname+'?'+get;
   
  	document.getElementById(Id).action=location.pathname+'?'+get;
  	//confirm(document.getElementById(Id).action);
  	document.getElementById(Id).submit();
  	}
	}

  function deltovconfirm(){
    if (confirm("Уверены, что хотите удалить товар?")){
      }else{
         document.getElementById('del').name='none';
         document.getElementById('del').type='reset';
document.getElementById('ss').disabled=document.getElementById('mv').disabled=document.getElementById('del').disabled=document.getElementById('eded').disabled=true;
         }
    }

  function sss(val){
    if (val=='') document.getElementById('mv').disabled=true;
      else document.getElementById('mv').disabled=false;
    }

  function validateNum(valu){
    if (isNaN(valu)) errors='Bы вводите не цифры!!!.\nЗначение будет сброшено в "0"';
    if (errors){
      alert('    Ошибка:\n'+errors);
      document.getElementById('new_weight').value=0;
      }
    }
    
function print_card(login){
	confirm("Уверены, что хотите удалить товар?");
  window.open('print_cart.php?login='+login, 1, 'toolbar=no, status=no, scrollbars=yes, location=no, menubar=no, directories=no, height=450, width=400');
  
} 
function ShowPhoto(idg,idph)
{
  window.open('photo.php?idg='+idg+'&idph='+idph,idg, 'toolbar=no, status=no, scrollbars=yes, location=no, menubar=no,resizable=yes, directories=no, height=510, width=510');
}   

function ShowImage(filenam,gallery)
{
  window.open('imag.php?fnam='+filenam+'&gallery='+gallery,0, 'toolbar=no, status=no, scrollbars=yes, location=no, menubar=no,resizable=yes, directories=no, height=590, width=420');
}   

</script>