/<script Language="JavaScript" src="valid.js">
/</script>

function is_empty( name, text )
{
	if(name == '')
	{
		alert('Вы не заполнили ' + text);
		return false;
	}
	else
		return true;
}

function is_validemail(email)
{
	re = /^([a-z0-9_\-]+\.)*[a-z0-9_\-]+@([a-z0-9][a-z0-9\-]*[a-z0-9]\.)+[a-z]{2,4}$/i;
	return re.test(email);
}

function is_del( text )
{
	if(confirm( 'Вы действительно хотите удалить  ' + text + ' ?'))
		return true;
	else
		return false;
}

function is_vacancy()
{
	text = '';
	if(document.all.theme.value == '')
	{
		text += "Вы не выбрали вакансию.\n";
	}
	if(document.all.email.value == '')
	{
		text += "Вы не заполнили E-mail.\n";
	}
	if(document.all.userfile.value == '')
	{
		text += "Вы не вложили резюме.\n";
	}
	if(!is_validemail(document.all.email.value))
	{
		text += "Не корректный E-mail.\n";
	}
	
	if(text == '')
	{
		return true;	
	}
	else
	{
		alert ( text );
		return false;
	}
}
