/*var winWidth=1024; // ширина окна
var winHeight=680; // высота окна
// изменяем размер
window.resizeTo(winWidth, winHeight);

// окно в центр экрана
var winPosX=screen.width/2-winWidth/2;
var winPosY=screen.height/2-winHeight/2;
window.moveTo(winPosX, winPosY);
*/
function  cmf_hider(name,id)	{
	el=document.getElementById(name+id);
		if(el.style.display=='none') el.style.display='';
		else el.style.display='none';
}
function that(id){return document.getElementById(id)}
function CheckQuestionForm()
{

	if (that('author_name').value == '')
	{
		alert("Не указано имя. "+that('author_name').value);
		return false;
	}

	if (that('author_mail').value == '' ||
		that('author_mail').value.search(/^[0-9a-zA-Z_\-\.]+@[0-9a-zA-Z_\-\.]+\.[a-z]{2,5}$/) == -1)
	{
		alert("Не указан или некорректен адрес электронной почты.");
		return false;
	}

	if (that('author_phone').value == '')
	{
		alert("Введите номер телефона");
		return false;
	}

	if (that('author_text').value == '')
	{
		alert("Введите свой вопрос");
		return false;
	}

	if (that('author_captcha').value == '')
	{
		alert("Введите текст с картинки");
		return false;
	}
	
	

	return true;

}
