function CheckContactForm(){
	var pass = '';
	if(!document.getElementById('username').value.match(/\S/)){
		pass += 'Ошибка: некорректно введено имя!\n';
	}
	if(!document.getElementById('email').value.match(/@/)){
		pass += 'Ошибка: некорректно введен e-mail!\n';
	}
	if(document.getElementById('phone').value == ''){
		pass += 'Ошибка: поле телефон неможет пустым!\n';
	}
	if(document.getElementById('phone').value.match(/[^0-9]/)){
		pass += 'Ошибка: телефон может состоять только из цифр!\n';
	}
	if(pass != ''){
		alert(pass);
	} else {
		document.contact_form.submit();
	}
}

	function init(gr_id){
		var stretchers = $$('div.menu_content'); 
		var togglers = $$('div.mnr');
		
		preLoad = new Image(); preLoad.src = '/templates/ipr/images/mnla.gif';
		
		var myAccordion = new Fx.Accordion(togglers, stretchers, { opacity: true, alwaysHide: true,
		 transition: Fx.Transitions.quadOut, show: gr_id, duration: 400,
			
			onActive: function(toggler, stretcher){
				toggler.className="mnrAc";
			},
				onBackground: function(toggler, stretcher){
				toggler.className="mnr";
			}
		});
		document.getElementById('menuR').style.visibility = 'visible';
	}



$(document).ready( function () {
		$('.link .link-active').css('display', 'none');
		$('.link .twen-active').css('display', 'none');
		$('.link').hover(
			function (){
				$(this).children('.link-static').css('display', 'none');
				$(this).children('.link-active').css('display', 'block');
				$(this).children('.twen-static').css('display', 'none');
				$(this).children('.twen-active').css('display', 'block');

			},		
			function (){			
				$(this).children('.link-static').css('display', 'block');
				$(this).children('.link-active').css('display', 'none');
				$(this).children('.twen-static').css('display', 'block');
				$(this).children('.twen-active').css('display', 'none');
			}
		);
	}
)

