 function showmenu(opcao,n) {
 
	document.getElementById("submenu"+n).style.display=(opcao==1)? "block":"none";
 
 }
 function destaque(destq,n,x) {
	
	destq.style.backgroundColor=(n==1)? "#E5EEED":(x==1)?"#FAFAEF":"transparent";
	destq.style.cursor="pointer";
		
 }
 function showCalendar() {
		
	$('calendar').style.display = ($('calendar').style.display=="none")? "block":"none"; 
}
function preareSearch(obj) {
	
	if(obj.keyCode==13) {
		submitSearch('search_pesquisa');
	}
}
function submitSearch(form) {
		
	if($("value_search").value.length>=2) {
		$(form).submit();
	}
	else {
		alert("A pesquisa tem que ter pelo menos 2 caracteres!");
	}
	
} 
 function $(element) {
 
	return document.getElementById(element);
 } 
 function destak(x,y) {
	
	conte=$("cnt_" + y);
	imaged=$("image"+ y);
	nomed=$("nome"+ y);
	cargd=$("cargo"+ y);
	var destaq=new Fx.Elements($$(conte,imaged,nomed,cargd),{duration:100});
	
	if (x==1) {
		destaq.start({
		
			'0': {
				'margin-top':[-15],
				'margin-left':[-15],
				'padding-top':[0,10],
				'padding-bottom':[0,10],
				'width':[420,450],
				'background-color':['#D0DDE3','#E5EEED']
			},
			'1': {
				'width':[80,100],
				'height':[95,115]
			},
			'2': {
				'word-spacing':[0,-1],
				'font-size':[16,17]
			},
			'3': {
				'word-spacing':[0,-1],
				'font-size':[12,15]
			}
		});
	}
	else if(x==0) {
		destaq.start({
		
			'0': {
				'margin-top':[0],
				'margin-left':[0],
				'padding-top':[10,0],
				'padding-bottom':[10,0],
				'width':[450,420],
				'background-color':['#E5EEED','#fff']
			},
			'1': {
				width:[100,80],
				height:[115,95]
			},
			'2': {
				'word-spacing':[-1,0],
				'font-size':[17,16]
			},
			'3': {
				'word-spacing':[-1,0],
				'font-size':[13,12]
			}
		});
		
	}
	
	
 }
 function getTipo(idtipo){
	if(idtipo > 0){
		url = "escolha_tipo.php?idtipo=" + idtipo;
		$("tipo_c").src = url;
	}
}
function calendarShow(tipo) {
	
	 if(tipo==1) {
		
		$("calendar_1").style.display="none";
		$("calendar_2").style.display="block";
		
	} 
	if(tipo==2) {
		
		$("calendar_1").style.display="block";
		$("calendar_2").style.display="none";
		
	} 
	
}

 