
function validForms(x,w)
{
	/*if(!(w=(x.FormGroup.value!='null')))
	{ 
		alert('Wybierz adresata !');
		document.form.FormGroup.focus();
		return w;
	}*/

	if(!(w=(x.FormName.value!='')))
	{ 
		alert('Wpisz wymagane imię, nazwisko lub nick !');
		document.form.FormName.focus();
		return w;
	}

	if( !(w=validEmail(x.FormEmail.value)) == true) 
	{
		alert('Wpisz poprawny adres email !');
		document.form.FormEmail.focus();
		return w;
	}

	if(!(w=(x.FormTopic.value!='')))
	{ 
		alert('Pamiętaj o temacie wiadomości !');
		document.form.FormTopic.focus();
		return w;
	}

	if(!(w=(x.FormText.value!='')))
	{ 
		alert('Pamiętaj o treści wiadomości !');
		document.form.FormText.focus();
		return w;
	}


}

function validEmail(email)
{
	var reg = /^([A-Za-z]{1,1})+([A-Za-z0-9_\-\.]{0,})+\@([A-Za-z0-9_\-\{1,1}])+([A-Za-z0-9_\-\.]{0,})+\.([A-Za-z]{2,4})$/;
	if( reg.test(email) == true) 
	{
		return true;
	}
	else
	{
		return false;
	}
}

function openPage(page, width, height) 
{
	window.open(page, 'webOpenPage', 'height=' +height+ ',width=' +width);
}

