function wind(w,h)
	{
	window.open("/send.php", "window","location=0,toolbar=0,menubar=0,top=10,left=10,width="+w+",height="+h);
	}
	
	function out_popup(id,did,w,h)
	{
	window.open("/out.php?id="+id+"&version=popup&did="+did, "window","location=0,toolbar=0,menubar=0,top=10,left=10,width="+w+",height="+h);
	}
	
	function popup(id,w,h)
	{
	window.open("/popup_photos.php?idreport="+id, "window","location=0,toolbar=0,scrollbars=auto,menubar=0,top=10,left=10,width="+w+",height="+h);
	}
	
	function video(file,w,h,param)
	{
	window.open("/video.php?file="+file+"&param="+param, "window","location=0,toolbar=0,menubar=0,top=10,left=10,width="+w+",height="+h);
	}
	
	function img(image) 
{
window.open("/show_img.php?image="+image,"show_img","width=200,height=200,top=0,left=0,resizable=no,location=no,scrollbars=no,status=no,toolbar=no,directories=no");
}
	
	function ch_checkbox_count(form_name,ch_name)
{
var count = 0;
t=document.forms[form_name].elements.length;
	for(i=0;i<t;i++)
		{
str=new RegExp(ch_name,"i");
regexp=str.test(document.forms[form_name].elements[i].name);
	if(regexp==true)
	{
		if(document.forms[form_name].elements[i].checked == true)
		{
		count++;
		}
	
	}
		}
		if(count == 1)
			return true;
		else
			return false
}