var popup = null;
function openPopup(mypage,myname) {
	var winHeight = 400;
	var winWidth = 600;
	var leftPos = (screen.width - winWidth) / 2;
	var topPos = (screen.height - winHeight) / 2;

	var settings = 'height='+winHeight+',width='+winWidth+',top='+topPos+',left='+leftPos+',scrollbars=yes,resizable=0';

	popup = window.open(mypage, myname, settings)
	popup.focus();
	popup.moveTo(leftPos, topPos);
}

var win3D = null;
function open3D(paramURL) {	
	var winHeight = 480;
	var winWidth = 1024 - 10;
	if (screen.width < 1024) {
		winWidth = screen.width - 10;
		window.outerWidth = screen.width - 10; 
	} 
	var leftPos = (screen.width - 10 - winWidth) / 2;
	var topPos = (screen.height) ? (screen.height - winHeight) / 2 : 0;
	var settings = 'width='+winWidth+',height='+winHeight+',top='+topPos+',left='+leftPos+',scrollbars=0,resizable=0';

	win3D = window.open("../galerie/popup.asp?"+paramURL, "LUMINATOR", settings);
	win3D.focus();
	win3D.moveTo(leftPos, topPos);
}

function checkNLForm(objForm) {
	if (!validateAddress(objForm.nl_email.value)) {
		alert("Bitte gültige E-Mail Adresse angeben")
		return false;
	}
	return true;
}

function validateAddress(email) {    
	if ((email == null) || (email == ""))
		return false;
	else {
		var regEx = new RegExp("^[a-zA-Z0-9]([a-zA-Z0-9_\-]*)(\.[a-zA-Z0-9_\-]+)*@(([a-zA-Z0-9\-]+\.)+)([a-zA-Z]{2,4}|[0-9]{1,3})$", "i");
		
		return regEx.test(email);
	}
}

