 $(document).ready(
    function() {
    	

 $('#find_form2').load("/find/?group_id=16394&amp;cmd=getfindform&amp;"+Math.round(Math.random()*10000000));
 $('#find_form').load("/find/?group_id=16386&amp;cmd=getfindform&amp;"+Math.round(Math.random()*10000000),function()
			{
		$(document).ready(
			    function() {
			    	$('select.select_middle').combobox(
			    			 {
			    				 comboboxValueClass: 0,
			    				 comboboxColorClass: "#ffcc00",
			    				 comboboxColorClassDefault: "#fff",
			    				 comboboxContainerClass: "comboboxContainer",
			    				 comboboxValueContainerClass: "comboboxValueContainer", 
			    				 comboboxValueContentClass: "comboboxValueContent", 
			    				 comboboxDropDownClass: "comboboxDropDownContainer", 
			    				 comboboxDropDownButtonClass: "comboboxDropDownButton", 
			    				 comboboxDropDownItemClass: "comboboxItem", 
			    				 comboboxDropDownItemHoverClass: "comboboxItemHover", 
			    				 comboboxDropDownGroupItemHeaderClass: "comboboxGroupItemHeader", 
			    				 comboboxDropDownGroupItemContainerClass: "comboboxGroupItemContainer", 
			    				 animationType: "slide", 
			    				 width: "248px",
			    				 height:"15px"
			    			 }
			    			 );
			 $('select.select_multiple').multiSelect(
					 {
						 oneOrMoreSelected: '% выбрано пунктов',
						 noneSelected:'выбрать значения'

					 }
					 );
			    });
			}
			);



    });
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 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;
	}
}


var toMesHide = null;
var 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);

	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;
	}
}

