/**
 * @author Krzysztof Zabrzeski
 * @copyright (Do NOT remove this comment!)
 */

var indeks_klikniecia=0;
var wzor=/^.+@.+\..+/;
var str;

function czyszcze()
{
	
	
	if (indeks_klikniecia == 0) 
	{
		indeks_klikniecia=1

		document.formularz.komentarz.value=''
	}
}

function walidacja(AForm)

{
 if (!AForm.email.value) {
        alert("Prosze wypelnic wszystkie pola!");
        return false;
    } 
    if (!AForm.imie.value) {
        alert("Prosze wypelnic wszystkie pola!");
        return false;
    } 
	if (!AForm.komentarz.value) {
        alert("Prosze wypelnic wszystkie pola!");
        return false;
    } 

	str=AForm.email.value;
       if (str.match(wzor)==null) {
        alert("Bledny adres Email");
        return false;
    } 
	else return true;

}
function email()
{



var html = '<html>' +'<head>' +
'<link rel="Shortcut icon" href="../foto/menu/page.ico">'+
'<link rel="stylesheet" href="../html/style.css" type="text/css">'+
'<script type="text/javascript" src="../html/maile.js"></script>'+
'</head><body style="padding:50px;">'+



        '<form action="kontakt.php" method="POST" name="formularz" onsubmit="return walidacja(this);">'+
	'<b>Name:</b><br>'+
	
'<textarea class="formularz" name="imie" cols="40" rows="1"></textarea><br>'+
	'<b>E-Mail Adresse:</b><br>'+
	'<textarea class="formularz" name="email" cols="40" rows="1"></textarea><br>'+
	'<b>Nachricht:</b><br>'+
	'<textarea class="formularz" name="komentarz" onclick="czyszcze();"';


var html1 = '" cols="40" rows="12">Hier können Sie Ihre Nachricht schreiben...</textarea>'+
	'<br><br>'+
	'<input class="formularz" type="submit" ';  
var html2 = '"  value="E-mail verschicken"></form>'+'</body></html>';






var okno =window.open('','Kontakt','height=500,width=400,resizable=no,scrollbars=yes,toolbar=no,status=yes');

if (!okno) return false;
		
		okno.document.close();
		okno.document.write(html); 
		
		okno.document.write(html1);
		
		okno.document.write(html2);
		okno.document.close();
		okno.focus();
		
		return true;



}

