var coloractual = '';


function overcolor(obj)
{
    coloractual = document.getElementById(obj).style.backgroundColor;
	document.getElementById(obj).style.backgroundColor = '#FFE400';
}

function outcolor(i)
{
        if(i%2==0)
            document.getElementById('tr'+i).style.background = '#D6D6D6';
        else
            document.getElementById('tr'+i).style.background = '#F2F2F2';
}

function onclicfila(obj)
{
	if(document.getElementById(obj).style.display=='none')
		Effect.BlindDown(obj);
	else
		Effect.BlindUp(obj);
}

function url(url)
{
	location.href=url;
}

function mostrar_sub(obj)
{
    
    if(document.getElementById(obj).style.display!='')Effect.BlindDown(obj);
    else Effect.BlindUp(obj);
}

function carrega_imatge(base,imatge,id,url_img,url_enll,idioma,title)
{
    new Ajax.Updater('carrega_imatge',base+'CarregaImatge/?imatge='+imatge+'&id='+id+'&idioma='+idioma);
    if(url_img!='') {
        document['img_centre'].src = url_img;
        document['img_centre'].title = title;
        document.getElementById('href_enll').title = title;
    }
    if(url_enll!='')
        document.getElementById('href_enll').href = url_enll;


}


function roll(img_name, img_src)
{

		if(img_name!=bot_selec)
			document[img_name].src = img_src;

}