var funcion_externa_flash = "javascript:carga('%')"; //el '%' será reemplazado por el parámetro que se pase a la función
var lista_proyectos, numero_hijos, hijo_lista, enlace_elm, href_actual, href_nueva, id_proyecto;

function thisMovie(movieName) 
{
    var isIE = navigator.appName.indexOf("Microsoft") != -1;
    return (isIE) ? window[movieName] : document[movieName];
}

function carga(str) {
	movie = thisMovie("portafolio");
    movie.carga(str);
}

if (document.getElementById)
{
	lista_proyectos = document.getElementById('lista-proyectos');
	if (lista_proyectos.hasChildNodes())
	{
		numero_hijos = lista_proyectos.childNodes.length;
		for (var i=0; i<numero_hijos; i++)
		{
			hijo_lista = lista_proyectos.childNodes[i];
			if (hijo_lista.nodeName.toLowerCase() == "li")
			{
				enlace_elm = hijo_lista.firstChild; //el primer hijo del LI es el enlace A
				href_actual = enlace_elm.getAttribute("href"); //leer URL actual
				id_proyecto = href_actual.split("=")[1]; //la URL será del tipo ?var=valor
				href_nueva = funcion_externa_flash.replace(/%/g, id_proyecto); //cambiar el "%" por el parámetro correcto
				enlace_elm.setAttribute("href", href_nueva); //escribir nueva URL
			}
		}
	}
}