function winOpen(aspx)
{			     						 					  			
		window.open(aspx,"ventana","scrollbars=yes, menubar=no, location=no, resizable=no,height=800,width=700");				  		  
}
var statusmsg="Grupo Salinas"

function hidestatus()
{
    window.status=statusmsg
    return true
}


  
 function windowsopen(aspx)
{
	window.open(aspx,"ventana","scrollbars=yes, menubar=no, location=no, resizable=no,height=530,width=780");				  
}	
function windowsopensend(aspx)
{
	  window.open(aspx,"ventana","scrollbars=no, menubar=no, location=no, resizable=no,height=450,width=529");				  
}	
		  
 function windowsopenPdfindex(id)
{

    Url = "/news/pdf.aspx?idpdf=" + id;
       window.document.title = "Noticias RBS" 
       window.open(Url, "ventana", "scrollbars=yes, menubar=no, location=no, resizable=no,height= 695 ,width=922");				
        
}	
function windowsopenHtmlindex(id,idTypeNews)
{				
				 					
		Url="frmHtmlnews.aspx?idhtml="+id+"&idpleca="+idTypeNews;
 		window.open(Url,"Ventana","scrollbars=yes, menubar=no, resizable=yes, height=700, width=780");
}	
function windowsopenPdf(id)
{			  
        
 Url = "/news/pdf.aspx?idpdf=" + id;
  window.open(Url,"ventana","scrollbars=yes, menubar=no, location=no, resizable=yes,height=730,width=800");				  
}	
function windowsopenHtml(id,idTypeNews)
{				
				 					
		Url="frmHtmlnews.aspx?idhtml="+id+"&idpleca="+idTypeNews;
 		window.open(Url,"Ventana","scrollbars=yes, menubar=no, resizable=yes, height=700, width=780");
}	
function windowsopenHtml2(id,path)
{				
	idpleca = document.getElementById('txtidPleca').value;				
	if (path==1)			  
	{
		Url="../../news/frmHtmlnews.aspx?idhtml="+id+"&idpleca="+idpleca;
	}
	else
	{					 					
		Url="../news/frmHtmlnews.aspx?idhtml="+id+"&idpleca="+idpleca;				 	
 	}				
	window.open(Url,"Ventana","scrollbars=yes, menubar=yes, resizable=yes, height=1000, width=780");
}	
					 		 		  
function windowsopen1(aspx)
{
	window.open(aspx,"ventana","scrollbars=yes, menubar=no, location=no, resizable=no,height=350,width=550");				  
}		
function windowsPrintopen(aspx)
{
	window.open(aspx,"ventana","scrollbars=no, menubar=no, location=no, resizable=no,height=1000,width=700");				  
}		

                            
function OpenHref(targ,path,restore)
{ 			      
   window.location.href=path;			  
}	
             

function MostrarDatos(id)
{	
	var elementid =document.Form1.txtlang.value;								
	var element = document.getElementById(elementid);
	var elem=elementid+"1";				
	var element1 = document.getElementById(elem);
	
	if (element) 
	{
		if (element.style.display == 'none')
			element.style.display = 'block';	 
		else
			element.style.display = 'none';
			
	}
	if(element1)
		{
		if (element1.style.display == 'none')
			element1.style.display = 'block';	 
		else
			element1.style.display = 'none';
			
	}

}

						

function limpia()
			{
				document.getElementById('Toolbar1_txtSearch').value=""; 
			}
			

						
function ManejaCar(tipo,b,val,e)
{
         //N = solo numeros            , si b = 1 permite negativos
         //D = numeros decimales       , si b = 1 permite negativos
         //A = Alfanumericos Mayusculas, si b = 1 permite espacio en blanco
         //a = Alfanumericos Minusculas, si b = 1 permite espacio en blanco
         //C = Solo letras Mayusculas  , si b = 1 permite espacio en blanco
         //c = Solo letras Minusculas  , si b = 1 permite espacio en blanco
	     //P = Alfanumericos           , si b = 1 permite espacio en blanco. Permite punto, coma, comillas y guiones
	     //F = Fechas, solo numeros y "/" no se valida el valor de b
	     //B = Cuentas de banco, enteros y "-", si b = 1 NO permite el guion
        
       
        var nombre = navigator.appName
		if (nombre == "Microsoft Internet Explorer")
		{ 
			
         var band=false;
         var c=event.keyCode;
         var str= new String(val);

         switch (tipo) {
            case 'N':
               if(c>=48 && c<=57){band=true;}
               if(c==45 && str=='' && b==1){band=true;}
               break;                
            case 'D':
               if(c>=48 && c<=57){band=true;}
               if(c==46 && str.indexOf('.',0)==-1){band=true;}
               if(c==45 && str=='' && b==1){band=true;}
               break;
            case 'A':               
               if((c>=65 && c<=90)||(c>=97 && c<=122)||(c==241)||(c==209)){band=true;}
               if(c>=48 && c<=57){band=true;}
               if((c>=97 && c<=122)||(c==241)){event.keyCode = c - 32;}
               if(c==32 && b==1){band=true;}
               break;
            case 'a':
               if((c>=65 && c<=90)||(c>=97 && c<=122)||(c==241)||(c==209)){band=true;}
               if(c>=48 && c<=57){band=true;}
               if(c==32 && b==1){band=true;}
               break;
            case 'C':
               if((c>=65 && c<=90)||(c>=97 && c<=122)||(c==241)||(c==209)){band=true;}               
               if(c==32 && b==1){band=true;}
               break;
            case 'c':
               if((c>=65 && c<=90)||(c>=97 && c<=122)||(c==241)||(c==209)){band=true;}
               if(c==32 && b==1){band=true;}
               break;
               
            case 'F':
               if((c>=48 && c<=57)||(c==47)){band=true;}
               break; 
               
            case 'B':
               if(c>=48 && c<=57){band=true;}
               if(c==45 && b==0){band=true;}
               break;                
                              
	        case 'P':
               if((c>=65 && c<=90)||(c>=97 && c<=122)||(c==241)||(c==209)){band=true;}
               if(c>=48 && c<=57){band=true;}
               if(c==32 && b==1){band=true;}
	           if((c==46)||(c==44)||(c==34)||(c==45)||(c==95)){band=true;}	
               if((c>=97 && c<=122)||(c==241)){event.keyCode = c - 32;}
               if(c==47 && b==1){band=true;}
               break;	
               
            case 'p':
               if((c>=65 && c<=90)||(c>=97 && c<=122)||(c==241)||(c==209)){band=true;}
               if(c>=48 && c<=57){band=true;}
               if(c==32 && b==1){band=true;}
               if((c==46)||(c==44)||(c==34)||(c==45)||(c==95)){band=true;}	
               break;           
          }
          event.returnValue=band;
       }
       
       if (nombre != "Microsoft Internet Explorer")
		{								
				tecla = (document.all) ? e.keyCode : e.which;
				if (tecla==8) return true; 
				patron =/[A-Za-zñÑ\s]/; 
				te = String.fromCharCode(tecla); 
				return patron.test(te);														
			
		}
 }            
