function load_gallery()
{	
	
	load_div('center_region','index.php?oper=load_towl&kod=41&fp=1');
}
function search_jear()
{
	
	form = GEByID("search_jear");
	//alert( 'search_jear'+form.fromjear.value);
	
	
	
	load_div('center_region','index.php?oper=search_jear&fromjear='+form.fromjear.value+'&tojear='+form.tojear.value);
	
	return;
	var testvar=isNumberString_m(form.fromjear.value);
	alert('testvar='+testvar);
	
	if (testvar==0)
	{ 
		alert("Возраст не число");
		form.fromjear.focus();
		form.fromjear.select();
		return false;
	}
	testvar=isNumberString_m(form.tojear.value);
	if (testvar==0)
	{  
		alert("Возраст не число");
		form.tojear.focus();
		form.tojear.select();
		return false;
	}	
}

function zakaz_validate ()
{
	// проверка введенных даных
	//alert('zakaz_validate');
	
	fpost = GEByID("orderpost");
	
	if (fpost.billingName.value=="")
	{
		alert("Enter your name");
		fpost.billingName.focus();
		fpost.billingName.select();
		return false;
	}
	
	
	if (fpost.recepientname.value=="")
	{
		alert("Enter a name of the addressee");
		fpost.recepientname.focus();
		fpost.recepientname.select();
		return false;
	}
	
	fpost = GEByID("mail_form");
	fpost.zakaz.value= gettextzakaz();
	return true;
	
}
function  gettextzakaz()
{
	//формирование текста  заказа
	//Заказанные товары и дополнительные товары
	zakaz='';
	form = GEByID("orderpost");
	list_obj=form.list_obj.value;
	sum_order=0.00;
	
	//var lf='%0D%0A';
	var lf= "\n";
	var list_objArray = list_obj.split(',');
	
	for (var i = 0; i < list_objArray.length; i++)
	{
		//alert  ('list_objArray[i]='+list_objArray[i]);
		form = GEByID("prais"+list_objArray[i]);
		if (form.check.checked)
		{
			name_wid_tow='';
			wid='';
			ln= -1;
			name_wid='';
			cost_wid='';
			//alert (typeof(form.cost)+' '+form.cost.tagName);
			if (typeof(form.cost)=='object')
			{
				if (form.cost.tagName=="SELECT")
				{
					wid=form.cost.tagName;
					ln= form.cost.selectedIndex;
					name_wid_tow=form.cost.options[ln].text;
					cost_wid_tow =form.cost.options[ln].value;
				}
				
				if (form.cost.type=="radio")
				{
					for (item = 0; item < 3; item++) {
					if (form.cost[Item].checked)
					break;
				}
				wid=form.cost.tagName;
				ln = item;
				if (item==0)      {name_wid_tow =name_wid1;}
				if (item==1)      {name_wid_tow =name_wid2;}
				if (item==2)      {name_wid_tow =name_wid3;}
				cost_wid = form.cost[Item].value;
				
			}
		}
		//form.name_wid_tow.value
		if (name_wid_tow!="")	name_wid_tow=' "'+name_wid_tow+'" '	;
		zakaz=zakaz+lf+"№"+form.kod.value+" "+ form.name_tow.value +name_wid_tow+" (cost:"+
		form.cost.value+"\t"+ " quantity:"+form.count_tow.value+ ", total:"+form.summar.value+')';
	}
}
//alert ('send_order()');

fpost = GEByID("orderpost");
inddost=fpost.time_dost.selectedIndex;

zakaz="Customer :"+lf+
"Name:"+fpost.billingName.value+lf+
"Phone:"+fpost.phone.value+lf+
"Address:"+fpost.billingaddress.value+lf+
lf+
"Addressee:"+lf+
"Name:"+fpost.recepientname.value+lf+
lf+
"Order:"+lf+
zakaz+lf+
"Total cost of the goods and services:"+fpost.sum_pol.value+lf+
"The text on a card:"+fpost.wishes.value+lf+
"Comments to the order:"+fpost.comment.value+lf+
"Date and time of delivery:"+fpost.dat_start.value+' '+ fpost.time_dost.options[fpost.time_dost.selectedIndex].text +lf+
"Payment:"+fpost.payment.value+lf;

return zakaz;
}