<!-- 
function trim_field_value(form_name, field){
	var re = /( )*/;
	var the_form = document.forms[form_name];
	var the_value =  eval('the_form.' + field + '.value');
	var trim_value = the_value.replace(re, "");

	return trim_value;
}

function check_mail_validity(form_name, mail){
	var reg=/^[a-z0-9]+([-_\.]?[a-z0-9])+@[a-z0-9]+([-_\.]?[a-z0-9])+\.[a-z]{2,4}?$/;
	var the_form = document.forms[form_name];
	var text = eval('the_form.' + mail + '.value');
	var result = text.match(reg);
	
	return result;
}

function checkSubscribeForm(strCheckFirstName, strCheckLastName, strCheckEmail, strValidEmail, strCheckCaptcha)
{
	var obj_form = document.forms['SubscribeForm'];

	trim_name_bg = trim_field_value('SubscribeForm', 'f_name');	
	if (!trim_name_bg){
		alert(strCheckFirstName);
		obj_form.f_name.focus();
		return false;
	}
	
	trim_name_bg = trim_field_value('SubscribeForm', 'f_surname');	
	if (!trim_name_bg){
		alert(strCheckLastName);
		obj_form.f_surname.focus();
		return false;
	}
	
	trim_email = trim_field_value('SubscribeForm', 'f_email');	
	if (!trim_email){
		alert(strCheckEmail);
		obj_form.f_email.focus();
		return false;
	} else 
	{
		valid_email = check_mail_validity('SubscribeForm', 'f_email')
		if (!valid_email) {
			alert(strValidEmail);
			obj_form.f_email.focus();
			return false;
		}
	}
	
	trim_name_bg = trim_field_value('SubscribeForm', 'security_code');	
	if (!trim_name_bg){
		alert(strCheckCaptcha);
		obj_form.security_code.focus();
		return false;
	}
}

function checkApplyForm(strCheckFirstName, strCheckLastName, strCheckEmail, strValidEmail)
{
	var obj_form = document.forms['ApplyForm'];

	trim_name_bg = trim_field_value('ApplyForm', 'f_name');	
	if (!trim_name_bg){
		alert(strCheckFirstName);
		obj_form.f_name.focus();
		return false;
	}
	
	trim_name_bg = trim_field_value('ApplyForm', 'f_surname');	
	if (!trim_name_bg){
		alert(strCheckLastName);
		obj_form.f_surname.focus();
		return false;
	}
	
	trim_email = trim_field_value('ApplyForm', 'f_email');	
	if (!trim_email){
		alert(strCheckEmail);
		obj_form.f_email.focus();
		return false;
	} else 
	{
		valid_email = check_mail_validity('ApplyForm', 'f_email')
		if (!valid_email) {
			alert(strValidEmail);
			obj_form.f_email.focus();
			return false;
		}
	}
}

function checkFeedbackForm(strCheckName, strCheckEmail, strValidEmail, strCheckCaptcha)
{
	var obj_form = document.forms['FeedbackForm'];

	trim_name_bg = trim_field_value('FeedbackForm', 'f_name');	
	if (!trim_name_bg){
		alert(strCheckName);
		obj_form.f_name.focus();
		return false;
	}
	
	
	trim_email = trim_field_value('FeedbackForm', 'f_email');	
	if (!trim_email){
		alert(strCheckEmail);
		obj_form.f_email.focus();
		return false;
	} else 
	{
		valid_email = check_mail_validity('FeedbackForm', 'f_email')
		if (!valid_email) {
			alert(strValidEmail);
			obj_form.f_email.focus();
			return false;
		}
	}
	
	trim_name_bg = trim_field_value('FeedbackForm', 'security_code');	
	if (!trim_name_bg){
		alert(strCheckCaptcha);
		obj_form.security_code.focus();
		return false;
	}
}

function checkSearchForm(strCheckKeyword)
{
	var obj_form = document.forms['SearchForm'];

	trim_name_bg = trim_field_value('SearchForm', 'keyword');	
	if (!trim_name_bg || trim_name_bg.length < 3){
		alert(strCheckKeyword);
		obj_form.keyword.focus();
		return false;
	}

}
function checkDonationForm(strCheckAmount, formName)
{
	var obj_form = document.forms[formName];

	trim_name_bg = trim_field_value(formName, 'TOTAL');	
	if (!trim_name_bg){
		alert(strCheckAmount);
		obj_form.TOTAL.focus();
		return false;
	}

}



	
// -->