
function menu_Over(text)
{
	document.getElementById(text).style.background = "#cad6e2";
}

function menu_Out(text)
{
	document.getElementById(text).style.background = "#efefef";
}

function menu_Out2(text1, text2)
{
	document.getElementById(text1).style.background = "#adc2ea";
	document.getElementById(text2).style.background = "#adc2ea";
}

function Search()
{
	if (document.forms['search'].text.value.replace(/\s/g, "") == "")
	{
		alert ("Введите критерий для поиска информации на сайте.");
		return false;
	}

}

function openWindow(url, width, height)
{
	var idwindow = window.open("", "", "left = " + eval((screen.width / 2) - (width / 2)) + ", top = " + eval((screen.height / 2) - (height / 2)) + ", width = "+ eval(width + 10) +", height = "+ eval(height + 10) +", toolbar = 0, menubar = 0, location = 0, directories = 0, scrollbars = 0, resizable = 1");
	idwindow.focus();
	idwindow.document.writeln('<html><head><title>Просмотр подробного изображения</title>');
	idwindow.document.writeln('<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">');
	idwindow.document.writeln('<META NAME="Author" CONTENT="Программировал и верстал Аринин Александр (www.arininav.ru)"></head>');
	idwindow.document.writeln('<body marginheight="0" marginwidth="0" bottommargin="5" topmargin="5" leftmargin="5" rightmargin="5">');
	idwindow.document.writeln('<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%"><tr><td align="center"><a href="#" onclick="window.close(); return false;"><img src="'+ url +'" width="'+ width +'" height="'+ height +'" border="0" alt="Закрыть окно"></a></td></tr></table>');
	idwindow.document.writeln('</body></html>');
}

function addToOrder(url, name, width, height)
{
	var idwindow = window.open(url, name, "left = " + eval((screen.width / 2) - (width / 2)) + ", top = " + eval((screen.height / 2) - (height / 2)) + ", width = "+ width +", height = "+ height +", toolbar = 0, menubar = 0, location = 0, directories = 0, scrollbars = 0, resizable = 0");
	idwindow.focus();
}

function forAsk()
{
	if (confirm("Вы действительно хотите удалить эту позицию из заказа?"))
		return true;
	else
		return false;
}

function reCount()
{
	document.forms['basket'].action.value = "recount";
	document.forms['basket'].submit();
}

function Enter()
{
	if (document.forms['reg'].email.value.replace(/\s/g,'')=='')
	{
		alert ("Ключевое поле \"E-mail\" не заполнено!");
		return false;
	}
	else if (document.forms['reg'].pass.value.replace(/\s/g,'')=='')
	{
		alert ("Ключевое поле \"Пароль\" не заполнено!");
		return false;
	}
	else
	{
		document.forms['reg'].send_reg.disabled=true; return true;
	}
}
