function add_item(data_id)
{
	var url_1='/shcart/?data_id='+data_id+'&step=0&mode=add';
	window.top.frames["win_basket"].location = url_1;

//	var url_1='/shcart/?data_id='+data_id+'&step=2&nstep=2&mode=add';
//	document.location=url_1;

	CreateShMess();
}

/*function add_item(data_id){
	global_open('Товар добавлен в корзину.',3);
	var url_1='/shcart/?data_id='+data_id+'&step=0&mode=add';
	window.top.frames["win_basket"].location=url_1;
}
*/
function log_out()
{
	ht = document.getElementsByTagName("html");
	//ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)"; 
	ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
	if (confirm('Вы действительно хотите выйти?'))
	{
		return true;
	}
	else
	{
		ht[0].style.filter = "";
		return false;
	}
}


toMesHide = null;
tmSh = null;



function CreateShMess()
{
	removeShMess();

	message = "Товар добавлен в корзину. Выбирайте следующий товар или ";
	var text = document.createTextNode(message);

	var elem = document.createElement("div");

	elem.setAttribute('id', 'fixme');
	elem.setAttribute('onclick', 'removeShMess();');

	elem.appendChild(text);

//
//  document.write('<a href="#" onclick="auto_hide();return false;"><img src="/pics/cr.gif" title="Закрыть" alt="Закрыть" width=20 height=22 border=0></a>');



//
	var brelem = document.createElement("br");
	elem.appendChild(brelem);

	var elemlink = document.createElement("a");
	message = "переходите к оформлению заказа.";
	var textlink = document.createTextNode(message);
	elemlink.appendChild(textlink);
	elemlink.setAttribute('href', '/shcart/?step=2&nstep=2&url=/');
	elem.appendChild(elemlink);


	document.getElementsByTagName("body")[0].appendChild(elem);
	toMesHide = elem;
	tmSh = window.setTimeout(removeShMess, 6000);

}



function removeShMess()
{
	if (tmSh)	clearTimeout(tmSh);
	if (toMesHide)
	{
		document.getElementsByTagName("body")[0].removeChild(toMesHide);
		toMesHide = null;
	}
}

