//Клиент. Схлопывание/расхлопывание менюшки + изменение картинки рядом. см файл /xsl/units/catalogue/client/navigation.xslt
function OnMenuClick(SubMenuId, GlobalImagesPath) 
{
	var SubmenuTR = document.getElementById(SubMenuId + '_groups');
	var UpmenuImg = document.images[SubMenuId + '_pointer'];

	if (SubmenuTR)  {
		if (SubmenuTR.style.display == "none")  {
		SubmenuTR.style.display = "inline";
		UpmenuImg.src= GlobalImagesPath + "minus.gif"
		}
		else  {
		SubmenuTR.style.display = "none";
		UpmenuImg.src= GlobalImagesPath + "plus.gif"
		}
	}
}
///Открывание поиска в новом окне
function BeginSearch() {
	var Query = document.getElementById("query_textfield");
	PopupWindow('viewer.aspx?obj=localsearch&q=' + escape(Query.value) + '&s=' + document.getElementById('SiteId').value);				
}
//Обратная связь. Проверялка на заполнение формы заказа каталога 
function TestClientFormAndSend (UniqueID, eventArgument)
{
	var Name    = document.getElementById(UniqueID + "_customer_name").value;
	var Contact = document.getElementById(UniqueID + "_customer_contact").value;

	if ( (Name.length !=0 )&&(Contact.length!=0))
	{
		__doPostBack(UniqueID, eventArgument);
	}
	else
	{
		alert('Заполните пожалуйста поля \"Имя\" и \"Контактная информация\" \n ');
	}
}

//Показывание диалога для неаутентифицированных пользователей
function ShowRegDialog() {
	var pDialog = document.getElementById("dialog");
	if(pDialog != null) pDialog.style.display = "block";
}

//Скрытие диалога для неаутентифицированных пользователей
function HideRegDialog() {
	var pDialog = document.getElementById("dialog");
	if(pDialog != null) pDialog.style.display = "none";
}
/*
function SetQueryString()
{
	document.getElementById("SearchButton").href = document.getElementById("SearchButton").href + "?word=" + document.ConstructorForm.find.value + "&number=1&kind=like&sel_ojsh=ON&sel_sis=ON&x=48&y=6";
}
*/

function Test() {
	window.location.assign('http://localhost/Statistica/default.aspx#dsfdsafdsafdsaf');
	alert('test');
}
