

    
    

  
  
  function mostrar(purl,purl)
  {
    //window.location ='#TOP';
    scroll(0,0);
  
	document.getElementById(pcapa).innerHTML="<table width=100% height=100% ><tr><td align=center valign=middle><img src='images/loader.gif' width='200px'/></td></tr></table>";
	  if (1==10){
	   document.getElementById(pcapa).innerHTML="<iframe  width=100% height=100% frameborder=0 src='"+ purl + "'></iframe>"}
	   else{
	   
	  //alert("Hola mundo!!")
  var xmlHttp;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
	
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
    }
    }
	var url,capa;
	url=purl;
	capa=pcapa;
	
	function unirhtml()      
	{      
		if(xmlHttp.readyState==4)        
			{        
				document.getElementById(capa).innerHTML=xmlHttp.responseText;
			}
		if(xmlHttp.readyState==3)        
			{        
				document.getElementById(capa).innerHTML="En proceso ...";
				  document.getElementById(capa).innerHTML="<img src='images/loader.gif'/>";
			}
	}    
	xmlHttp.onreadystatechange=unirhtml;
	xmlHttp.open("GET",url,true);    
	xmlHttp.send(null);
  }
  
  
  function mostrar_post(purl,pcapa)
  {
  
  //document.getElementById(pcapa).innerHTML="<img src='images/loader.gif'/>";
  
  var xmlHttp;
 
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
	
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
    }
	var url,capa;
	url=purl;
	capa=pcapa;
	
	function unirhtml()      
	{      
		if(xmlHttp.readyState==4)        
			{        
				document.getElementById(capa).innerHTML=xmlHttp.responseText;
			}
		if(xmlHttp.readyState==3)        
			{        
				document.getElementById(capa).innerHTML="<img  src='images/loader.gif'/>";
			}
	}    
	xmlHttp.onreadystatechange=unirhtml;
	xmlHttp.open("post",url,true); 
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	
	var pstrbusca;
	var pnomPrograma;
	var pnomDifusora;

	
	pstrbusca="";
	pnomPrograma=""; 
	pnomDifusora=0;
	
	medio_value=0
	
	for (i=0;i<document.Buscar.medio.length;i++) 
{ 
      if (document.Buscar[i].checked) 
      { 
             medio_value = document.Buscar.medio[i].value; 
			 
      } 
} 

	
	
	pstrbusca=document.getElementById("StrBusca").value;
		
	//var pmedio=medio_value;
	//var pmedio=document.getElementById("medio").value;
	//var pmedio2==document.getElementById("pmedioX").value;
	var pmedio=document.getElementById("gotMedio").value;
	var pD_FI=document.getElementById("D_FI").value;
	var pM_FI=document.getElementById("M_FI").value;
	var pA_FI=document.getElementById("A_FI").value;
	var pD_FF=document.getElementById("D_FF").value;
	var pM_FF=document.getElementById("M_FF").value;
	var pA_FF=document.getElementById("A_FF").value;
	xmlHttp.send('StrBusca='+ encodeURI(pstrbusca) + '&Medio=' + pmedio + '&D_FI=' + pD_FI + '&M_FI=' + pM_FI + '&A_FI=' + pA_FI + '&D_FF=' + pD_FF + '&M_FF=' + pM_FF + '&A_FF=' +pA_FF );
//+ '&Genero=' + pgenero + '&nomPrograma=' + pnomPrograma + '&nomDifusora=' + pnomDifusora );
//alert('StrBusca='+ encodeURI(pstrbusca) + '&Medio=' + pmedio + '&D_FI=' + pD_FI + '&M_FI=' + pM_FI + '&A_FI=' + pA_FI + '&D_FF=' + pD_FF + '&M_FF=' + pM_FF + '&A_FF=' +pA_FF )
										
  }

  function recargaCombo1(valor){
  
window.FrameX.location="desarrollo.asp?datoX="+ valor +"&combo=1"
  
  }
  
    function recargaCombo2(valor){
  
window.FrameX.location="desarrollo.asp?datoX="+ valor +"&combo=2"
  
  }
  
  
  
  
  function abre(dato,dato2,texto){

elem = document.getElementById(dato);
elem2 = document.getElementById(dato2);

if ( elem.style.display == "block"){
au=1
}
else{
au=0
}

//cierraTodo();


if ( au==1){
	elem.style.display = "none";
	elem2.src="images/closedFolder.jpg";
}
else {

	elem.style.display = "block";
	elem2.src="images/openedFolder.jpg";
}


}


