function ImagenPopUp(mi_imagen){
//window.alert("php");
html = 
"<html>" +
"<head>" +
"<title>Sistema Noticias - Imagen</title>" +
"</head>"+
"<body leftmargin=0 marginwidth=0 topmargin=0 marginheight=0>" +
"<center>" +
"<a href='javascript:window.close()'>" +
"<img src='" + mi_imagen + "' border=0 name=image onload='window.resizeTo(document.image.width+20,document.image.height+100)'>" +
"</a>" +
"</center>" +
"</body>" + 
"</html>";
//window.alert(php);
 popup=window.open('','image','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0');
 popup.document.open();
 popup.document.write(html);
 popup.document.focus();
 popup.document.close()
 };

//Contador de caracteres.
function Contar(entrada,salida,texto,caracteres) {

	//alert(document.getElementById(entrada).value);
	
	var longitud=caracteres - document.getElementById(entrada).value.length;
	//alert(longitud);
	if(longitud <= 0) {
		longitud=0;
		texto='<span class="disable"> '+texto+' </span>';
		document.getElementById(entrada).value=document.getElementById(entrada).value.substr(0,caracteres);
	}
	  
	if(salida=="rBann"){
		//alert(salida);
		document.getElementById(salida).innerHTML=texto.replace("{CHAR}",longitud);
	}
	else{
		document.getElementById(salida).innerHTML=texto.replace("{CHAR}",longitud);
	}
}
//Contar('txtlongIntro','rBann','{CHAR} characters left.',800)
//funcion de activacion
function activar(formulario) {
	formulario.botonEjemplo.disabled = false
}

//funcion de desactivacion
function desactivar(formulario) {
	formulario.botonEjemplo.disabled = true
}
function vacio(q) {
         for ( i = 0; i < q.length; i++ ) {
                 if ( q.charAt(i) != " " ) {
                         return true
                 }
         }
         return false
}

//valida que el campo no este vacio y no tenga solo espacios en blanco
function valida(F) {
         
         if( vacio(F.cantidad_img.value) == false ) {
                 alert("Lo Sentimos, Ese Numero No Es Valido.")
                 return false
         } else {
                 return true
         }
         
}
/////////////////////////////////////////////

function hideDiv() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('hideshow').style.visibility = 'hidden'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideshow.visibility = 'hidden'; 
} 
else { // IE 4 
document.all.hideshow.style.visibility = 'hidden'; 
} 
} 
} 

function showDiv() { 
if (document.getElementById) { // DOM3 = IE5, NS6 
document.getElementById('hideshow').style.visibility = 'visible'; 
} 
else { 
if (document.layers) { // Netscape 4 
document.hideshow.visibility = 'visible'; 
} 
else { // IE 4 
document.all.hideshow.style.visibility = 'visible'; 
} 
} 
}
////////////
function showhide(id){ 
if (document.getElementById){ 
obj = document.getElementById(id); 
if (obj.style.display == "none"){ 
obj.style.display = ""; 
} else { 
obj.style.display = "none"; 
} 
} 
}

function SeePassword()
{
window.open('listar_usuario.php?seepassword=no','Mirar El Password?','width=200,height=100,menubar=no,scrollbars=no,toolbar=no,location=no,directories=no,resizable=no,top=0,left=0');
}

