	var oNombreDiv="objCortina";
    var varDirCortina = DIRECTORIO_URL_JS + "logica/scripts/images/";
    if (!navigator.appName.match("Internet Explorer"))
    {
        var oFondo = "background-image:url("+varDirCortina+"fondin.png);";
    }
   else
    {
        var oFondo = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+varDirCortina+"fondin.png', sizingMethod='scale');" 
    }
	function Cortina()
	{	
		this.showInfo = function showInfo(mensaje, titulo, pagina, showbutton) {Creacion(CortinaInformacion(mensaje, titulo, pagina, showbutton));}
		this.showError = function showError(mensaje, titulo, pagina, showbutton){Creacion(CortinaError(mensaje, titulo, pagina, showbutton));}		
		this.showCargar = function showCargar(titulo){Creacion(CortinaCargar(titulo));}
        this.showCustom = function showCustom(titulo, sourcehtml, pagina, showbutton) {Creacion(CortinaCustom(titulo, sourcehtml, pagina, showbutton));}
		this.showOff = function showOff(){Creacion("");}
        this.showRunJs = function showRunJs(titulo, mensaje, textbutton, run, icon) {Creacion(CortinaEjecutarJs(titulo, mensaje, textbutton, run, icon));}
		this.Fondo = function Fondo(Fondo){ oFondo = Fondo}
        //this.showGeelbe = function showGeelbe(mensaje, titulo, pagina){Creacion(CortinaError(mensaje, titulo, pagina));}
	}
	function getTop()
	{
		return (getAlto() / 2)-(185/2);
	}
	function getLeft()
	           {
	           	return (getAncho() / 2)-(305/2);
	        }
		
function getAlto()
{
try
{
	Tope = 0;
	if (document.body)
	{
		if (document.documentElement.scrollHeight > screen.height)
		{
			Tope= document.documentElement.scrollHeight;
		}
		else
		{
			Tope = screen.height;
		}
	}
	else
	Tope = screen.height;       
return Tope;
}
catch(e)
{
	alert (e);
}

	}
	
	
	
function getAncho()
{
left = 0;
if (document.body)
{
	if (document.documentElement.scrollWidth > screen.width)
	{
		left = document.documentElement.scrollWidth;
	}
	else
	{	
		left = screen.width;
	}
}
else
	left = screen.width;
return left;
//return screen.width;
}



