var img_temp_arr=new Array();
var img_temp_num=0;
function temp_img(src)
{
	img_temp_num++;
	img_temp_arr[img_temp_num]=new Image();
	img_temp_arr[img_temp_num].src=src;
}
function popup(url, w, h)
{
	if (w==undefined) { w=850; }
	if (h==undefined) { h=600; }
	win=window.open(url, '', "height="+h+",width="+w+",scrollbars=1,resizable=1");
	win.focus();
}
function foto_big_sc (foto, foto_w, foto_h)
{
	win=window.open("foto_big.php?foto="+foto, "","height="+(foto_h*1+50)+",width="+(foto_w*1+50)+",scrollbars=1,resizable=1");
	win.focus();
}
function foto_del_sc(pole, id)
{
	if (confirm("Удалить?"))
	{
		document.edit_form.foto_del_pole.value=pole;
		document.edit_form.foto_del_id.value=id;
		document.edit_form.submit();
	}
}

function reting_over(name, n)
{
	for(i=1; i<=5; i++)
	{
		if (n>=i)
		{
			document.all[name+'_img_'+i].src="img/stars_1.gif";
		}
		else
		{
			document.all[name+'_img_'+i].src="img/stars_0.gif";
		}
	}
}

function reting_out(name, reting)
{
	reting*=100;
	for(i=1; i<=5; i++)
	{
		if ((i*100<(reting+100))&&(i*100>reting))
		{
			document.all[name+'_img_'+i].src="img/stars_10.gif";
		}
		else if(i*100<=reting)
		{
			document.all[name+'_img_'+i].src="img/stars_1.gif";
		}
		else
		{
			document.all[name+'_img_'+i].src="img/stars_0.gif";
		}
	}
}

function reting_sc(reting, id, name)
{
	document.edit_form.reting.value=reting;
	document.edit_form.reting_id.value=id;
	document.edit_form.reting_name.value=name;
	document.edit_form.submit();
}