	var show=1;
	var toogleShow=1;
	var ov=0;
	var value,valueBefore=0,num=0,l=0;
	function display(shown,element,input){
		if(shown==2)
		show=shown;
		if(show==1 || show==2){
			var input=$('#'+input);
			var position=input.position();
			$('#'+element).css('width',(input.outerWidth()-2)+'px').css('left',position.left+'px').css('top',(position.top+input.outerHeight())+'px').show();
			
			show=0;
		}
		else
		notDisplay(element);

	}
	function notDisplay(element){
		document.getElementById(element).style.display="none";
		show=1;

	}
	function addText(element,input){
		var BusquedaTipos=document.getElementById(input)
		BusquedaTipos.value='';
		var coma=', ';
		var elements=$('#'+element +' input:checkbox:checked');
		elements.each(function(){
			BusquedaTipos.value+=$(this).attr('title')+coma;
		});
		maxlong=BusquedaTipos.value.length;
		in_value = BusquedaTipos.value;
		out_value = in_value.substring(0,maxlong-2);
		BusquedaTipos.value= out_value;
	}
	
	function over(){
		ov=1;

	}
	function out(element){
		if(ov==1){
			notDisplay(element);
		ov=0;}
	}

	