function abreSub(dato,dato2,texto){

elem = document.getElementById(dato);
elem2 = document.getElementById(dato2);

if ( elem.style.display == "block"){
	elem.style.display = "none";
	elem2.src="images/closedFolder.jpg";
}
else {

	elem.style.display = "block";
	elem2.src="images/openedFolder.jpg";
}


}




function cierraTodo(){

}


function detenerError(){
return true
}
window.onerror=detenerError



var rector=1
var stopit=0 
var a=1

function init(which){
stopit=0
shake=which
shake.style.left=0
shake.style.top=0
}

function rattleimage(){

if ((!document.all&&!document.getElementById)||stopit==1)
return
if (a<6){
shake.style.top=parseInt(shake.style.top)-rector
shake.style.filter="alpha(opacity=80)"
/* "Chroma(Color = #000000) Shadow(Color=#ff0000, Direction=225)" */


a++
}
setTimeout("rattleimage()",50)
}

function stoprattle(which){
	stopit=1
	which.style.left=0
	which.style.top=0
	a=1
	shake.style.filter="alpha(opacity=100)"
}

function muestraXML(url,layer,titulo){

elemento1= document.getElementById("principal");
elemento1.innerHTML="<table width='100%'><tr ><td><a href="+url+" target='myFrame'><h2>"+titulo+"</h2></a></td<td > <iframe id='myFrame' name='myFrame' width='100%' height='600' frameborder='0'></iframe> </td></tr></table>"
elemento2= document.getElementById("myFrame");
elemento2.src=url

  }


function uno(src) { 
    src.bgColor='#cccccc'
	//src.color='#ffffff';
	src.style.cursor="hand"; 
	//src.style.border='1px solid #ffffff';
} 
function dos(src) { 
    src.bgColor='';
	//src.color='#666666';
	src.style.cursor="default";
	//src.style.border='1px solid #F3F4F5'
} 
function abreLoader(dato){
	elemento1= document.getElementById("holdUploader");
	elemento2= document.getElementById("uploadFrame");
	elemento1.style.display = "block";
	elemento2.src=('uploadFile1.asp?rnd='+ Rnd()+'&tipo='+ dato );
}
function cierraLoader(dato){
	mostrar('boletines_'+dato+'.asp?rnd='+ Rnd(),'preprincipal')
	elemento1= document.getElementById("holdUploader");
	elemento2= document.getElementById("uploadFrame");
	elemento1.style.display = "none";
	elemento2.src=('');
}
function ocultaHerramientas(){
	elem1 = document.getElementById("herramientas");
	elem1.style.display = "none";
}
function muestraHerramientas(){
	elem1 = document.getElementById("herramientas");
	elem1.style.display = "block";
}

function ejecutaMA(celda){
desejecutaMA();
elem1=document.getElementById(celda);
elem1.className="selecto00";
}


function desejecutaMA(){


document.getElementById("Cell99").className="noSelecto00";
document.getElementById("Cell320").className="noSelecto00";
document.getElementById("Cell200").className="noSelecto00";
document.getElementById("Cell310").className="noSelecto00";
}

