function pop(x) {
	window.open(x, 'neubloc', 'toolbar=no, directories=no, location=no, status=no, menubar=no, resizable=no, scrollbars=no, width=800, height=600');
}


function checkEmail(val) {
	var mailFilter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (mailFilter.test(val)) {
		return true;
	} else {
		return false;
	}
}


function randomString(length) {
	var chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
	var rs = "";
	for(x = 0; x < length; x++) {
		rs += chars.charAt(Math.floor(Math.random() * 62));
	}
	return rs;
}


function randomNumString(length) {
	var chars = "1234567890";
	var rs = "";
	for(x = 0; x < length; x++) {
		rs += chars.charAt(Math.floor(Math.random() * 10));
	}
	return rs;
}


function accordionSwitch(divId) {
	var d = document.getElementById(divId);
	if (d) {
		d.style.display = (d.style.display == "block") ? "none" : "block";
	}
}
