function createForm(id, what) {

	var x = document.getElementById(id);
	x.innerHTML = x.innerHTML +'<br><input id="file" type="file" name="'+what+'" value="document.this.value;">';
}

function check_form () {
	var usr = document.getElementById('username');
	var val = document.getElementById('full_text');
	var m = document.getElementById('math');
	if (!usr.value || !val.value || !m.value) {
		alert('Privaloma užpildyti vardo ir komentaro laukelius ir įvesti skaičių sumą');
	} else {
		document.getElementById('submit').submit();
	}
}

function confirmas (url) {
	 var r=confirm("ar tikrai norit trint");
  if (r==true)
    {
		window.open(url);
    }
  else
    {
		void(0);
    }
}
