﻿var NotaPrensa = function(id,tipo,fecha,nombre) {
    var v, l;
	
	if (nombre.indexOf('.') >= 0) {
		l = '/xml/prensa/'+tipo+'/'+fecha.substr(0,4)+'/'+fecha.substr(4,2)+'/'+nombre;
	} else {
		l = '/aspx/Prensa/NotaPrensa.aspx?id='+id+'&fecha='+fecha+'&tipo='+tipo+'&fich='+nombre;
	}
    if (location.pathname.substr(location.pathname.length-11)=="portada.htm") {
        window.open("/" + id + "/contenido.asp?menu=0&enlace=" + l.replace("?", "%3F"), "_self");
    } else {
        window.open(l, "principal");
    }
}

