function open_wind(w, h, id, table)
{     
   var l=(screen.width-w)/2;
   var t=(screen.height-h)/2;   
   attrs="width="+w+", height="+h+", left="+l+", top="+t+", resizable=no, status=no, location=no, scrollbars=no";   
   wnd_name='img'+(Math.round(Math.random()*10000));
   var params="show.php?id="+id+"&table="+table;
	wnd=window.open(params, wnd_name, attrs); 
   wnd.focus();
}

function open_feedback(w, h, id, seller, from, tov, tip, back)
{     
   var l=(screen.width-w)/2;
   var t=(screen.height-h)/2;   
   attrs="width="+w+", height="+h+", left="+l+", top="+t+", resizable=no, status=no, location=no, scrollbars=no";   
   wnd_name='img'+(Math.round(Math.random()*10000));
   var params="feedback.php?id="+id+"&from="+from+"&seller="+seller+"&tov="+tov+"&tip="+tip+"&back="+back;
	wnd=window.open(params, wnd_name, attrs); 
   wnd.focus();
}

function change(id)
{
	var big=document.getElementById("foto1");
	var current=document.getElementById("foto"+id);
	temp=big.src;
	big.src=current.src;
	current.src=temp;	
}

function check_all(form_name, check_name)
{
   var i;
   var n=form_name.length;   
   for(i=1;i<n;i++)
   {
      if (form_name[i].type=='checkbox')
      {         
		 if(check_name.checked==false) form_name[i].checked=false;         
		 else form_name[i].checked=true;		 
      }
   }
}