
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.date.value) == false ) {
                alert("Introduzca la fecha del evento.")
                return false
        }
        
}


// Comprueba que se elija al menos un responsable	  
function chequear_responsable1(Formulario,msj){
	  var Correcto = true;
	  var selObj = Formulario.responsables;
   	  var selIndex = selObj.selectedIndex;
	 
	  if(Correcto && selIndex == -1)
      {
       alert(msj);
       Correcto = false;
      }
return Correcto;
}

function chequear_responsable(Formulario){

var Correcto = true;

     if(Correcto && Formulario.Nombre_Responsable.value=='')
      {
       alert('Debe agregar el nombre del responsable del proyecto.');
       Formulario.Nombre_Responsable.focus();
	   Correcto = false;
      }

     if(Correcto && Formulario.Apellido_Responsable.value=='')
      {
       alert('Debe agregar el apellido del responsable del proyecto.');
	   Formulario.Apellido_Responsable.focus();
       Correcto = false;
      }

return Correcto;
}

function chequear_evento(Formulario){

var Correcto = true;

     if(Correcto && Formulario.Nombre_Responsable.value=='')
      {
       alert('Debe agregar el nombre del responsable del evento.');
       Formulario.Nombre_Responsable.focus();
	   Correcto = false;
      }

     if(Correcto && Formulario.Apellido_Responsable.value=='')
      {
       alert('Debe agregar el apellido del responsable del evento.');
	   Formulario.Apellido_Responsable.focus();
       Correcto = false;
      }

return Correcto;
}

function chequear_autor(Formulario){

var Correcto = true;

     if(Correcto && Formulario.Nombre_Responsable.value=='')
      {
       alert('Debe agregar el nombre del autor de la publicación.');
       Formulario.Nombre_Responsable.focus();
	   Correcto = false;
      }

     if(Correcto && Formulario.Apellido_Responsable.value=='')
      {
       alert('Debe agregar el apellido del autor de la publicación.');
	   Formulario.Apellido_Responsable.focus();
       Correcto = false;
      }

return Correcto;
}

function chequear_extra_producto(Formulario){

var Correcto = true;

     if(Correcto && Formulario.Nombre_Responsable.value=='')
      {
       alert('Debe agregar el nombre del responsable del producto.');
       Formulario.Nombre_Responsable.focus();
	   Correcto = false;
      }

     if(Correcto && Formulario.Apellido_Responsable.value=='')
      {
       alert('Debe agregar el apellido del responsable del producto.');
	   Formulario.Apellido_Responsable.focus();
       Correcto = false;
      }

return Correcto;
}

function chequear_titulo(Formulario){

var Correcto = true;

     if(Correcto && Formulario.Titulo.value=='')
      {
       alert('Debe agregar el título obtenido.');
       Formulario.Titulo.focus();
	   Correcto = false;
      }

     if(Correcto && Formulario.Lugar.value=='')
      {
       alert('Debe agregar el lugar en el cual obtuvo el título.');
	   Formulario.Lugar.focus();
       Correcto = false;
      }
	  if(Correcto && Formulario.Año.value=='')
      {
       alert('Debe agregar el año de obtención del título.');
	   Formulario.Año.focus();
       Correcto = false;
      }

return Correcto;
}

function agrandar(){
     var tam;
	 tam = document.getElementById("FCKeditor___Frame").height;
      	   
	        if(tam == 150){
              
              document.getElementById("FCKeditor___Frame").height = 250;

              }else{
			  
            document.getElementById("FCKeditor___Frame").height = 150;
               }

}

function agrandar2(){
     var tam;
	 tam = document.getElementById("FCKeditor2___Frame").height;
      	   
	        if(tam == 150){
              
              document.getElementById("FCKeditor2___Frame").height = 250;

              }else{
			  
            document.getElementById("FCKeditor2___Frame").height = 150;
               }

}
function agrandar_otro(){
     var tam;
	 tam = document.getElementById("FCKeditor2___Frame").height;
      	   
	        if(tam == 150){
              
              document.getElementById("FCKeditor2___Frame").height = 250;

              }else{
			  
            document.getElementById("FCKeditor2___Frame").height = 150;
               }

}


function NewWindow(mypage,myname,w,h,scroll,pos){
var win=null;
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no,';
win=window.open(mypage,myname,settings);

}

	
