
function wineff(href,id)
{
	var scr = {
		width:	screen.availWidth,
		height:	screen.availHeight
	};
	var win = {
		width:	850,
		height:	650
	};
	window.open(href, 'eff_'+id, 'left=' + ((scr.width-win.width)/2) + ',top=' + ((scr.height-win.height)/2) + ',width=' + win.width + ',height=' + win.height + ',resizable=yes,scrollbars=yes').focus();
	return false;
}

function win_smi(id)
{
	var scr = {
		width:	screen.availWidth,
		height:	screen.availHeight
	};
	var win = {
		width:	750,
		height:	650
	};
	window.open('/cabinet/advertisement/publishNewspaper/'+id, 'smi_'+id, 'left=' + ((scr.width-win.width)/2) + ',top=' + ((scr.height-win.height)/2) + ',width=' + win.width + ',height=' + win.height + ',resizable=yes,scrollbars=yes').focus();
	return false;
}

/**
 * popup with send pdf form
 */
function winpdf(href)
{
	var scr = {
		width:	screen.availWidth,
		height:	screen.availHeight
	};
	var win = {
		width:	750,
		height:	650
	};
	window.open(href, 'send_pdf', 'left=' + ((scr.width-win.width)/2) + ',top=' + ((scr.height-win.height)/2) + ',width=' + win.width + ',height=' + win.height + ',resizable=yes,scrollbars=yes').focus();
	return false;
}



 function take_otchet2(id_user,from,to) {
var url_base = String(window.location);
//alert("http://ug1.thotal.com/__ajax/otchet2.php?url_base="+url_base+"&id_user="+id_user+"&from="+from+"&to="+to);

   if (id_user && from && to)
	{
		window.location="http://est.ua/__ajax/otchet2.php?url_base="+url_base+"&id_user="+id_user+"&from="+from+"&to="+to;
	}
	else {
		   if (id_user && from)
			{
				window.location="http://est.ua/__ajax/otchet2.php?url_base="+url_base+"&id_user="+id_user+"&from="+from;
			}else {
				window.location="http://est.ua/__ajax/otchet2.php?url_base="+url_base+"&id_user="+id_user;
			}
	}

}