function ejecuta(dato){

	elem99 = document.getElementById("Cell99");
	elem100 = document.getElementById("Cell100");
	elem200 = document.getElementById("Cell200");
	elem300 = document.getElementById("Cell300");
	elem310 = document.getElementById("Cell310");
	elem320 = document.getElementById("Cell320");
	elem330 = document.getElementById("Cell330");
	elem333 = document.getElementById("Cell333");
	
	
		if (dato=="99"){
		desEjecuta00();
       // mostrar('front0.ASP?rn=<%=Rnd()%>','principal');
        mostrar('detalleTema.asp?id_temaP=0&id_cliente=21&page=Central&titulo=Lo sobresaliente económico&orden=0','preprincipal');       

        
        
        //window.open("default.asp","_self")
        



		elem99.className="selecto00"
	}
		if (dato=="100"){
		desEjecuta00();
		mostrar('front1.ASP?rn=<%=Rnd()%>','preprincipal');
		elem100.className="selecto00"
	}
		if (dato=="200"){
		desEjecuta00();
		mostrar('front2.ASP?rn=<%=Rnd()%>','preprincipal');
		elem200.className="selecto00"
	}
		if (dato=="300"){
		desEjecuta00();
		//mostrar('solicitudes.asp','principal');		
		showPopWin('solicitudes.asp?espop=1&des_cliente=ON', 500,450,hidePopWin(true) )

		elem300.className="selecto00"
	}
	
	
		if (dato=="301"){
		//desEjecuta00();
		mostrar('solicitudes.asp?contenido=1','preprincipal');		
		//elem300.className="selecto00"
	}
	
	
	
	
	
			if (dato=="310"){
		desEjecuta00();
		//alert("")
		mostrar('solicitudesRegistro.asp','preprincipal');		
		elem310.className="selecto00"
	}
	
				if (dato=="320"){
		desEjecuta00();
		mostrar('quienes.asp','preprincipal');		
		elem320.className="selecto00"
	}
	
	
				if (dato=="330"){
		//desEjecuta00();
		//elem330.className="selecto00"
		showPopWin('guestbook.asp', 700,450,hidePopWin(true) )

	}
	
					if (dato=="331"){
		//desEjecuta00();
		//elem330.className="selecto00"
		showPopWin('privacidad.asp', 700,450,hidePopWin(true) )

	}
						if (dato=="332"){
		//desEjecuta00();
		//elem330.className="selecto00"
		showPopWin('login.asp', 380,280,hidePopWin(true) )

	}
	
	if (dato=="333"){
		desEjecuta00();
		elem333.className="selecto00";
		
		mostrar('Listadoenvios.asp','preprincipal');
		//showPopWin('listadoenvios.asp', 380,280,hidePopWin(true) )

	}
	
	if (dato=="334"){
	showPopWin('solicitudesRegistro.asp',600,700,hidePopWin(true))
	
	}
	
			
}




function desEjecuta00(){

		elem99.className="noSelecto00"
		elem100.className="noSelecto00"
		elem200.className="noSelecto00"
		elem300.className="noSelecto00"
		elem310.className="noSelecto00"
		elem320.className="noSelecto00"
		elem330.className="noSelecto00"
		//elem333.className="noSelecto00"
}




