function formSubmit(element) { document.forms[element].submit(); } 
function formReset(element) { document.forms[element].reset(); return false; } 
function enter(evt, f){	evt = (evt) ? evt : ((window.event) ? window.event : ""); if(evt && evt.keyCode == 13){ evt.keyCode = null;	var form = document.forms[f]; if(form) form.submit();	}} 
function checkUncheckAll(theElement) { var theForm = theElement.form, z = 0; for(z=0; z<theForm.length;z++){ if(theForm[z].type == 'checkbox' && theForm[z].name != 'checkall'){ theForm[z].checked = theElement.checked; }}} 
url=document.location.href;xend = url.lastIndexOf("/")+1;var base_url = url.substring(0,xend);	
function ajax_do(url){if(url.substring(0,4)!='http'){url=base_url+url;}var jsel=document.createElement('SCRIPT');jsel.type='text/javascript';jsel.src=url;			document.body.appendChild (jsel);} 
function openWin(link, handler, width, height){window.open(link, handler, 'location=no, resizable=no,status=yes, scrollbars=no, width='+width+', height='+height+', ScreenX=100, ScreenY=50');}
function dotrd(id) {document.getElementById('tr' + id).style.background = '#FFF59F';}
function dotre(id) {document.getElementById('tr' + id).style.background = '#EEEAFE';}
function dotro(id) {document.getElementById('tr' + id).style.background = '#FFFFFF';}
/* Cautare */
function panel(id) {
	var h;
	if(id=='a') h = 'b'; else h = 'a';

	var panel1 = document.getElementById(id);
	var panel2 = document.getElementById(h);
	
	var searc1 = document.getElementById('search' + id);
	var searc2 = document.getElementById('search' + h);
	
	searc1.className = 'show';
	searc2.className = 'hide';

	return false;
}