function checkEmail(email) {
	if(!email) return email;
	if(!email.match(/^[\w\.\-]+@[\w\.\-]+\.[a-zA-Z]{2,}$/i, "")) return false;
	return true;
}



function checkFeedbackForm() {
	var required = {
		"name"		:	"Вы не ввели Ваше имя",
		"msg"		:	"Вы не ввели сообщение"
	};
	for (var i in required) {
		var el = document.getElementById(i);
		if (!el.value) {
			alert(required[i]);
			el.focus();
			return false;
		}
	}
	return true;
}

function openWindow(fname, width, height) {
	if (screen.height<=550 && screen.width<=700) { 
		document.location = fname;
	} else {
		if(!height) height = 800;
		if(!width) width = 600;		
		newHeight = height + 20;
		PopupWin = window.open(fname, "_blank", "height="+newHeight+",width="+width+",menubar=no,status=no,titlebar=no,toolbar=no,location=no,resizable=no,scrollbars=no"); }
	return false;
}

var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {
(message);
return false;}}}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS;
}else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false");


var rightFrame = {
	open: function(n) { return true; }
}