function regresa(){

window.principal.innerHTML= window.oculto.innerHTML

}

	function remplazar_ac()
	{
		var cad;
		cad=document.getElementById('StrBusca').value;
		cad=cad.replace('á','_');
		cad=cad.replace('é','_');
		cad=cad.replace('í','_');
		cad=cad.replace('ó','_');
		cad=cad.replace('ú','_');
		cad=cad.replace('Á','_');
		cad=cad.replace('É','_');
		cad=cad.replace('Í','_');
		cad=cad.replace('Ó','_');
		cad=cad.replace('Ú','_');
		
		cad=cad.replace('á','_');
		cad=cad.replace('é','_');
		cad=cad.replace('í','_');
		cad=cad.replace('ó','_');
		cad=cad.replace('ú','_');
		cad=cad.replace('Á','_');
		cad=cad.replace('É','_');
		cad=cad.replace('Í','_');
		cad=cad.replace('Ó','_');
		cad=cad.replace('Ú','_');
		cad=cad.replace('ñ','_');
		document.getElementById('StrBusca').value=cad
	}

	function ref(num_id, nombre)
	{
		var cad;
		cad="";
		cad="<tr>";
		cad=cad + "	<td>";
		cad=cad + "		<a href=javascript:mostrar('transformar.asp?id=" + num_id + "&rn=" + Rnd() + ",'preprincipal');>" + nombre + "</a>";
		cad=cad + "	</td>";
		cad=cad + "</tr>";
		return cad
	}
  	function generarmenu(nom_capa)
	{
		var menu;
		menu="<table width='100%' >";
		
		menu=menu+ref('05976','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COFECO');
		menu=menu+ref('05977','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COFEMER');
		menu=menu+ref('05978','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FONAES');
		menu=menu+ref('05979','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CENAM');
		menu=menu+ref('05980','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PROFECO');
		menu=menu+ref('05981','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SGM');
		menu=menu+ref('05982','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IMPI');
		menu=menu+ref('05983','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;FIFOMI');
		menu=menu+ref('05984','&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PRONAFIM');
		
		menu=menu+"</table>";
		
		document.getElementById(nom_capa).innerHTML=menu;
		if (document.getElementById(nom_capa).style.visibility=="visible")
		{
			document.getElementById(nom_capa).style.visibility="hidden";
			document.getElementById(nom_capa).innerHTML="";
		}
		else
			document.getElementById(nom_capa).style.visibility="visible";
		
	}
	
	
	function tablasRSS(tabla){


elem= document.getElementById(tabla);
elem2= document.getElementById("a"+tabla);

if ( elem.style.display == "block"){
	elem.style.display = "none";
	elem2.innerHTML="<font color='#000000'>&#9658;</font>";

	}
else{
	elem.style.display = "block";
	elem2.innerHTML="<font color='#000000'>&#9660;</font>";
}


}
	
	function abrir_hoy()
{
	var vh;
	vh=window.open('hoy.asp','mainFrame','width=195,height=245,location=no');
	history.go(0);
}


var menuopcion;
function MM_openBrWindow(theURL,winName,features) { //v2.0
eval("detalle" + winName + " = window.open('"+ theURL +"', '" + winName + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=600,height=450,left = 245,top = 180');");
  
  
  
}
function recargar()
{
//window.location.reload(); 

var act;
//alert(menuopcion);
if (menuopcion==10)
//act=window.open('pagina.asp');
history.go(0);

}

var arreglo;
arreglo='';
var tmp;
var cont;
cont=0;
function fun(var1) 
{
var anch;
anch=var1;
//alert(var1);
if (tmp != var1)
{
	cont++;
	if (arreglo != '') 
		document.write('<div align="right"><a href="#inicio">Inicio</a></div>');
	document.write('<div align="center"><h2>' + anch.anchor(cont)  + '</h2></div>');
	tmp=var1;
	arreglo=arreglo + '<li><font face="Arial, Helvetica, sans-serif" size="-1" >' + var1.link('#' + cont) + '</font></li>';
}

}

function printArreglo()
{
	document.all('tema').innerHTML="<tr><td>" + "arr" + "</td></tr>";
	//document.getElementById("combo").innerHTML= buscar();
}

function buscar()
{
	if (cont>1) 
		return arreglo;
	else
		return '';
}


  function mostrar_post2(purl,pcapa,form,medio)
  {
  var xmlHttp;
 
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
	
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      try
        {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
        }
      catch (e)
        {
        alert("Your browser does not support AJAX!");
        return false;
        }
      }
    }
	var url,capa;
	url=purl;
	capa=pcapa;
	
	function unirhtml()      
	{      
		if(xmlHttp.readyState==4)        
			{        
				document.getElementById(capa).innerHTML=xmlHttp.responseText;
			}
		if(xmlHttp.readyState==3)        
			{        
				document.getElementById(capa).innerHTML="En proceso ..";
			}
	}    
	xmlHttp.onreadystatechange=unirhtml;
	xmlHttp.open("post",url,true); 
	xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	
	var pstrbusca;
	var pnomPrograma;
	var pnomDifusora;

	
	pstrbusca="";
	pnomPrograma=""; 
	pnomDifusora=0;
	
	medio_value=1
	//alert(form)
	
	pstrbusca=document.getElementById("StrBusca"+form).value;
	var pmedio=document.getElementById("medio"+form).value;
	var pD_FI=document.getElementById("D_FI"+form).value;
	var pM_FI=document.getElementById("M_FI"+form).value;
	var pA_FI=document.getElementById("A_FI"+form).value;
	var pD_FF=document.getElementById("D_FF"+form).value;
	var pM_FF=document.getElementById("M_FF"+form).value;
	var pA_FF=document.getElementById("A_FF"+form).value;
	
	xmlHttp.send('StrBusca='+ encodeURI(pstrbusca) + '&Medio=' + pmedio + '&D_FI=' + pD_FI + '&M_FI=' + pM_FI + '&A_FI=' + pA_FI + '&D_FF=' + pD_FF + '&M_FF=' + pM_FF + '&A_FF=' +pA_FF );
										
  }

