// Negativ JavaScript Document

var hivas = new Object();
function Dkesz(D) {
	hivas.mezo.value=D;
}
function SelectDate(n) {
	hivas.mezo=n;
	w=window.open('inc/calendar/calendar.php?Datum='+n.value,'naptar','height=300,width=230,screenX=20,screenY=57,resizable=no,status=no,scrollbars=no,menubar=no,titlebar=no');
	w.focus();
}
function openWindow(theURL,winName,features) {
	if(!winName)
	    winName='_blank';
	if(!features)
		features = 'width=520, height=700, menubar=no, toolbar=no, location=no, status=no, scrollbars=yes, resizable=yes';
	window.open(theURL,winName,features);
}
function vi(id) {
    var o=document.getElementById(id);
	o.style.visibility='visible';
	o.style.display='block';
}
function hi(id) {
    var o=document.getElementById(id);
	o.style.visibility='hidden';
	o.style.display='none';
}
function elrejt(mit) {
    var mit=document.getElementById(mit);
	mit.style.display=(mit.style.display=="block")? "none" : "block";
}
function biztose(url, kerdes) {
	if (!kerdes)
		kerdes = "Biztos, hogy törölni akarja?";
    if (confirm(kerdes))
		location.href = url;
	return false;
}

function setCheckboxes(the_form, do_check) {
	var elts = document.forms[the_form].elements['foto_ids[]'];
	var elts_cnt  = (typeof(elts.length) != 'undefined') ? elts.length : 0;
    if (elts_cnt) {
        for (var i = 0; i < elts_cnt; i++) {
            elts[i].checked = do_check;
        }
    } else {
        elts.checked        = do_check;
    }
    return true;
}

function checkEmail(myForm) {
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.value)) {
		return (true)
	}
	alert("Érvénytelen e-mail cím!\n     Írd be újra.")
	return (false)
}
function printwindow() {
	bV = parseInt(navigator.appVersion)
	if (bV >= 4) {
		window.print(); window.opener=self;
	}
}
function init(){
	var width = 180;
	var height = 180;
	self.resizeTo(width, height);
	self.moveTo((screen.width-width)/2, (screen.height-height)/2);
	self.focus();
}
function jumpMenu(selObj){
  eval("parent.location='"+selObj.options[selObj.selectedIndex].value+"'");
}
