				    function submitForm() {
						myForm = document.getElementById('uniqueForm');
						fields = myForm.getElementsByTagName('input');
						str="";						
						for (i=0;i<fields.length;i++) {
							if (fields[i].value=="") {
							str = str + fields[i].id + ", ";
							}
						}
						
						fields = myForm.getElementsByTagName('textarea');
						for (j=0;j<fields.length;j++) {
							if (fields[j].value=="") {
							str = str + fields[j].id;
							}
						}
						
						if (str != "") {
						mess = "Поля "+str+" не заполнены";
						createMessage(mess,"formOrderElement");
						} else {
							uniqueForm.submit();
						}
						
					}
function show_photo(photo, imgWidth, imgHeight) {
	var popupBody = document.getElementById('large');
	popupBody.style.border = "solid 1px #bd0120"
	popupBody.style.padding = "0px"
	popupBody.style.margin = "0px"
	popupBody.style.background = "white"
	popupBody.style.position = "absolute"
	popupBody.style.font = "12px #bd0120"
	popupBody.style.color = "#bd0120"
	popupBody.style.display = "";
	var winX = window.screen.width
	var winY = window.screen.height
	if ( navigator.appName == "Microsoft Internet Explorer"){
		var posX = event.screenX;
		var posY = event.screenY;
	}else{
		var posX = (winX - imgWidth)/2;
		var posY = (winY - imgHeight);
	}
	
	popupBody.style.left = posX
	popupBody.style.top = posY
	popupBody.innerHTML = '<div align="center" style="cursor:hand" onclick="hide_photo();">Закрыть</div>' + '<img src="' + photo + '" border=0>'
	
}
function hide_photo() {
	var popupBody = document.getElementById('large');
	popupBody.style.display = "none"
}

function CheckForm(){
				var oForm = document.forms.sendform;
							
				if (oForm.uname.value==""){
					alert("Введите имя!");
					oForm.uname.focus();
					return false;
				}							
				if (oForm.umail.value==""){
					alert("Введите почтовый ящик!");
					oForm.umail.focus();
					return false;
				}	
				if (oForm.utext.value==""){
					alert("Введите текст сообщения!");
					oForm.utext.focus();
					return false;
				}		
				var re="^[a-zA-Z0-9-_.]{1,20}@[a-zA-Z0-9-_.]{1,20}.[a-zA-Z]{1,5}$"; 

				if (! oForm.umail.value.match(re)) {
					alert("Некорректный адрес электронной почты. Укажите латинскими буквами, цифрами и подчеркиванием!");
					oForm.umail.focus();
					return false;
				}		
			
				
			}					
					
				