// JavaScript Document

function newsletterS(hdL) {
	if(!echeck(document.forms[0].email.value)) {
		if (hdL == 0) alert("Va rugam sa introduceti o adresa E-mail valida");
		if (hdL == 1) alert("Please introduce a valid E-mail address");
		if (hdL == 2) alert("Kerjuk adjon meg egy jo E-mail cimet");
		if (hdL == 3) alert("Stellen Sie bitte eine gultige E-mail Adresse vor");
		return false;
	}
	document.forms[0].submit();
}

function search_redirect(){
	document.search_jobs.action = document.getElementById('jobs').value;
	document.search_jobs.submit();
}

function search_redirect_sub(){
	document.search_jobs.action = document.getElementById('jobs').value;
	document.search_jobs.submit();
}


function checkForm(tellform) {
	nume = tellform.myName.value;

	if (nume == ""){
		alert("Ird be a neved!");
		document.tellform.myName.focus();
		return (false)
	}else
		if ((/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(tellform.myEmail.value)) && (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(tellform.sendTo1.value))) {
			return (true)
		}
	alert("Helytelen email cim! Kerlek toltsd ki!"); //Invalid E-mail Address! Please re-enter.
	document.tellform.myEmail.focus();
	return (false)
}

function showDiv(id){
	document.getElementById(id).style.display = "block" ;
	window.focus() ;
}

function hideDiv(id){
	document.getElementById(id).style.display = "none" ;
	window.focus() ;
}

function showhideDiv(id){
	if (document.getElementById(id).style.display=='none') showDiv(id);
		else hideDiv(id);
	window.focus() ;
}
