// JavaScript Document



// FUNCION PARA ENVIAR FORMULARIO CON XAJAX
function Acceso()
{
	xajax.$('submitButton').disabled=true;
	xajax.$('submitButton').value="please wait...";
	xajax_ChecarSession(xajax.getFormValues("signupForm"));
	return false;
}

//REDIRECCIONARME A OTRA  PAGINA
function Avanzar(url)
{
window.location=url;
}

//funciones de Noticia
function cancelarmodificar2()
{
document.getElementById('ver_modificar').innerHTML='';
}

function RemplazarModificar(IdArticulo, Titulo, Fecha, Autor){
	//alert(IdArticulo);

document.getElementById('ver_modificar').innerHTML='';

remplazar='<div id="fila_'+IdArticulo+'" style="width:100%;"><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#F5F5F5" ><tr  bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" ><td width="7%"><input name="'+IdArticulo+'" type="checkbox" id="'+IdArticulo+'" value="'+IdArticulo+'"></td><td width="28%">'+Titulo+'</td><td width="31%" >'+Autor+'</td><td width="14%" ><div align="center">'+Fecha+'</div></td><td width="20%" ><div align="center"><img src="../images/icono_modificar.gif" alt="Modificar" title="Modificar" onclick="VentanaModificar('+IdArticulo+')" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="modificar.php?IdArticulo='+IdArticulo+'"><img src="../images/icon-banner-stored.gif" alt="Detalles" title="Detalles"  /></a></div></td></tr></table></div>';
		document.getElementById('fila_'+IdArticulo).innerHTML='';
	document.getElementById('fila_'+IdArticulo).innerHTML = remplazar;

}		

function RemplazarModificarMensaje(IdMensaje, Nombre, Url, Status, Orden, Fecha){
	//alert(IdArticulo);

document.getElementById('ver_modificar').innerHTML='';

remplazar='<div id="fila_'+IdMensaje+'" style="width:100%;"><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#F5F5F5" ><tr  bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" > <td width="5%"><input name="'+IdMensaje+'" type="checkbox" id="'+IdMensaje+'" value="'+IdMensaje+'"></td><td width="20%"> <a href="../../archivos/'+Url+'">'+Nombre+'</<a></td><td width="11%" ><div align="center">'+Status+'</div></td><td width="8%" ><div align="center">'+Orden+'</div></td><td width="11%" ><div align="center">'+Fecha+'</div></td><td width="15%" ><div align="center"><img src="../images/icono_modificar.gif"alt="Modificar" title="Modificar" onclick="VentanaModificar('+IdMensaje+')" />&nbsp;</div></td></tr></table></div>';

		document.getElementById('fila_'+IdMensaje).innerHTML='';
	document.getElementById('fila_'+IdMensaje).innerHTML = remplazar;

}	



function RemplazarModificarCalendario(IdCalendario, Titulo, FechaInicio, FechaFinal){
	//alert(IdArticulo);

document.getElementById('ver_modificar').innerHTML='';

remplazar='<div id="fila_'+IdCalendario+'" style="width:100%;"><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#F5F5F5" ><tr  bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor=\'#EFEFEF\'" onMouseOut="this.style.backgroundColor=\'#FFFFFF\'" ><td width="7%"><input name="'+IdCalendario+'" type="checkbox" id="'+IdCalendario+'" value="'+IdCalendario+'"></td><td width="28%">'+Titulo+'</td><td width="31%" ><div align="center">'+FechaInicio+'</div></td><td width="14%" ><div align="center">'+FechaFinal+'</div></td><td width="20%" ><div align="center"><img src="../images/icono_modificar.gif" alt="Modificar" title="Modificar" onclick="VentanaModificar('+IdCalendario+')" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="modificar.php?IdCalendario='+IdCalendario+'"><img src="../images/icon-banner-stored.gif" alt="Detalles" title="Detalles"  /></a></div></td></tr></table></div>';
		document.getElementById('fila_'+IdCalendario).innerHTML='';
	document.getElementById('fila_'+IdCalendario).innerHTML = remplazar;

}	


<!--
function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' es requerido.\n'; }
  } if (errors) alert('Ocurrieron los siguientes errores:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
//-->
function mostrarVentana(contenido, nombreVentana)
{        var propiedades=""
        if (nombreVentana=="vImagenes")
        {        propiedades="scrollbars=yes,width=600,height=350";
        }
        else
        {        if        (nombreVentana=="vEmail")
                {        propiedades="scrollbars=yes,width=550,height=500";
                }
                else
                {        if (nombreVentana=="vImprimir")
                        {        propiedades="scrollbars=yes,width=778,height=550,menubar=yes,status=yes";
                        }
                        else
                        {        if (nombreVentana=="vXpress")
                                {        propiedades="scrollbars=yes,width=778,height=600,menubar=yes,status=yes,toolbar=yes";
                                }
                        }
                }
        }
        Ventana=window.open(contenido,nombreVentana,propiedades);
        Ventana.focus()
}
  function MM_openBrWindow(theURL,winName,features) { //v2.0
  	window.open(theURL,winName,features);
  }  
