// submiting form to any location
function move(target){
	document.getElementById('multiple_form').action = target;
	document.getElementById('multiple_form').submit();
}
// delete confirm
function jsconfirm(thetext){
	return confirm(thetext);
}

function zmluva_adopcia(id) {
	iMyWidth = (window.screen.width/2) - (250 + 10)
	iMyHeight = (window.screen.height/2) - (150 + 25)
	window.open("custom/custom-adopcia-zmluva-tlacenie.php?id="+ id,"adopcia_tlacenie","resizable-no,scrollbars=yes,menubar=no,width=880,height=600,toolbar=no,left="+ iMyWidth +",top="+ iMyHeight +",screenX="+ iMyWidth +",screenY="+ iMyHeight +"");
}

function zmluva_omsa(id) {
	iMyWidth = (window.screen.width/2) - (250 + 10)
	iMyHeight = (window.screen.height/2) - (150 + 25)
	window.open("custom/custom-omsa-zmluva-tlacenie.php?id="+ id,"omsa_tlacenie","resizable-no,scrollbars=yes,menubar=no,width=880,height=600,toolbar=no,left="+ iMyWidth +",top="+ iMyHeight +",screenX="+ iMyWidth +",screenY="+ iMyHeight +"");
}

function omsa_detail(id) {
	iMyWidth = (window.screen.width/2) - (250 + 10)
	iMyHeight = (window.screen.height/2) - (150 + 25)
	window.open("custom/custom-omsa-detail.php?id="+ id,"omse detail","resizable-no,scrollbars=yes,menubar=no,width=400,height=300,toolbar=no,left="+ iMyWidth +",top="+ iMyHeight +",screenX="+ iMyWidth +",screenY="+ iMyHeight +"");
}

function set_date(id, datum){
	date = window.prompt("Zadajte dátum odslúženia omše v požadovanom tvare", ""+ datum);
	if (date){
		window.location = "custom/custom-form-process.php?datum_odsluzenia&id="+ id +"&datum="+date;
	}
	else {window.close()};
}

//function disableIt(obj){
//	obj.disabled = !(obj.disabled);
//	var z = (obj.disabled) ? 'disabled' : 'enabled';
//}
//function extracheck(obj){
//	return !obj.disabled;
//}

// vypnutie formularoveho pola
function init(){
	if (!document.layers) return;
	var box = document.getElementById('form').elements;
	for (var i=0;i<box.length;i++){
		box[i].disabled = true;
	}
}
function disableIt(obj){
	obj.disabled = !(obj.disabled);
	var z = (obj.disabled) ? 'disabled' : 'enabled';
}
function extracheck(obj){
	return !obj.disabled;
}

