
function isLogged(){
	showMiniDash();
}
function initFicha(id){
	goAJAX('visitasviews','ajax.php','control=ficha.visita&id='+id);
	}
function bajarElink(i){
	goAJAX("descargascontar",'ajax.php', 'control=bajarElink&i='+i);	
	}
function verVideo(i){
	winajax('Video','100','360','ajax.php','control=video&i='+i,'','');
	}
function priorizarDescarga(i){
	goAJAX("Priorizar",'ajax.php', 'control=priorizarDescarga&i='+i);	
		}

function FichaAlta(){
	winajax('Agregar Ficha','600','1200','ajax/fichaAlta.php','');
	}
	
function buscarFichas(str){
	var destino='b-descargar-' + escape(str) + '-1-1.xml';
	document.location.href=destino;
	return false;
	}
function mostrarOcular(id){
	ob=get(id).style;
	if(ob.display=='none'){
			ob.display='';
			}else{	
				ob.display='none';
				}
	return false;
	}
function subcripcion(){
	goAJAX('subscipcion','ajax.php','control=subcripcion');
	}

	var waoOM_ocupado='1';
function waoOcultarMostrar(claseCSS,id_a_mostrar){
	if(waoOM_ocupado=='1'){
		waoOM_ocupado='0';
	var misO=$$(claseCSS);
		for (i=0;i<misO.length;i++){
			new Effect.BlindUp((misO[i]).id, {duration: 0.1});			
		}
		setTimeout("new Effect.BlindDown('" + id_a_mostrar + "', { duration: 0.5 });setTimeout(\"waoOM_ocupado='1';\",500);",200);
	}else{
		return false;
		}
}
var ResizingTextArea = Class.create();
 
ResizingTextArea.prototype = {
    defaultRows: 1,
    initialize: function(field)
    {
        this.defaultRows = Math.max(field.rows, 1);
        this.resizeNeeded = this.resizeNeeded.bindAsEventListener(this);
        Event.observe(field, "click", this.resizeNeeded);
        Event.observe(field, "keyup", this.resizeNeeded);
    },
 
    resizeNeeded: function(event)
    {
        var t = Event.element(event);
        var lines = t.value.split('\n');
        var newRows = lines.length + 1;
        var oldRows = t.rows;
        for (var i = 0; i < lines.length; i++)
        {
            var line = lines[i];
            if (line.length >= t.cols) newRows += Math.floor(line.length / t.cols);
        }
        if (newRows > t.rows) t.rows = newRows;
        if (newRows < t.rows) t.rows = Math.max(this.defaultRows, newRows);
    }
}
function graciasUser(idG){
	goAJAX('graciasUser','ajax.php','control=graciasUser&idg='+idG);
	}
function mOvr(src,clrIn) {//on mouse in
	src.style.cursor = 'hand';
	src.bgColor = clrIn;	
	}
function mOut(src,clrIn) {// on mouse out
	src.style.cursor = 'default';
	src.bgColor = clrIn;
	}
function mClk(src) {//on click
	//src.bgColor = "#ffcc99";
	}
	
	
/*fichamini*************************************************************************************/
function fichamini_initTooltips(id,title){
	$('fichita'+id).style.display='none';
	new Tip('fichita_lnk'+id, $('fichita'+id),{
	style: 'darkgrey',
	title: title,
	hideOthers: true,
	radius:3,
	border:3,
	width: 'auto'
	});
}

function fichamini_initTooltips2(id,title){
	$('fichita'+id).style.display='none';
	new Tip('fichita_lnk'+id, $('fichita'+id),{
	border: 2,
    style: 'protogrey',
	borderColor: '#444',
	backgroundColor:'#FFF',
	titleBackgroundColor:'#444',
	title: title,
	stem: 'leftMiddle',
	hook: { target: 'bottomMiddle', tip: 'leftMiddle',mouse: true },
	offset: { x: 50, y: 0 }, 
	radius:3,
	width: 320
	});
}


/*fichamini*************************************************************************************/