function CambiarEstadoTodosLosCombos(estado)
	{
		var Combos = document.getElementsByTagName("select");
		for (i=0; i<Combos.length; i++)
		{
			Combos[i].style["display"] = estado;
		}
	}
	function QuitarCortina()
	{
			CambiarEstadoTodosLosCombos("block");
			Creacion("");
	}

	function Creacion(html)
	{
		try
		{
			if (html.length > 0)
            {
                  CambiarEstadoTodosLosCombos("none");  
                   /*if (document.body)
                  {
                        if (document.body.scrollHeight || document.body.scrollWidth)
                        {
                           document.body.style.overflow = "hidden";
                        }
                  } */
            }
			else
            {
                  CambiarEstadoTodosLosCombos("block");
                  /*if (document.body)
                  {
                        if (document.body.scrollHeight || document.body.scrollWidth)
                        {
                            document.body.style.overflow = "";
                        }
                  } */
            }
				
			
				if (!document.getElementById(oNombreDiv)) 
				{
					var objDiv = document.createElement("div");
					objDiv.setAttribute("id", oNombreDiv);
					//objDiv.setAttribute("style", "visibility: hidden;");
					document.body.appendChild(objDiv);
				}
				var objDivCortina = document.getElementById(oNombreDiv);
				                                                                                   			
				objDivCortina.style.display = (objDivCortina.style.display == "block" ? "none" : "block");
				objDivCortina.style.position = "absolute";
				objDivCortina.style.height = getAlto() + "px";
				objDivCortina.style.width=getAncho()+"px";
				objDivCortina.style.height = "100%";
				objDivCortina.style.width= "100%";
                objDivCortina.style.verticalAlign="middle";
				
				objDivCortina.style.top= (window.pageYOffset || document.documentElement.scrollTop || 0)+'px';
				objDivCortina.style.left= 0;
				objDivCortina.innerHTML=html;
				//var Combos = document.getElementsByTagName("select");
				//for (i=0; i<Combos[i]; i++)
					
					//Combos[0].style["display"] = "none";
				
		}
		catch(e)
		{
			throw e;
		}
	}
	function showOff()
	{
		Creacion("");
		//QuitarCortina();
	}
    function ExisteCortina()
    {
        try
        {
            var auxCortina = document.getElementById(oNombreDiv);
            if (auxCortina.innerHTML.length > 0)
                return 1;
            else
                return 0;
        }
        catch(e)
        {
            return 0;
        }    
    }
	function CortinaError(mensaje, titulo, pagina, showbutton)
	{
        var txtMensaje = "";
         if (pagina)
         {
            /*pagina = pagina.replace("C:/xampp/htdocs/", DIRECTORIO_URL_JS);
            pagina = pagina.replace(DIRECTORIO_JS, DIRECTORIO_URL_JS);*/
         }
            
        if (ExisteCortina())
            showOff();
        for(i=0; i<mensaje.length; i++)
        {
            txtMensaje += mensaje[i] + "<br>";
        }
        
        html = "<table id=\"tableCortina\" align=\"center\" style=\""+ oFondo +";width: 100%; height: 100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\">";
       // html = "<div style=\"vertical-align:middle;width:100%; height:100%; "+oFondo+"\">";
        html += "<table id=\"tableCortina\" align=\"center\" style=\"width: 537px;height=339px\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\"><table id=\"tableCortina\" width=\"100%\" height=\"87\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\""+ varDirCortina + "cortina_1.gif\" style=\"background-repeat:no-repeat\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"67%\" height=\"31\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"31%\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"2%\">&nbsp;</td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"43\">&nbsp;</td>";
        if (pagina)
            html += "<td id=\"tdCortina\" align=\"right\"><a href=\"javascript:Redirigir('"+ pagina +"');\"><img border=\"0\" src=\""+ varDirCortina + "cruz.jpg\" alt=\"Cerrar\" width=\"68\" height=\"18\" /></a></td>";
        else
            html += "<td id=\"tdCortina\" align=\"right\"><a href=\"javascript:showOff();\"><img border=\"0\" src=\""+ varDirCortina + "cruz.jpg\" alt=\"Cerrar\" width=\"68\" height=\"18\" /></a></td>";
        html += "<td id=\"tdCortina\" align=\"right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table></td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"225\"><table  id=\"tableCortina\" width=\"100%\" height=\"41\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"41\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"96%\" bgcolor=\"#FFFFFF\" background=\""+ varDirCortina + "linea_gris.jpg\" style=\"color:#880000;background-repeat:repeat-x;background-position:bottom\"><div align=\"center\" class=\"cortinaError_titulo\">"+titulo+"</div></td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table>";
        html += "<table id=\"tableCortina\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"141\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"96%\"  background=\""+ varDirCortina + "linea_gris.jpg\" style=\"color:#FF0000;background-repeat:repeat-x;background-position:bottom;background-color:#FFFFFF;\"><div align=\"center\" class=\"cortinaError_mensaje\">" + txtMensaje + "</div></td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table>";
        html += "<table id=\"tableCortina\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"43\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        if (pagina && showbutton)
            html += "<td id=\"tdCortina\" align=\"center\" width=\"96%\" style=\"background-color:#FFFFFF;\"><div align=\"center\" class=\"style1\"></div><input class=\"cortinaError_boton\" type='button' value='OK' width='10' onClick=\"Redirigir('"+ pagina +"');\" /></td>";
        else
            html += "<td id=\"tdCortina\" align=\"center\" width=\"96%\" style=\"background-color:#FFFFFF;\"><div align=\"center\" class=\"style1\"></div>&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";    
        html += "</tr>";
        html += "</table></td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"27\" background=\""+ varDirCortina + "cortina_4.gif\" style=\"background-repeat:no-repeat\"></td>";
        html += "</tr>";
        html += "</table>";
        html += "</td>";
        html += "</tr>";
        html += "</table>";
		return html;
	}
    function Redirigir(url)
    {
        if (ExisteCortina())
            showOff();
        oCortina.showCargar("Redirigiendo");
        window.location = url;
    } 
    function CortinaInformacion(mensaje, titulo, pagina, showbutton)
    {
        var txtMensaje = "";
         if (pagina)
         {
            pagina = pagina.replace("C:/xampp/htdocs/", DIRECTORIO_URL_JS);
            pagina = pagina.replace(DIRECTORIO_JS, DIRECTORIO_URL_JS);
         }
            
        if (ExisteCortina())
            showOff();
        for(i=0; i<mensaje.length; i++)
        {
            txtMensaje += mensaje[i] + "<br>";
        }
        
        html = "<table id=\"tableCortina\" align=\"center\" style=\""+ oFondo +";width:100%; height:100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\">";
        html += "<table id=\"tableCortina\" align=\"center\"  style=\"width: 537px;height=339px\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\"><table id=\"tableCortina\" width=\"100%\" height=\"87\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\""+ varDirCortina + "cortina_1.gif\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"67%\" height=\"31\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"31%\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"2%\">&nbsp;</td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"43\">&nbsp;</td>";
        if (pagina)
            html += "<td id=\"tdCortina\" align=\"right\"><a href=\"javascript:Redirigir('"+pagina +"');\"><img border=\"0\" src=\""+ varDirCortina + "cruz.jpg\" alt=\"Cerrar\" width=\"68\" height=\"18\" /></a></td>";
        else
            html += "<td id=\"tdCortina\" align=\"right\"><a href=\"javascript:showOff();\"><img border=\"0\" src=\""+ varDirCortina + "cruz.jpg\" alt=\"Cerrar\" width=\"68\" height=\"18\" /></a></td>";
        html += "<td id=\"tdCortina\" align=\"right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table></td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"225\"><table id=\"tableCortina\" width=\"100%\" height=\"41\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"41\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"96%\" bgcolor=\"#FFFFFF\" background=\""+ varDirCortina + "linea_gris.jpg\" style=\"color:#880000;background-repeat:repeat-x;background-position:bottom\"><div align=\"center\" class=\"cortinaInformacion_titulo\">"+titulo+"</div></td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table>";
        html += "<table id=\"tableCortina\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"141\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"96%\"  background=\""+ varDirCortina + "linea_gris.jpg\" style=\"color:#FF0000;background-repeat:repeat-x;background-position:bottom;background-color:#FFFFFF;\"><div align=\"center\" class=\"cortinaInformacion_mensaje\">" + txtMensaje + "</div></td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table>";
        html += "<table id=\"tableCortina\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"43\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        if (pagina && showbutton)
            html += "<td id=\"tdCortina\" align=\"center\" width=\"96%\" style=\"background-color:#FFFFFF;\"><div align=\"center\" class=\"style1\"></div><input class=\"cortinaInformacion_boton\" type='button' value='OK' width='10' onClick=\"Redirigir('"+ pagina +"');\" /></td>";
        else
            html += "<td id=\"tdCortina\" align=\"center\" width=\"96%\" style=\"background-color:#FFFFFF;\"><div align=\"center\" class=\"style1\"></div>&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";    
        html += "</tr>";
        html += "</table></td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"27\" background=\""+ varDirCortina + "cortina_4.gif\" style=\"background-repeat:no-repeat\"></td>";
        html += "</tr>";
        html += "</table>";
        html += "</td>";
        html += "</tr>";
        html += "</table>";
        return html;
    }
   function CortinaCargar(titulo)
    {
        if (ExisteCortina())
                showOff();
        html = "<table id=\"tableCortina\" align=\"center\" style=\""+ oFondo +";width:100%; height:100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\">";
        html += "<table id=\"tableCortina\" align=\"center\" style=\"width:537px; height:339px\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\"><table id=\"tableCortina\" width=\"100%\" height=\"87\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\""+ varDirCortina + "cortina_1.gif\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"67%\" height=\"31\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"31%\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"2%\">&nbsp;</td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"43\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" align=\"right\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" align=\"right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table></td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"225\"><table id=\"tableCortina\" width=\"100%\" height=\"41\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"41\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"96%\" bgcolor=\"#FFFFFF\" background=\""+ varDirCortina + "linea_gris.jpg\" style=\"color:#880000;background-repeat:repeat-x;background-position:bottom\"><div align=\"center\" class=\"cortinaCargando_titulo\">"+titulo+"</div></td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table>";
        html += "<table id=\"tableCortina\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"141\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"96%\"  background=\""+ varDirCortina + "linea_gris.jpg\" style=\"color:#FF0000;background-repeat:repeat-x;background-position:bottom;background-color:#FFFFFF;\"><div align=\"center\" class=\"cortinamensaje\"><img src=\""+ varDirCortina +"cargando.gif\" /></div></td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table>";
        html += "<table id=\"tableCortina\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"43\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"96%\" align=\"center\"style=\"background-color:#FFFFFF;\"><div align=\"center\" class=\"style1\"></div></td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table></td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"27\" background=\""+ varDirCortina + "cortina_4.gif\" style=\"background-repeat:no-repeat\"></td>";
        html += "</tr>";
        html += "</table>";
        html += "</td>";
        html += "</tr>";
        html += "</table>";
        return html;
    }
    function CortinaEjecutarJs(titulo, mensaje, textbutton, run, icon)
    {
        var txtMensaje = "";
                    
        if (ExisteCortina())
            showOff();
        for(i=0; i<mensaje.length; i++)
        {
            txtMensaje += mensaje[i] + "<br>";
        }
        
        html = "<table id=\"tableCortina\" align=\"center\" style=\""+ oFondo +";width:100%; height:100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\">";
        html += "<table id=\"tableCortina\" align=\"center\"  style=\"width: 537px;height=339px\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\"><table id=\"tableCortina\" width=\"100%\" height=\"87\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\""+ varDirCortina + "cortina_1.gif\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"67%\" height=\"31\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"31%\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"2%\">&nbsp;</td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"43\">&nbsp;</td>";
        if (run)
            html += "<td id=\"tdCortina\" align=\"right\"><a href=\"javascript:"+run+"\"><img border=\"0\" src=\""+ varDirCortina + "cruz.jpg\" alt=\"Cerrar\" width=\"68\" height=\"18\" /></a></td>";
        else
            html += "<td id=\"tdCortina\" align=\"right\"><a href=\"javascript:showOff();\"><img border=\"0\" src=\""+ varDirCortina + "cruz.jpg\" alt=\"Cerrar\" width=\"68\" height=\"18\" /></a></td>";
        html += "<td id=\"tdCortina\" align=\"right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table></td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"225\"><table id=\"tableCortina\" width=\"100%\" height=\"41\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"41\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"96%\" bgcolor=\"#FFFFFF\" background=\""+ varDirCortina + "linea_gris.jpg\" style=\"color:#880000;background-repeat:repeat-x;background-position:bottom\"><div align=\"center\" class=\"cortinaError_titulo\">"+titulo+"</div></td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table>";
        html += "<table id=\"tableCortina\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"141\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"96%\"  background=\""+ varDirCortina + "linea_gris.jpg\" style=\"color:#FF0000;background-repeat:repeat-x;background-position:bottom;background-color:#FFFFFF;\"><div align=\"center\" class=\"cortinaError_mensaje\">" + txtMensaje + "</div></td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";
        html += "</tr>";
        html += "</table>";
        html += "<table id=\"tableCortina\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
        html += "<tr>";
        html += "<td id=\"tdCortina\" width=\"2%\" height=\"43\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
        if (run && textbutton)
            html += "<td id=\"tdCortina\" align=\"center\" width=\"96%\" style=\"background-color:#FFFFFF;\"><div align=\"center\" class=\"style1\"></div><input class=\"cortinaError_boton\" type='button' value='"+textbutton+"' width='10' onClick=\""+run+"\" /></td>";
        else if(icon)
            html += "<td id=\"tdCortina\" align=\"center\" width=\"96%\" style=\"background-color:#FFFFFF;\"><div align=\"center\" class=\"style1\"></div>"+icon+"</td>";
        else
            html += "<td id=\"tdCortina\" align=\"center\" width=\"96%\" style=\"background-color:#FFFFFF;\"><div align=\"center\" class=\"style1\"></div>&nbsp;</td>";
        html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";    
        html += "</tr>";
        html += "</table></td>";
        html += "</tr>";
        html += "<tr>";
        html += "<td id=\"tdCortina\" height=\"27\" background=\""+ varDirCortina + "cortina_4.gif\" style=\"background-repeat:no-repeat\"></td>";
        html += "</tr>";
        html += "</table>";
        html += "</td>";
        html += "</tr>";
        html += "</table>";
        return html;
    }
    function CortinaCustom(titulo, sourcehtml, pagina, showbutton)
     {
             if (pagina)
             {
                pagina = pagina.replace("C:/xampp/htdocs/", DIRECTORIO_URL_JS);
                pagina = pagina.replace(DIRECTORIO_JS, DIRECTORIO_URL_JS);
             }
                
            if (ExisteCortina())
                showOff();
                
            html = "<table id=\"tableCortina\" align=\"center\" style=\""+ oFondo +";width:100%; height:100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
            html += "<tr>";
            html += "<td id=\"tdCortina\">";
            html += "<table id=\"tableCortina\" align=\"center\"  style=\"width: 537px;height=339px\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
            html += "<tr>";
            html += "<td id=\"tdCortina\"><table id=\"tableCortina\" width=\"100%\" height=\"87\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\""+ varDirCortina + "cortina_1.gif\">";
            html += "<tr>";
            html += "<td id=\"tdCortina\" width=\"67%\" height=\"31\">&nbsp;</td>";
            html += "<td id=\"tdCortina\" width=\"31%\">&nbsp;</td>";
            html += "<td id=\"tdCortina\" width=\"2%\">&nbsp;</td>";
            html += "</tr>";
            html += "<tr>";
            html += "<td id=\"tdCortina\" height=\"43\">&nbsp;</td>";
            if (pagina)
                html += "<td id=\"tdCortina\" align=\"right\"><a href=\"javascript:Redirigir('"+pagina +"');\"><img border=\"0\" src=\""+ varDirCortina + "cruz.jpg\" alt=\"Cerrar\" width=\"68\" height=\"18\" /></a></td>";
            else
                html += "<td id=\"tdCortina\" align=\"right\"><a href=\"javascript:showOff();\"><img border=\"0\" src=\""+ varDirCortina + "cruz.jpg\" alt=\"Cerrar\" width=\"68\" height=\"18\" /></a></td>";
            html += "<td id=\"tdCortina\" align=\"right\">&nbsp;</td>";
            html += "</tr>";
            html += "</table></td>";
            html += "</tr>";
            html += "<tr>";
            html += "<td id=\"tdCortina\" height=\"225\"><table id=\"tableCortina\" width=\"100%\" height=\"41\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
            html += "<tr>";
            html += "<td id=\"tdCortina\" width=\"2%\" height=\"41\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
            html += "<td id=\"tdCortina\" width=\"96%\" bgcolor=\"#FFFFFF\" background=\""+ varDirCortina + "linea_gris.jpg\" style=\"color:#880000;background-repeat:repeat-x;background-position:bottom\"><div align=\"center\" class=\"cortinaCustom_titulo\">"+titulo+"</div></td>";
            html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";
            html += "</tr>";
            html += "</table>";
            html += "<table id=\"tableCortina\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
            html += "<tr>";
            html += "<td id=\"tdCortina\" width=\"2%\" height=\"141\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
            html += "<td d=\"tdCortina\" width=\"96%\"  background=\""+ varDirCortina + "linea_gris.jpg\" style=\"color:#FF0000;background-repeat:repeat-x;background-position:bottom;background-color:#FFFFFF;\">";
            html += "<iframe id=\"ifr\" name=\"ifr\" style=\"width:100%;\" frameborder=\"0\" src=\""+sourcehtml+"\" class=\"frameCortina\"></iframe>";
            html += "</td>"
            html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";
            html += "</tr>";
            html += "</table>";
            html += "<table id=\"tableCortina\" width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
            html += "<tr>";
            html += "<td id=\"tdCortina\" width=\"2%\" height=\"43\" background=\""+ varDirCortina + "cortina_2.gif\" style=\"background-repeat:repeat-y\">&nbsp;</td>";
            if (pagina && showbutton)
                html += "<td id=\"tdCortina\" align=\"center\" width=\"96%\" style=\"background-color:#FFFFFF;\"><div align=\"center\" class=\"style1\"></div><input class=\"cortinaCustom_boton\" type='button' value='OK' width='10' onClick=\"Redirigir('"+ pagina +"');\" /></td>";
            else
                html += "<td id=\"tdCortina\" align=\"center\" width=\"96%\" style=\"background-color:#FFFFFF;\"><div align=\"center\" class=\"style1\"></div>&nbsp;</td>";
            html += "<td id=\"tdCortina\" width=\"2%\" background=\""+ varDirCortina + "cortina_3.gif\" style=\"background-repeat:repeat-y;background-position:top right\">&nbsp;</td>";    
            html += "</tr>";
            html += "</table></td>";
            html += "</tr>";
            html += "<tr>";
            html += "<td id=\"tdCortina\" height=\"27\" background=\""+ varDirCortina + "cortina_4.gif\" style=\"background-repeat:no-repeat\"></td>";
            html += "</tr>";
            html += "</table>";
            html += "</td>";
            html += "</tr>";
            html += "</table>";
            return html;
     }
