/* bassnin.ru */

		function _changeCurrency()
		{
			document.ChangeCurrencyForm.submit();
		}
		function _view_stock()
		{
			document.ViewStockForm.submit();
		}
		
	function open_window(link,w,h) //opens new window
	{
		var win = "width="+w+",height="+h+",menubar=no,location=no,resizable=yes,scrollbars=yes";
		newWin = window.open(link,'newWin',win);
		newWin.focus();
	}
	
	function open_printable_version(link) //opens new window
	{
		var win = "menubar=no,location=no,resizable=yes,scrollbars=yes";
		newWin = window.open(link,'perintableWin',win);
		newWin.focus();
	}

	function confirmDelete(id, ask, url) //confirm order delete
	{
		temp = window.confirm(ask);
		if (temp) //delete
		{
			window.location=url+id;
		}
	}

	

	function confirmUnsubscribe() //unsubscription confirmation
	{
		temp = window.confirm('{/literal}{$smarty.const.QUESTION_UNSUBSCRIBE}{literal}');
		if (temp) //delete
		{
			window.location="/index.php?killuser=yes";
		}
	}

	function validate() // newsletter subscription form validation
	{
		if (document.subscription_form.email.value.length<1)
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_EMAIL}{literal}");
			return false;
		}
		if (document.subscription_form.email.value == 'Email')
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_EMAIL}{literal}");
			return false;
		}
		return true;
	}
	function validate_disc() // review form verification
	{
		if (document.formD.nick.value.length<1)
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_NICKNAME}{literal}");
			return false;
		}

		if (document.formD.topic.value.length<1)
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_MESSAGE_SUBJECT}{literal}");
			return false;
		}

		return true;
	}
	function validate_search()
	{

		if (document.Sform.price1.value!="" && ((document.Sform.price1.value < 0) || isNaN(document.Sform.price1.value)))
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_PRICE}{literal}");
			return false;
		}
		if (document.Sform.price2.value!="" && ((document.Sform.price2.value < 0) || isNaN(document.Sform.price2.value)))
		{
			alert("{/literal}{$smarty.const.ERROR_INPUT_PRICE}{literal}");
			return false;
		}

		return true;
	}
function ShowHide(name)
			{
				var object_name = name;
				var obj = document.getElementById(object_name);
				if ( obj.style.display == 'none' ) 
				{
					obj.style.display = 'block';
				}
				else
				{
					obj.style.display = 'none';
				}
			}
//  Slide Switch
/*
function slideSwitch() {
		var $active = $('#frontFeature div.active');

		if ( $active.length == 0 ) $active = $('#frontFeature div:last');

		var $next =  $active.next().length ? $active.next()
		    : $('#frontFeature div:first');

		$active.addClass('last-active');

		$next.css({opacity: 0.0})
		    .addClass('active')
		    .animate({opacity: 1.0}, 2000, function() {
		        $active.removeClass('active last-active');
		    });
		}
$(function() {
		slideSwitch();
		setInterval( "slideSwitch()", 10000 );
		});
*/
