function popupWindow(url) {
	window.open(url,'popupWindow',	'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}

var i = 0;
var s = 0;

function resize() {
	if (navigator.appName == 'Netscape') i = 40;
	if (window.navigator.userAgent.indexOf("SV1") != -1) s = 20;
	if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+60-i+s);
	self.focus();
    if (document.images[0]) {
		imgHeight = document.images[0].height + 120 - i;
		imgWidth = document.images[0].width + 30;
		var height = screen.height;
		var width = screen.width;
		var leftpos = width / 2 - imgWidth / 2;
		var toppos = height / 2 - imgHeight / 2; 
		window.moveTo(leftpos, toppos);  
		window.resizeTo(imgWidth, imgHeight);
	}
}

function VerifForm () {
	var VerifMail = ControlChamp(document.newsletter_form.email, 'email');
	if ((!VerifMail)) {
		alert ('A megadott e-mail cím helytelen!');
    } else {
		document.newsletter_form.submit();
	}
}

function ControlChamp(obj,typ) {
	var Regex = new RegExp("^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$");
    var Result = Regex.test(obj.value);
    return Result;
}
