function detecta_navegador_especial()
{
	if (navigator.userAgent.indexOf('Mac') != -1)
			{
				if (navigator.userAgent.indexOf("MSIE")!=-1) return "Internet Explorer MAC"; 
				if (navigator.userAgent.indexOf("Firefox")!=-1) return "Normal";
					else return "Normal";
			}
	else
		{
			if (navigator.userAgent.indexOf("Opera 6")!=-1) return "Opera 6"; 
			else if (navigator.userAgent.indexOf("Netscape6")!=-1) return "Netscape 6";
			else if (navigator.userAgent.indexOf("Netscape/7")!=-1) return "Netscape 7";
			else if (navigator.userAgent.indexOf("MSIE 5")!=-1 && navigator.appName.indexOf("Explorer")!=-1) return "Internet Explorer 5";
			else if (navigator.userAgent.indexOf("MSIE 6")!=-1) return "Internet Explorer 6";
			else if (navigator.userAgent.indexOf("MSIE 7")!=-1)
				if (navigator.userAgent.indexOf("Opera")!=-1) return "Normal";
					else return "Internet Explorer 7";
			else return "Normal";
		}
}



// Funciones de estilos para las páginas intermedias
function estilos_paginas(path){
	document.write("<link media='print' href='" + path + "estilos/upv_print.css' rel='stylesheet' type='text/css' />");
	document.write("<link media='print' href='" + path + "estilos/plantillas_print.css' rel='stylesheet' type='text/css' />");
	var navegador=detecta_navegador_especial();
	switch (navegador){
		case "Opera 6":
			document.write("<link href='" + path + "estilos/plantillas_op6.css' rel='stylesheet' type='text/css' />");
			break;
		case "Netscape 6":
			document.write("<link href='" + path + "estilos/upv_n6.css' rel='stylesheet' type='text/css' />");	
			document.write("<link href='" + path + "estilos/plantillas_n6.css' rel='stylesheet' type='text/css' />");
			document.write("<link href='" + path + "estilos/microweb_n6.css' rel='stylesheet' type='text/css' />");
			document.write("<link media='print' href='" + path + "estilos/plantillas_print_n7.css' rel='stylesheet' type='text/css' />");
			break;
		case "Internet Explorer 5":
			document.write("<link href='" + path + "estilos/upv_ie5.css' rel='stylesheet' type='text/css' />");
			document.write("<link href='" + path + "estilos/plantillas_ie5.css' rel='stylesheet' type='text/css' />");
			break;	
		case "Internet Explorer MAC":
			document.write("<link href='" + path + "estilos/upv_ie_mac.css' rel='stylesheet' type='text/css' />");
			document.write("<link href='" + path + "estilos/plantillas_ie_mac.css' rel='stylesheet' type='text/css' />");
			document.write("<link media='print' href='" + path + "estilos/plantillas_print_ie_mac.css' rel='stylesheet' type='text/css' />");
			break;	
		case "Internet Explorer 6":
			document.write("<link href='" + path + "estilos/plantillas_ie6.css' rel='stylesheet' type='text/css' />");
			document.write("<link media='print' href='" + path + "estilos/upv_print_ie6.css' rel='stylesheet' type='text/css' />");
			document.write("<link media='print' href='" + path + "estilos/plantillas_print_ie6.css' rel='stylesheet' type='text/css' />");
			break;

		case "Internet Explorer 7":
			document.write("<link media='print' href='" + path + "estilos/upv_print_ie7.css' rel='stylesheet' type='text/css' />");
			document.write("<link media='print' href='" + path + "estilos/plantillas_print_ie7.css' rel='stylesheet' type='text/css' />");
			break;

		case "Netscape 7":
			document.write("<link media='print' href='" + path + "estilos/plantillas_print_n7.css' rel='stylesheet' type='text/css' />");
			break;
		default:
			break;
	}
}