function MA_openWin(what,title,width,height,src) {
        var MAWin = window.open('scripts/MA_win.php?what='+what+'&src='+src+'&nazev='+title+'&width='+width+'&height='+height,'MAWin','left=50,top=50,width='+width+',height='+height+',toolbar=0,directories=0,menubar=0,status=no,resizable=0,location=0,scrollbars=0');
        MAWin.focus();
}

function openWin(width,height,src) {
	var Win = window.open(src,"Okno","left=20,top=20,width="+width+",height="+height+",toolbar=0,directories=0,menubar=0,status=no,resizable=0,location=0,scrollbars=0");
        Win.focus();
}

function getObject(obj) {
        if (document.getElementById) {
                return document.getElementById(obj);
        } else if (document.all) {
                return document.all[obj];
        } else if (document.layers) {
                return document.layers[obj];
        }
}

function show(obj) {
	linkx = getObject('link' + obj);
//        img = eval("obra" + obj + ".src");
	img = "images/siteinfo/navigation/nav_" + obj + "_a.gif";
        linkx.src = img;
}
var active="who";
var clicked="none";
function hide(obj) {
	if ((active!=obj) || clicked!=active) {
	  linkx = getObject('link' + obj);
          img = "images/siteinfo/navigation/nav_" + obj + ".gif";
          linkx.src = img;
	}
}

function MA_submit(formobj) {
  if (check(formobj)) document.forms[formobj].submit();
}
function check(formobj) {
        if (ns4) return true;
        switch (formobj) {
                case 'nl_form':
                var nl_email = getObject("nl_email").value;
		if (nl_email == "") {
                	alert ("\nEmail!");
                return false;
                }
                else return true;
		break;
                default:
                        alert("Nezmamy formular " + formobj);
                break;
        }
}

emp = '#f0f0f0';
highlight='#bdffc6';
var oznacene=new Array(300);

function oznac(id) {
	getObject('x'+id).checked=true;
	getObject('r'+id).style.background=highlight;
	oznacene[id]=true;
}
function odznac(id) {
	getObject('x'+id).checked=false;
	getObject('r'+id).style.background=emp;
	oznacene[id]=false;
}

function setcolor(id) {
	(oznacene[id]==true) ? odznac(id):oznac(id);	
}

function LoadStroj(vyber) {
	var x = vyber[vyber.selectedIndex].value;
	x = "main.php_modul=detail_stroje_id_stroje=" + x;
	document.location = x;
}

