function em (f){
var a = f.bsu_main_login.value;
f.bsu_main_email.value=a;
//alert (f.bsu_main_email.value);
return;// true;
}

function check (f) {
if (f.BINN_CATALOG_1_ORDER_COUNT.value<=0) {
alert ('К сожалению, нельзя заказать "ничего"'); return false;
}
if (f.bc_input_3.value==-1) {
alert ('Пожалуйста, выберите цвет'); return false;
}
if (f.bc_input_7.value==-1) {
alert ('Пожалуйста, выберите размер'); return false;
}
return true;
}

function check_all (f) {
for (var i=0;i<f.getElementsByTagName("select").length;i++){
	if (f.getElementsByTagName("select")[i].value==-1) {
	alert ("Не ко всем товарам указаны размеры и цвета!"); return false;
	}
}
return true;
}

function newwin(name, w, h)
{ 
	var url = "";
	var name = 'win'+name;
	var w_add = 0;
	var h_add = 0;
	if(w!=0)
	{	w += w_add;}
	else
	{	w = 600 + w_add;}
	if(h!=0)
	{	h += h_add;}
	else
	{	h = 600 + h_add;}
		
	var l = window.screen.availWidth/2 - w/2;
	var t = window.screen.availHeight/2 - h/2;
	window.open( url, name, "top="+t+"px,left="+l+"px,width="+w+"px,height="+h+"px,resizeable=yes,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes");

}





function basket_refresh(count,price)
	{

	var documentPrice = window.opener.document.getElementById('jssum');
	var price_oldar=documentPrice.lastChild.nodeValue;
	
	var documentCount = window.opener.document.getElementById('jsprice');
	var count_old=documentCount.lastChild.nodeValue;
	
 
 	            count =window.opener.document.createTextNode(count ) ;
				documentCount.removeChild(documentCount.lastChild);
                documentCount.appendChild(count) ;
				 
				price =window.opener.document.createTextNode(price ) ;
				documentPrice.removeChild(documentPrice.lastChild);
                documentPrice.appendChild(price) ;
				
//	document.form.submit();	
//	window.close();
				

	}
	
	
function spinUp(object)
{
	formObj = document.forms['order_form'];
	formObj.elements[object].value++;
}
function spinDown(object)
{
	formObj = document.forms['order_form'];
	if(formObj.elements[object].value>1)
		formObj.elements[object].value--;
}
function spinUpId(object)
{
	Obj = document.getElementById(object);
	Obj.value++;
}
function spinDownId(object)
{
	Obj = document.getElementById(object);
	if(Obj.value>1)
		Obj.value--;
}