function displ(ddd) { 

if (document.getElementById(ddd).style.display == 'none') 
{document.getElementById(ddd).style.display = 'block'}
else
{document.getElementById(ddd).style.display = 'none'} }


function open_window(link,www,hhh) //opens new window
	{
		var sss = hhh;
		var wwidth = (document.viewport.getWidth() - sss) / 3 ;
		var win = "width="+www+",height="+sss+",left="+wwidth+" ,menubar=0,location=0,resizable=0,scrollbars=1";
		newWin = window.open(link,'newWin',win);
		newWin.focus();
		
	}

	function confirmDelete() //unsubscription confirmation
	{
		temp = window.confirm('{/literal}{$smarty.const.QUESTION_UNSUBSCRIBE}{literal}');
		if (temp) //delete
		{
			window.location="index.php?killuser=yes";
		}
	}

	function validate_custinfo() //validate customer information
	{
		if (document.custinfo_form.first_name.value=="")
		{
			alert("Заполните все поля, отмеченные *");
			return false;
		}
		
				if (document.custinfo_form.last_name.value=="")
		{
			alert("Заполните все поля, отмеченные *");
			return false;
		}
		
						if (document.custinfo_form.address.value=="")
		{
			alert("Заполните все поля, отмеченные *");
			return false;
		}

		
			if (document.custinfo_form.phone.value=="")
		{
			alert("Заполните все поля, отмеченные *");
			return false;
		}
		
		if (document.custinfo_form.city.value=="")
		{
			alert("Заполните все поля, отмеченные *");
			return false;
		}
		
				if (document.custinfo_form.address.value=="")
		{
			alert("Заполните все поля, отмеченные *");
			return false;
		}
		


		return true;
	}
	
