//Funções Gerais
function btOver (id, lnk) {
	$(id).className = "btHover";
}
function btOut (id, lnk) {
  if(id!=lnk)
	$(id).className = "btOut";
}
function $(id) { 
	try { 
		var a = document.getElementById(id); 
	} catch(e) { 
		alert("Erro encontrado: "+e); 		
	} 
	return 	a;
}
function addEvent(obj, evType, fn)
{
    //
    if (obj.addEventListener)
    {
        obj.addEventListener(evType, fn, true);
        return true;
    }
    else if (obj.attachEvent)
    {
        var r = obj.attachEvent("on"+evType, fn);
        return r;
    }
    else
    {
        return false;
    }
}

function abrirImagem(idx, title) {
	if(!title)
		title = "Grupo CR7";
		
	var a_false = $("aimg"+idx);
    //chamando a funçao do lightbox responsável pelo início das açoes
    myLightbox.start(a_false);
    //anulando o link
    a_false = null;
	
}
function getRequest ()
{
    var xmlhttp = null;
    
    try
    {
        xmlhttp = new XMLHttpRequest();
    }
    catch(ee)
    {
        try
        {
            xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        }
        catch(e)
        {
            try
            {
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            catch(E)
            {
                xmlhttp = false;
            }
        }
    }
    
    return xmlhttp;
}
function abreAjax(pg, local ,loader)
{	
    var pagina = new Ajax();
	if(loader)
		pagina.setLoader($(loader));
		
	pagina.loadContent(pg,$(local));
}