function muestraDetalle(dato){

elem = document.getElementById(dato);
elem2 = document.getElementById(dato+"I");

if ( 
	elem.style.display == "block"){
	elem.style.display = "none";
	elem2.src="images/whitebg.jpg";
}
else {

	elem.style.display = "block";
	elem2.src="images/whitebg2.jpg";
}


}

function muestraEditor(dato){
elem = document.getElementById(dato);
if (elem.style.display == "none"){
	elem.style.display = "block";
}
}

function OcultaEditor(dato){
elem = document.getElementById("editaTR");
elem2 = document.getElementById("editaTR2");
if ( 
	elem.style.display == "block"){
	elem.style.display = "none";
}

if ( 
	elem2.style.display == "block"){
	elem2.style.display = "none";
}

}



function turn2Input(origen,texto){
	
	//alert(origen)
	elem = document.getElementById(origen);
	elem.innerHTML="<input name='"+ origen +"' value="+texto+" type='text' size='8'  width='50' height='15' style='font-size:9px'/>"
	
	}
	
function dimeCarpeta(carpeta){
	elem = document.getElementById("aswss")
	elem.value= carpeta
	var rows=document.getElementById("tablaCarpetas").getElementsByTagName('TR');
	for(var i=0; i<rows.length; i++) {
	rows[i].className='carpetaNoSel';
	}

	elem = document.getElementById("tr"+carpeta);	
	elem.className="carpetaSel";
		
		}
		
function dimeCarpeta2(carpeta){
	
	elem = document.getElementById("aswss2")
	elem.value= carpeta
	
	
	
	var rows=document.getElementById("tablaCarpetas2").getElementsByTagName('TR');
	for(var i=0; i<rows.length; i++) {
	rows[i].className='carpetaNoSel';
	}

	elem = document.getElementById("trX"+carpeta);	
	elem.className="carpetaSel";
		}		
		
		
function preMostrar(purl,pcapa){
	
	elem = document.getElementById("aswss")
	purl= purl+elem.value
	mostrar(purl,pcapa)
	
	}
	
function preMostrar2(purl,pcapa){
	
	elem = document.getElementById("aswss2")
	purl= purl+elem.value
	mostrar(purl,pcapa)
	
	}	
	
	
function cambiaMedio(valor) {
elem= window.getElementById("gotMedio")
elem.value=valor
alert(elem.value)
}

function abre(dato,dato2,texto){

elem = document.getElementById(dato);
elem2 = document.getElementById(dato2);

if ( elem.style.display == "block"){
au=1
}
else{
au=0
}

if ( au==1){
	elem.style.display = "none";
	elem2.src="images/closed.gif"
}
else {

	elem.style.display = "block";
	elem2.src="images/opened.gif"
}


}

function Rnd() {
var randomnumber=Math.floor(Math.random()*100)
return randomnumber
	}
	
	
	
