<!--

isMozilla = (document.all) ? 0 : 1;

function hover(obj) {
	if (document.all) UL = obj.getElementsByTagName('ul');
    if (UL.length > 0) {
		sousMenu = UL[0].style;
		if (sousMenu.display == 'none' || sousMenu.display == '') sousMenu.display = 'block';
		else sousMenu.display = 'none';
	}
}

function setHover() {
	if (!document.getElementById('menu')) return;
	LI = document.getElementById('menu').getElementsByTagName('li');
	nLI = LI.length;
	for(i=0; i < nLI; i++) {
		LI[i].onmouseover = function() { hover(this) };
		LI[i].onmouseout = function() { hover(this); }
	}
}

function OpenWin(url, winname) {
  window.open(url, winname, "toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1,width=200,height=100");
}

function CheckAll(formobj) {
	for (i=0; i < formobj.length; i++) if (formobj.elements[i].name.substr(0,8) == 'checked_') formobj.elements[i].checked = formobj.checkall.checked;
}

function CheckAllSpecial(formobj, fldall, prefix) {
	for (i=0; i < formobj.length; i++) if (formobj.elements[i].name.substr(0,prefix.length) == prefix) formobj.elements[i].checked = document.getElementById(fldall).checked;
}


function SetSel(formobj) {
	ischecked = formobj.checkall.checked?1:0;
	tmp = document.getElementsByTagName('tr');
	classname = 'row1';
    for (i=0; i<tmp.length; i++) {
		if (tmp[i].id.indexOf('row_') == 0) {
			if (ischecked) tmp[i].className = 'rowon';
			else {
				tmp[i].className = classname;
				if (classname == 'row0') classname = 'row1';
				else classname = 'row0';
			}
		}
	}
}


function ConfirmDelete(form, msg) {
	var godel = window.confirm(msg);
	if (godel) {
		form.elements['suredelete'].value = 1;
		form.submit();
	}
}


function popup( url, winname, width, height ) {
	if (winname == "") winname = "popup";
	if (width == "") width = "400";
	if (height == "") height = "300";
	var top = (screen.height) / 2 - (height / 2);
	var left = (screen.width) / 2 - (width / 2);
	var win_arg = "scrollbars=yes,status=yes,resizable=yes,location=no,toolbar=no,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left;
	window.open(url,winname,win_arg);
}



function imgpopup( url, winname, width, height ) {
  if (width == "")  width = 450;
  if (height == "")  height = 500;
  if (winname == "")  winname = "popup";
  var top = screen.height / 2 - height;
  var left = screen.width / 2 - width;
  var win_arg = "scrollbars=no,status=no,location=no,toolbar=no,resizable=yes,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left;
  window.open(url,winname,win_arg);
}



function setcolor(col, fldname) {
	fld = eval("document.forms[0]."+fldname);
	fld.value = col;
	document.forms[0].submit();
}

function gofx() {
	document.forms[0].submit();
}


function ChangeSel(id, classname) {
	if (document.getElementById('row_'+id).className == 'rowon') document.getElementById('row_'+id).className = classname;
	else document.getElementById('row_'+id).className = 'rowon';
}


function HideSelects() {
	for (i = 0; i < document.all.tags('select').length; i++) {
		myObj = document.all.tags('select'	)[i];
		myObj.style.visibility = 'hidden';
	}
}

function ShowSelects() {
	for (i = 0; i < document.all.tags('select').length; i++) {
		myObj = document.all.tags('select')[i];
		myObj.style.visibility = 'visible';
	}
}


function HideShowLayer(divnum) {
	document.all.blayer1.style.display='none';
	document.all.blayer2.style.display='none';
	document.all.blayer3.style.display='none';
	document.all.blayer4.style.display='none';
	if (!divnum) return;
	whichDog = eval('document.all.blayer'+divnum);
	whichDog.style.display='block';
}



function ShowPageLayer(num, count) {
	for (i=0; i<=count; i++) {
		document.getElementById('pagediv_'+i).style.display = 'none';
		document.getElementById('pagercell_'+i).className = 'pager_off';
	}
	document.getElementById('pagediv_'+num).style.display = 'block';
	document.getElementById('pagercell_'+num).className = 'pager_on';
}


function MarkCheckbox(fldname) {
	tmp = document.getElementsByName(fldname);
	for (i=0; i<tmp.length; i++) {
		if (tmp[i].checked) tmp[i].checked = false;
		else tmp[i].checked = true;
	}
}



function ToggleRows(table, keyword, searchcolumn, action) {
	if (isMozilla) disp = 'table-row';
	else disp = 'block';
	if (table) tmp = table.getElementsByTagName('tr');
	else tmp = document.getElementsByTagName('tr');
    for (i=0; i<tmp.length; i++) {
		if (tmp[i].id.indexOf('notuch') != -1) continue;
		cellcontent = tmp[i].getElementsByTagName("td")[searchcolumn].innerHTML
		cellcontent = cellcontent.replace(/(<([^>]+)>)/ig,""); //strip tags
		switch (action) {
			case 'extract':
				if (cellcontent.indexOf(keyword) == -1) tmp[i].style.display = 'none';
				else tmp[i].style.display = disp;
			break;
			case 'hide':
			case 'show':
				if (cellcontent.indexOf(keyword) == -1) continue;
				if (action == 'show') tmp[i].style.display = disp;
				else tmp[i].style.display = 'none';
			break;
			case 'showall':
				tmp[i].style.display = disp;
			break;
		}
	}
}

 -->