// JavaScript Document
function MM_openBrWindow(theURL,winName,features) 
{ //v2.0
  window.open(theURL,winName,features);
}

function eliminarComunicado(idComunicado)
{	
	var answer = confirm ("Esta seguro de que desea borrar la noticia '"+idComunicado+"'?")
	if (answer)
		MM_openBrWindow('eliminarComunicado.aspx?idCom='+idComunicado,'eliminar','width=10,height=10')

	//else
		//alert ("Darn. Well, keep trying then.")
	
}


function cambiarEstatus()
{	
 var  idEstatus
 idEstatus=document.Form1.ddlEstatusTermina.options[document.Form1.ddlEstatusTermina.selectedIndex].value

 if(idEstatus == 1 || idEstatus==2 || idEstatus==3|| idEstatus==5)
  {   
	var answer = confirm ("Esta seguro de que desea publicar los comunidados?.")
	if (answer)
	   return true;	  
	else		
		return false;
  }  
}


function Minimize()
{
window.innerWidth = 100;
window.innerHeight = 100;
window.screenX = screen.width;
window.screenY = screen.height;
alwaysLowered = true;
}

function Maximize()
{
window.innerWidth = screen.width;
window.innerHeight = screen.height;
window.screenX = 0;
window.screenY = 0;
alwaysLowered = false;
}


function highlight_row(the_element) 
{
	    if(the_element.parentNode.parentNode.parentNode.style.backgroundColor != '#ffc418') 
		{
		    the_element.parentNode.parentNode.parentNode.style.backgroundColor = '#ffc418';
		} 
		else 
		{
			the_element.parentNode.parentNode.parentNode.style.backgroundColor = '#FFFFCC';
		}
}



function regenerate() {
    window.location.reload()
}
function regenerate2() {
    if (document.layers) {
        appear()
        setTimeout("window.onresize=regenerate", 450)
    }
}
function changetext(whichcontent) 
{

    whichcontent= "<img src='"+whichcontent+"' width=380 ></span>"
    if (document.all || document.getElementById) {
        cross_el = document.getElementById ? document.getElementById("descriptions") : document.all.descriptions
        cross_el.innerHTML = '<font face="Verdana"><small>' + whichcontent + '<font></small>'
    }
    else if (document.layers) {
        document.d1.document.d2.document.write('<font face="Verdana"><small>' + whichcontent + '</small></font>')
        document.d1.document.d2.document.close()
    }
}
function appear() {
    document.d1.visibility = 'show'
}