function abreTextFull(muestra,oculta ){
	
elem = document.getElementById(oculta);
elem2 = document.getElementById(muestra);

elem.style.display = "none";
elem2.style.display = "block";
	
	}


function ocultaLoader(){
	elem1 = document.getElementById("loaderTable");
	elem1.style.display = "none";
	
	}
	function muestraLoader(){
	elem1 = document.getElementById("loaderTable");
	elem1.style.display = "block";
	
	}
	
function abreoCierraHistorico(){

	elem = document.getElementById("calendarioX");
	elem2 = document.getElementById("imagenCal");

	if ( elem.style.display == "block"){
		elem.style.display = "none";
		elem2.src="images/closed.gif"
	}
	else{
		elem.style.display = "block";
		elem2.src="images/opened.gif"
		mostrar('calendarioSmall.asp?rnd=<%=r_n%>','calendarioSm')
		}
	}
	
function abreoCierra(tabla, imagen){

	elem = document.getElementById(tabla);
	elem2 = document.getElementById(imagen);

	if ( elem.style.display == ""){
		elem.style.display = "none";
		elem2.src="images/closed.gif"
	}
	else{
		elem.style.display = "";
		elem2.src="images/opened.gif"
		}
	}
	
	
	
	
	var lista = new Array('agro.jpg','aler.jpg','alerta.jpg','alertas.jpg','alim.jpg','auto.jpg','cons.jpg','corp.jpg','cáma.jpg','educ.jpg','ener.jpg','entr.jpg','expo.jpg','farm.jpg','fina.jpg','labo.jpg','lici.jpg','manu.jpg','manu_b.jpg','mine.jpg','opor.jpg','parq.jpg','pyme.jpg','quim.jpg','quím.jpg','salu.jpg','sector.jpg','sectores.jpg','tecn.jpg','tele.jpg','temas.jpg','text.jpg','tran.jpg','turí.jpg');
	
	
	
	
	function CallNotas(field){
	
	elem = document.getElementById(field);
	
	//alert(elem.length);

    cadena=""
    orden="" 
    contador=0
//alert(elem.length)

    for (i = 0; i < elem.length; i++){
        if(elem[i].type == "text"){

            cadena= cadena + elem[i].id + "|"
            
           // if (elem[i].value==""){
            //orden= orden + "0" + "|"}
            //else {
            orden= orden + elem[i].value + "|"
            //}        
            
            contador=contador +1  
        }
    }
    
    
InsertaSQL("ope_OportunidadesOrdenNotas","id_noticia,orden",cadena +"," + orden)

}


 function InsertaSQL (tabla, campo, valor){
 
 URL="ordenaNotas.asp?tabla=" + tabla + "&campo="+ campo + "&valor=" + valor  +"&accion=I"
//alert(URL)
 
 window.open(URL, "myFrame" )
 }
 
 
 function ejecutaTab(tab){
elem1=document.getElementById("A")
elem2=document.getElementById("B")
elem3=document.getElementById("C")
elem4=document.getElementById("D")


elemm1=document.getElementById("menuA");
elemm2=document.getElementById("menuB");
elemm3=document.getElementById("menuC");
elemm4=document.getElementById("menuD");


elem1.style.display="none";
elem2.style.display="none";
elem3.style.display="none";
elem4.style.display="none";


elemm1.style.background="#ffffff";
elemm2.style.background="#ffffff";
elemm3.style.background="#ffffff";
elemm4.style.background="#ffffff";




document.getElementById(tab).style.display="";
emelentox=document.getElementById("menu"+tab)

emelentox.style.background="#E0E0E0";


mostrar('solicitudes.asp?contenido=99','conatcc');
}
 
 

