function download(file,title){
	var body=document.getElementsByTagName("body");
	var frm=document.createElement('form');
	frm.id="frm_send";
	frm.name="frm_send";		
	frm.action='/modules/rules/index.php' ;
	frm.method="post";
	frm.target="_blank";
	
	
	var idop=document.createElement('input');
	idop.type="hidden";
	idop.id="op";
	idop.name="op";
	idop.value="download";
	frm.appendChild(idop);
	
	var filedownload=document.createElement('input');
	filedownload.type="hidden";
	filedownload.id="file";
	filedownload.name="file";
	filedownload.value=file;
	frm.appendChild(filedownload);		
	
	var titledownload=document.createElement('input');
	titledownload.type="hidden";
	titledownload.id="title";
	titledownload.name="title";
	titledownload.value=title;
	frm.appendChild(titledownload);				
	
	body[0].appendChild(frm);
	
	frm.submit();
	Element.remove(frm);	
}

function filterrule(idrule){
	var elementos=document.getElementsByClassName('ruleclass');		
	elementos.each(function(ele){ele.style.display="none"})	;
	if(idrule==0){
		elementos.each(function(ele){ele.style.display=""})	;			
	}else{
		$("table"+idrule).style.display="";	
	}
		
	
}

function changeCatego(catego_id){
	var aleatorio = Math.round(Math.random()*10000);
	strUrl = '/upload/htmls/reglamento_'+catego_id+'.htm?ale='+aleatorio;
	AppObj.Ajax.updaterAjax( strUrl,"DivRules");
}