function validateForm() {

	if (document.frm.company.value == "") {
		alert("Vyplňte, prosím, jméno společnosti!");
		document.frm.company.focus();
		return false;
	}

	if (document.frm.name.value == "") {
		alert("Vyplňte, prosím, Vaše jméno!");
		document.frm.name.focus();
		return false;
	}

	var RegEx=/^[^.]+(\.[^.]+)*@([^.]+[.])+[a-z]{2,4}$/;
	if (!RegEx.test(document.frm.email.value)) {
		alert ('Vaše emailová adresa není zadána správně!');
		document.frm.email.focus();
		return false;
	}

	if (document.frm.demand.value == "") {
		alert("Vyplňte, prosím, text poptávky!");
		document.frm.demand.focus();
		return false;
	}

}

function openImg(img_url, img_width, img_height) {

	var win_width = img_width + 20;
	var win_height = img_height + 40;

	var win_x_pos = (screen.width - win_width) / 2;
	var win_y_pos = (screen.height - win_height) / 2;

	var win_params;
	win_params = "toolbar=0, location=0, status=0, menubar=0, scrollbars=0, resizable=0, ";
	win_params += "width=" + win_width + ", height=" + win_height + ", left=" + win_x_pos + ", top=" + win_y_pos;

	var win_url = img_url;

	WinImg = window.open(win_url, "mhc_image", win_params);

	WinImg.focus();
}