function ahah(url, target) {
mivariable="<table width=100% height=100% ><tr><td align=center valign=middle><img style='cursor:pointer' border=0 src='images/loader.gif' onclick='javascript:window.top.location.reload();' alt='¿Tarda demasiado? \n Haga clic para recargar el sitio'/></td></tr>"

  document.getElementById(target).innerHTML = mivariable;
  if (window.XMLHttpRequest) {
    req = new XMLHttpRequest();
  } else if (window.ActiveXObject) {
    req = new ActiveXObject("Microsoft.XMLHTTP");
  }
  if (req != undefined) {
    req.onreadystatechange = function() {ahahDone(url, target);};
    req.open("GET", url, true);
    req.send("");
  }
}  

function ahahDone(url, target) {
  if (req.readyState == 4) { // only if req is "loaded"
    if (req.status == 200) { // only if "OK"
      document.getElementById(target).innerHTML = req.responseText;
    } else {
      document.getElementById(target).innerHTML=" AHAH Error:\n"+ req.status + "\n" +req.statusText;
    }
  }
}

function load(name, div) {
	ahah(name,div);
	return false;
}

function sendTwitter(ID, link ,tipo){


link="http://www.oportunidadesdenegocios.com.mx/genericas/" + link


if (tipo==1){
textoNota= Left(ID,110)
window.open("http://twitter.com/home?status=" + textoNota + " " + link, "_blank")
}

//'http://www.facebook.com/sharer.php?u=http://www.eluniversal.com.mx/notas/630626.html&t=Científicos_de_UNAM_ganan_Ig_Nobel_de_Química

if (tipo==2){
textoNota= Left(ID,110)
textoNota=textoNota.replace(' ','_');
window.open("http://www.facebook.com/sharer.php?u=" + link + "&t=" + textoNota , "_blank")
}
//'http://www.google.com/bookmarks/mark?op=add&bkmk=http://www.eluniversal.com.mx/notas/630626.html&title=CientÃ­ficos+de+UNAM+ganan+Ig+Nobel+de+QuÃ­mica

if (tipo==3){
textoNota= Left(ID,110)
window.open("http://www.google.com/bookmarks/mark?op=add&bkmk=" + link + "&title=" + textoNota , "_blank")
}

}


function Left(texto, n)
{ 
if(n>texto.length)  
n=texto.length; 
return texto.substring(0, n);

}


function cambiafecha(){

cadena="Listadousuarios.asp?fecha="+  Text1.value + ""

window.open(cadena,'_self')

}

function processAjax(url) {


if (window.XMLHttpRequest) { // Non-IE browsers
req = new XMLHttpRequest();
req.onreadystatechange = targetDiv;
try {
req.open("GET", url, true);
} catch (e) {
alert(e);
}
req.send(null);
} else if (window.ActiveXObject) { // IE
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) {
req.onreadystatechange = targetDiv;
req.open("GET", url, true);
req.send();

}
}
}

function targetDiv() {
if (req.readyState == 4) { // Complete
if (req.status == 200) { // OK response
document.getElementById("holdON").innerHTML = req.responseText;
} else {
alert("Problem: " + req.statusText);
}
}
} 
 function actualizaEnvio(id_suscripcion){
 
 texto= "chk" +id_suscripcion

     valor= document.getElementById(texto)
     
     if (valor.checked){
      
      window.open("listadoEnvios.asp?accion=1&id_s=" + id_suscripcion + "&valor=1" ,"myFrame")
     
     }else{
     
      
      window.open("listadoEnvios.asp?accion=1&id_s=" + id_suscripcion + "&valor=0" ,"myFrame")
     }
 
 }

function WriteToFile(){
var fso = new ActiveXObject("Scripting.FileSystemObject");
var s = fso.CreateTextFile("C:\\Test.txt", true);
s.WriteLine('Hello');
s.Close();
}


function calcHeight()
{

  //find the height of the internal page
  var the_height=document.getElementById('myframe23').contentWindow.document.body.scrollHeight;

  //change the height of the iframe
  document.getElementById('myframe23').height= the_height+100;
  
  //alert(the_height)
  if (the_height==0)
  {
  document.getElementById('myframe23').height=2000;
  //document.getElementById('myframe23').width=100%;
   }
  
}




