function on_searchThis() {
	var form = document.searchFormaPress;
	
	if (form.year1.value=='' && form.month1.value=='' && form.date1.value=='') {
		var startDate	= '';
	} else if (form.year1.value!='' && form.month1.value!='' && form.date1.value!='') {
		var startDate	= form.year1.value+'-'+form.month1.value+'-'+form.date1.value;
	} else {
		alert(checkmesg14);
		return;
	}
	if (form.year2.value=='' && form.month2.value=='' && form.date2.value=='') {
		var endDate	= '';
	} else if (form.year2.value!='' && form.month2.value!='' && form.date2.value!='') {
		var endDate	= form.year2.value+'-'+form.month2.value+'-'+form.date2.value;
	} else {
		alert(checkmesg14);
		return;
	}
	
	var pubcat          = form.pubcat.options[form.pubcat.selectedIndex].value;
	var menyra_shfaqjes = form.menyra_shfaqjes.options[form.menyra_shfaqjes.selectedIndex].value;
	
	str_var = 'startDate='+startDate+';endDate='+endDate+';pubcat='+pubcat+';menyra_shfaqjes='+menyra_shfaqjes;
	
	if(startDate!='' && endDate!='' && pubcat!='')
		GoTo('thisPage?event=kursi_kembimit.search_this('+str_var+')');
	else
		alert(mesgemptysearch);
}

function check(that,nr) {
	var numb=parseFloat(that.value);
	
	if (isNaN(numb)) {
		that.value="";
		alert(checkmesg9);
		return false;
	} else {
		if (nr==1){
			if (that.value.length!=2) {
				that.value="";
				alert(checkmesg10);
				that.focus();
				return false;
			}
			if (that.value <1 || that.value> 31) {
				that.value = Number.NaN;
				that.value="";
				alert(checkmesg11);
				that.focus();
				return false;
			}
		} else if (nr==2) {
			if (that.value.length!=2) {
				that.value="";
				alert(checkmesg12);
				that.focus();
				return false;
			}
			if (that.value <1 || that.value> 12) {
				that.value = Number.NaN;
				that.value="";
				alert(checkmesg13);
				that.focus();
				return false;
			}
		} else if (nr==3) {
			if (that.value.length!=4) {
				that.value="";
				alert(checkmesg14);
				that.focus();
				return false;
			}
		}
	}
	return true;
 } 

