function doLoad(numimg,Width,Height) {
	Width+=20;
	Height+=20;
	if (screen.availWidth){
		b=(screen.availHeight - Height < 0) ? 0:(screen.availHeight - Height)/2-50;
		a=(screen.availWidth -Width < 0) ? 0:(screen.availWidth - Width)/2-50;
	}else{
		a=0;
		b=0;
	}
  	window.open(numimg,'','menubar=yes,scrollbars=no,resizable=no,width='+Width+',height='+Height+',top='+b+',left='+a);
	return false ;
}

function test(){
	returnValue = false ;
	if (document.frm.start_date.value=='') {
		alert('Отсутствует дата заезда!');
		document.frm.start_date.focus();}
	else if (document.frm.final_date.value=='') {
		alert('Отсутствует дата выезда!');
		document.frm.final_date.focus();}
	else if (document.frm.days.value==''){
		alert('Не указано количество дней!');//
		document.frm.days.focus();}
	else if (document.frm.app.selectedIndex == 0){
		alert('Не выбран тип номера');
		document.frm.app.focus();}
	else if (document.frm.col.value==''){
		alert('Не указано количество отдыхающих!');//
		document.frm.col.focus();}
	else if (document.frm.pitanie.selectedIndex == 0){
		alert('Не выбрано питание');
		document.frm.pitanie.focus();}
	else if (document.frm.fio.value==''){
		alert('Не указаны имя и фамилия заказчика!');//
		document.frm.fio.focus();}
	else if (document.frm.citi.value==''){
		alert('Не указан город проживания!');//
		document.frm.citi.focus();}
	else if (document.frm.phone.value==''){
		alert('Не указан контактный телефон!');//
		document.frm.phone.focus();}
	else if (document.frm.mail.value==''){
		alert('Не указан E-mail!');//
		document.frm.mail.focus();}
	else if (document.frm.mail.value.search(/([0-9a-z]+(-|_|\.)*)+@([0-9a-z]+(-|_|\.)*)+\.[a-zA-Z]{2,}\s*$/) < 0){
		alert('Проверьте введеный адрес электронной почты.\nЭто неверный адрес.');
		document.frm.mail.focus();}
	else{
		document.frm.setAttribute('target','myframe');
		document.frm.add.value = ' Ждите... ';
		returnValue = true ;
	}
	return returnValue ;
}

