function focusLogin() {
	document.PrisijungimasForm.vartotojas.focus();
};

function photoDELETE(ID, G, Edit, Nr) {
	var text= confirm("Ar tikrai norite pašalinti nuotrauką?");
	if (text== true) {
		window.location="action_delete_photo.php?ID="+ID+"&G="+G+"&edit="+Edit+"&nr="+Nr;
	} else {
		window.location="index.php?ID="+ID+"&G="+G+"&edit="+Edit;
	}
};

function Show (Name) {
	if (document.getElementById(Name).style.display == '') {
		document.getElementById(Name).style.display = 'none';
	} else {
		document.getElementById(Name).style.display = '';
	};
};

function checkLoginForm() {
	if ((document.PrisijungimasForm.vartotojas.value.length==0) &&
		(document.PrisijungimasForm.slaptazodis.value.length==0)) {
			alert("KLAIDA!: pilnai neįvedėte prisijungimo duomenys!");
			return false;
	}
	if ((document.PrisijungimasForm.vartotojas.value.length==0) ) {
		alert("KLAIDA!: neįvedėte vartotojo vardo!");
		return false;
	};
	if ((document.PrisijungimasForm.slaptazodis.value.length==0) ) {
		alert("KLAIDA!: neįvedėte slaptažodžio vardo!");
		return false;
	};
	return true;
};

function checkUserForm() {
	if ((document.VartotojasForm.vartotojas.value.length==0) ) {
		alert("KLAIDA!: neįvedėte naujo vartotojo vardo!");
		return false;
	};
	if ((document.VartotojasForm.pastaba.value.length==0) ) {
		alert("KLAIDA!: neįvedėte pastabos apie naują vartotoją!");
		return false;
	};
	return true;
};

