function sendLink() {
	document.forms['dodaj_link'].submit();
}



function ikona (link, id) {

	var url = 'wymiary.php?pw=' +link+ '&id='+id;
	
	w=window.open(url,'okno','scrollbars=no, width=350, height=450,screenX=200,screenY=100');
	
}

function edytor(tab, pole, id) {
	var url = 'popupEditor.php?tabela=' +tab+ '&pole=' +pole+ '&id='+id;
	
	w=window.open(url,'edytor','scrollbars=no, width=600, height=600,screenX=100,screenY=0');

}

function zliczaj_znaki(max) { 
	if(newsForm.ZAJAWKA.value.length<max) { 
		a=newsForm.ZAJAWKA.value.length 
		b=max; 
		c=b-a; 
		newsForm.zajawkaPozostalo.value=c; 
	} else { 
		alert('Przekroczono dozwoloną ilość znaków przeznaczoną na zajawkę'); 
	}
} 

function kopiuj() {
   tresc = newsForm.TRESC.value;
   
   newsForm.TRESC.value = newsForm.ZAJAWKA.value + tresc;
}

function policz(max) {
  return max - 20;
}



function checkCT() {

with (document.forms['czlowiek']) {
var alertMsg = "Wypełnij poniższe pola:\n";

if ((z_email.value == "") || (z_email.value.indexOf ('@') == -1) || (z_email.value.indexOf ('.') == -1)) alertMsg += "\nemail";
if (k_imie.value == "") alertMsg += "\nimię";
if (k_nazwisko.value == "") alertMsg += "\nnazwisko";
if (alertMsg != "Wypełnij poniższe pola:\n") {
alert(alertMsg);
return false;
} else {
return true;
} } 

}

function checkComment() {

with (document.forms['addComment']) {
var alertMsg = "Wypełnij poniższe pola:\n";


if (tytul.value == "") alertMsg += "\ntytuł";
if (tresc.value == "") alertMsg += "\ntreść";
if (nick.value == "") alertMsg += "\nimię/pseudonim";
if (alertMsg != "Wypełnij poniższe pola:\n") {
alert(alertMsg);
return false;
} else {
return true;
} } 

}


function checkNote() {

with (document.forms['addNote']) {
var alertMsg = "Wypełnij poniższe pola:\n";


if (ir_tytul.value == "") alertMsg += "\ntytuł";
if (ir_tresc.value == "") alertMsg += "\ntreść";
if (ir_nick.value == "") alertMsg += "\nimię/pseudonim";
if (alertMsg != "Wypełnij poniższe pola:\n") {
alert(alertMsg);
return false;
} else {
return true;
} } 

}

function szukaj() {
	document.forms.findform.submit();
}


function checkForm() {
with (document.kontakt) {
var alertMsg = "Pola muszą być wypełnione:\n";
if (k_email.value == "") alertMsg += "\nemail";
if (k_tresc.value == "") alertMsg += "\nwiadomość";
if (alertMsg != "Pola muszą być wypełnione:\n") {
alert(alertMsg);
return false;
} else {
return true;
} } }