function createPictureWindow(_file,_width,_height) {
	var p = Math.ceil(Math.random()*10000);
	var q = Math.ceil(Math.random()*p);
	windowName = p+'X'+(_width*p)+(_height*q);
	cat = window.open(_file,windowName,"top=50,left=50,width="+_width+",height="+_height+",Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no");
}

function createNoteWindow(_file,_width,_height) {
	var p = Math.ceil(Math.random()*10000);
	var q = Math.ceil(Math.random()*p);
	windowName = p+'X'+(_width*p)+(_height*q);
	_width2=Math.ceil(_width/2);
	_height2=Math.ceil(_height/2);
	cat = window.open(_file+"&wi="+_width2+"&he="+_height2,windowName,"top=50,left=50,width="+_width2+",height="+_height2+",Status=no,toolbar=no,menubar=no,location=no,directories=no,scrollbars=no");
}

// Проверка содержимого полей формы заказа
function FormValid()
{
	Name = document.forms['feedback'].elements['title'].value;
	Location = document.forms['feedback'].elements['location'].value;
	Email = document.forms['feedback'].elements['email'].value;
	Message = document.forms['feedback'].elements['text'].value;

	if (Name == "") {
		alert("Введите, пожалуйста, Ваше имя");
		return false;
	}	

 	else if (Location == "") {
		alert("Введите, пожалуйста, Ваш Город, Страна");
		return false;
	}

 	else if (Email == "") {
		alert("Введите, пожалуйста, Ваш E-mail");
		return false;
	}	
 	else if (Message == "") {
		alert("Введите, пожалуйста, Ваше сообщение");
		return false;
	}	



	else return true;
}

