function validateForm(obj_form)
{
//----------bacic settings -  begin
	var ret = true;
	var specific_message = "";
//----------bacic settings -  end



//----------check fields one by one - begin
	if(obj_form.surname.value == "")
	{
		ret = false;
		specific_message += "A 'Vezetéknév' mezőt kötelező kitölteni.<br />";
		document.getElementById("surname").setAttribute('class', 'div-field-label error-sign');
		document.getElementById("surname").setAttribute('className', 'div-field-label error-sign');
	}
	else
	{
		document.getElementById("surname").setAttribute('class', 'div-field-label');
		document.getElementById("surname").setAttribute('className', 'div-field-label');
	}
//----------
	if(obj_form.firstname.value == "")
	{
		ret = false;
		specific_message += "A 'Keresztnév' mezőt kötelező kitölteni.<br />";
		document.getElementById("firstname").setAttribute('class', 'div-field-label error-sign');
		document.getElementById("firstname").setAttribute('className', 'div-field-label error-sign');
	}
	else
	{
		document.getElementById("firstname").setAttribute('class', 'div-field-label');
		document.getElementById("firstname").setAttribute('className', 'div-field-label');
	}
//----------
	if(obj_form.email.value == "@")
	{
		ret = false;
		specific_message += "Az 'E-mail cím' mezőt kötelező kitölteni.<br />";
		document.getElementById("email").setAttribute('class', 'div-field-label error-sign');
		document.getElementById("email").setAttribute('className', 'div-field-label error-sign');
	}
	else
	{
		document.getElementById("email").setAttribute('class', 'div-field-label');
		document.getElementById("email").setAttribute('className', 'div-field-label');
	}
//----------
	tel_status_1 = (obj_form.tel_prefix.value != "" && obj_form.telephone.value != "") ;
	tel_status_2 = (obj_form.mobile_prefix.value != "" && obj_form.mobile.value != "") ;
	tel_status = tel_status_1 || tel_status_2;

	if(!tel_status)
	{
		ret = false;
		specific_message += "Valamelyik telefonszámot kötelező megadni.<br />";

		document.getElementById("phone").setAttribute('class', 'div-field-label error-sign');
		document.getElementById("phone").setAttribute('className', 'div-field-label error-sign');

		document.getElementById("mobile").setAttribute('class', 'div-field-label error-sign');
		document.getElementById("mobile").setAttribute('className', 'div-field-label error-sign');
	}
	else
	{
		document.getElementById("phone").setAttribute('class', 'div-field-label');
		document.getElementById("phone").setAttribute('className', 'div-field-label');

		document.getElementById("mobile").setAttribute('class', 'div-field-label');
		document.getElementById("mobile").setAttribute('className', 'div-field-label');
	}
//----------
	if(obj_form.zip_co.value == "")
	{
		ret = false;
		specific_message += "Az 'Irányítószám' mezőt kötelező kitölteni.<br />";
		document.getElementById("zip_co").setAttribute('class', 'div-field-label error-sign');
		document.getElementById("zip_co").setAttribute('className', 'div-field-label error-sign');
	}
	else
	{
		document.getElementById("zip_co").setAttribute('class', 'div-field-label');
		document.getElementById("zip_co").setAttribute('className', 'div-field-label');
	}
//----------
	if(obj_form.city_co.value == "")
	{
		ret = false;
		specific_message += "A 'Város' mezőt kötelező kitölteni.<br />";
		document.getElementById("city_co").setAttribute('class', 'div-field-label error-sign');
		document.getElementById("city_co").setAttribute('className', 'div-field-label error-sign');
	}
	else
	{
		document.getElementById("city_co").setAttribute('class', 'div-field-label');
		document.getElementById("city_co").setAttribute('className', 'div-field-label');
	}
//----------
	if(obj_form.addr_co.value == "")
	{
		ret = false;
		specific_message += "A 'Közterület neve' mezőt kötelező kitölteni.<br />";
		document.getElementById("addr_co").setAttribute('class', 'error-sign');
		document.getElementById("addr_co").setAttribute('className', 'error-sign');
	}
	else
	{
		document.getElementById("addr_co").setAttribute('class', '');
		document.getElementById("addr_co").setAttribute('className', '');
	}
//---------
	if(obj_form.addr_type_co.selectedIndex == 0)
	{
		ret = false;
		specific_message += "A 'Közterület tipusa' mezőt kötelező kitölteni.<br />";
		document.getElementById("addr_type_co").setAttribute('class', 'error-sign');
		document.getElementById("addr_type_co").setAttribute('className', 'error-sign');
	}
	else
	{
		document.getElementById("addr_type_co").setAttribute('class', '');
		document.getElementById("addr_type_co").setAttribute('className', '');
	}
//----------
	if(obj_form.addr_no_co.value == "")
	{

		ret = false;
		specific_message += "A 'Házszám' mezőt kötelező kitölteni.<br />";
		document.getElementById("addr_no_co").setAttribute('class', 'error-sign');
		document.getElementById("addr_no_co").setAttribute('className', 'error-sign');
	}
	else
	{
		document.getElementById("addr_no_co").setAttribute('class', '');
		document.getElementById("addr_no_co").setAttribute('className', '');
	}
//---------
	if(!obj_form.new_used[0].checked && !obj_form.new_used[1].checked)
	{

		ret = false;
		specific_message += "Az <b>új vagy régi autó vásárlás</b>ára vonatkozó mezőt kötelező bejelölni.<br />";
		document.getElementById("new_used").setAttribute('class', 'div-field-label full-width nofloat error-sign');
		document.getElementById("new_used").setAttribute('className', 'div-field-label full-width nofloat error-sign');
	}
	else
	{
		document.getElementById("new_used").setAttribute('class', 'div-field-label full-width nofloat');
		document.getElementById("new_used").setAttribute('className', 'div-field-label full-width nofloat');
	}
//---------
	if(obj_form.inmarket.selectedIndex == 0)
	{

		ret = false;
		specific_message += "A 'Közterület tipusa' mezőt kötelező kitölteni.<br />";
		document.getElementById("inmarket").setAttribute('class', 'div-field-label error-sign');
		document.getElementById("inmarket").setAttribute('className', 'div-field-label error-sign');
	}
	else
	{
		document.getElementById("inmarket").setAttribute('class', 'div-field-label');
		document.getElementById("inmarket").setAttribute('className', 'div-field-label');
	}
//---------
	if(obj_form.zip_co.value.length != 0)
	{
		if(obj_form.zip_co.value.length < 4
			||
			isNaN(obj_form.zip_co.value)
			||
			parseInt(obj_form.zip_co.value) < 1011
			||
			parseInt(obj_form.zip_co.value) > 9985
			)
		{
			ret = false;
			specific_message += "A megadott irányítószám hibás.";
			document.getElementById("zip_co").setAttribute('class', 'div-field-label error-sign');
			document.getElementById("zip_co").setAttribute('className', 'div-field-label error-sign');
		}
	}
//--------
	if(obj_form.email.value.length != 1)
	{
		if(!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(obj_form.email.value)))
		{
			ret = false;
			specific_message += "A megadott e-mail cím hibás.";
			document.getElementById("email").setAttribute('class', 'div-field-label error-sign');
			document.getElementById("email").setAttribute('className', 'div-field-label error-sign');
		}
	}
//----------check fields one by one -   end



//----------change the appaerance of the invalid fields - begin
	if(!ret)
	{
		if(specific_message.length > 0)
		{
			 specific_message = "<br /><br />" + specific_message;
		}
		document.getElementById("error_message").innerHTML = "Hiba a kitöltés során! Kérem, ellenőrizze a megjelölt mezőket!" + specific_message;
		document.getElementById("error_message").style.display = "block";
		document.getElementById("error_message").focus();
	}
//----------change the appaerance of the invalid fields -   end


	return ret;
}