               

                function onSend() {
                        theForm = document.webforms;
						
						if (theForm.fname.value == "") {

                                alert("Пожалуйста, заполните поле 'Имя и Фамилия'.");

                                theForm.fname.focus();

                                return false;

                        }
						
						if (theForm.company.value == "") {

                                alert("Пожалуйста, заполните поле 'Компания'.");

                                theForm.company.focus();

                                return false;

                        }
						
						if (theForm.delivery.value == "") {

                                alert("Пожалуйста, заполните поле 'Должность'.");

                                theForm.delivery.focus();

                                return false;

                        }
						
						if (theForm.phone.value == "") {

                                alert("Пожалуйста, заполните поле 'Контактный телефон'.");

                                theForm.phone.focus();

                                return false;

                        }
						
						
						 
                        if (theForm.email.value == "") {

                                alert("Пожалуйста, заполните поле 'e-mail'.");
                                theForm.email.focus();

                                return false;

                        }

                        else if (theForm.email.value.indexOf ( "@" ,1 ) == -1 ) {

                                alert("Пожалуйста, используйте формат: you@data.com для поля 'e-mail'." ) ;

                                theForm.email.focus();

                                return false;

                        }

                        
						
						

						theForm.submit();

                }
				
	function testKey(e) {
		var key = (typeof e.charCode == 'undefined' ? e.keyCode : e.charCode);
		
		if (e.ctrlKey || e.altKey || key < 32)
		return true;

		key = String.fromCharCode(key);		
		var sign = /[0-9-.\)\(\s]/.test(key);
		if(!sign) alert("Пожалуйста, используйте формат: 123 456 789 .");
		return sign;
		


	}
	
		
	function openWin(url, id, w, h) {
		
	
   NewWin = window.open('', id, 'location=no,status=no,resizable=yes,toolbar=no,scrollbars=no,menubar=no,top=100,left=100,width='+ w +',height='+ h);
   NewWin.document.writeln('<html><head><title>Место проведения семинара</title></head><body style="margin:0px; padding:0px;"><a href="javascript:window.close()"><img src="'+url+'" border="0" width="'+w+'" height="'+h+'" alt="Закрыть окно"></a></body></html>');
   NewWin.document.close();
   NewWin.focus();
   return false;
}
