

function diccionario(id){window.open("dicc_popup.php?id="+id,"Diccionario","width=400,height=400,menubar=no,scrollbars=yes");}

function abrir800(archivo, titulo){window.open(archivo,titulo,"width=820,height=600,menubar=no,scrollbars=yes");}

function comprobar()

{



// if (window.document.formBuscador.termino.value=='')

// {

//  alert("Debe introducir un término de búsqueda");

//  window.document.formBuscador.termino.focus();

//  return false;

// }

// else

//  return true;



if (window.document.formBuscador.termino.value=='')

{

alert("Debe introducir un término de búsqueda");

window.document.formBuscador.termino.focus();

return false;

}



return true;

}



//var Spell_Win_Name;

//var Work_Form_Name;

//var Work_Field_Name;

//function SpellCheck(form_name,field_name)

//{

//

//  if (window.document.formBuscador.termino.value=='')

// {

//  alert("Debe introducir un término de búsqueda");

//  window.document.formBuscador.termino.focus();

//

// }

// else {

//

//

//

//  var textform = self.document[form_name][field_name].value;

//  if ( ! Spell_Win_Name || Spell_Win_Name.closed || (Work_Form_Name != form_name || Work_Field_Name != field_name))

//  {

//  Spell_Win_Name = win_pop('');

//  if (Spell_Win_Name.focus) { Spell_Win_Name.focus(); }

//

//  self.document.hidden_form.form_name.value = form_name;

//  self.document.hidden_form.field_name.value = field_name;

//  self.document.hidden_form.first_time_text.value = textform;

//  self.document.hidden_form.submit();

//

//  Work_Form_Name=form_name;

//  Work_Field_Name=field_name;

//  }

//  else

//  {

//  if (Spell_Win_Name.focus) { Spell_Win_Name.focus(); }

//  }

//

//

// }

//

//}

//

//function win_pop(URL)

//		{

//    		winname=window.open(URL,'WIN','width=600,height=380,left=210,top=210,resizable=yes,scrollbars=yes,status=yes');

//		    return winname;

//		}

function NuevoSuperUsu(superusu)

{

if(superusu == "-1")

{

var opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=650, height=650, top=85, left=240";



window.open('nuevosuperusuario.php','',opciones);

}

}





function CierraVentana(valor)

{



if (document.form1.expira.value==0) {

alert("Debe seleccionar un valor en el campo Expira.");

document.form1.expira.focus() ;

return false;

}

else if (document.form1.puedeDescargar.value==0) {

alert("Debe seleccionar un valor en el campo Puede descargar?.");

document.form1.puedesDescargar.focus() ;

return false;

}

else if (document.form1.tipo.value==0) {

alert("Debe seleccionar un valor en el campo Tipo.");

document.form1.tipo.focus() ;

return false;

}

else

{



if(valor=="cerrar")

{



window.opener.location.replace('usuarios.php?accion=nuevo&super=cerrar');

window.close();

}

else if(valor=="nuevosuperusuario")

{



window.opener.location.replace('usuarios.php?accion=nuevo&super=nuevosuperusuario');

window.close();

}

return true;

}



}

function comprobarLogin()

{

if (window.document.formLogin.usuario.value=='')

{

alert("El nombre no puede estar en blanco");

window.document.formLogin.usuario.focus();

return false;

}

else if (window.document.formLogin.pass.value=='')

{

alert("La contraseña no puede estar en blanco");

window.document.formLogin.pass.focus();

return false;

}

else

window.document.formLogin.submit();

}



function buscar(url)

{

if (window.document.formBuscador.termino.value != "")

{

if (url.indexOf("todo0000000") != -1)

{

window.document.formBuscador.seccion.value = "todo0000000";

window.document.formBuscador.action="buscarTermino.php?buscar=todo0000000";

}

else if (url.indexOf("videos00000") != -1)

{

window.document.formBuscador.seccion.value = "videos00000";

window.document.formBuscador.action="buscarTermino.php?buscar=videos00000";

}

else if (url.indexOf("capitulos00") != -1)

{

window.document.formBuscador.seccion.value = "capitulos00";

window.document.formBuscador.action="buscarTermino.php?buscar=capitulos00";

}

else if (url.indexOf("imagenes000") != -1)

{

window.document.formBuscador.seccion.value = "imagenes000";

window.document.formBuscador.action="buscarTermino.php?buscar=imagenes000";

}

else if (url.indexOf("diccionario") != -1)

{

window.document.formBuscador.seccion.value = "diccionario";

window.document.formBuscador.action="buscarTermino.php?buscar=diccionario";

}



window.document.formBuscador.submit();

//window.navigate(window.document.formBuscador.termino.value);

}

else

{

window.location.href=url;

window.navigate(url);

}

}



function moveover(txt)

{

window.status = txt;

return true;

}



function enableTooltips(id){

var links,i,h;

if(!document.getElementById || !document.getElementsByTagName) return;

AddCss();

h=document.createElement("span");

h.id="btc";

h.setAttribute("id","btc");

h.style.position="absolute";

document.getElementsByTagName("body")[0].appendChild(h);

if(id==null) links=document.getElementsByTagName("a");

else links=document.getElementById(id).getElementsByTagName("a");

for(i=0;i<links.length;i++){

Prepare(links[i]);

}

}

function fillitin(Simbolo,Numero,Nombre, Anyo,Descubridor,Nacionalidad,MasaAtomica,PuntodeFusion,PuntodeEbullicion,Densidad,PotencialNormaldeReduccion,ConductividadTermica,ConductividadElectrica,CalorEspecifico,CalordeFusion, CalordeVaporizacion,CalordeAtomizacion,EstadosdeOxidacion,PrimerEnergiadeIonizacion,SegunEnergiadeIonizacion,TerEnergiadeIonizacion,AfinidadElectronica,RadioAtomico,RadioCovalente,VolumenAtomico,Polarizabilidad,Electronegatividad,Dureza,RadioIonico)

{



document.getElementById('PropiedadesElementos').style.display='block';

moveover(Nombre);







if(Nombre!='' && Nombre!=null){

document.getElementById('Nombretr').style.display='block';

document.getElementById('Nombre').value=Nombre;}else{document.getElementById('Nombretr').style.display='none';}



document.getElementById('NombreElemento').value=Nombre;

document.getElementById('Simbolo').value=Simbolo;

document.getElementById('Numero').value=Numero;



document.getElementById('Anyo').value=Anyo;

document.getElementById('Descubridor').value=Descubridor;

document.getElementById('Nacionalidad').value=Nacionalidad;



if(MasaAtomica!='' && MasaAtomica!=null){

document.getElementById('MasaAtomicatr').style.display='block';

document.getElementById('MasaAtomica').value=MasaAtomica;}else{document.getElementById('MasaAtomicatr').style.display='none';}

if(PuntodeFusion!='' && PuntodeFusion!=null){

document.getElementById('PuntodeFusiontr').style.display='block';

document.getElementById('PuntodeFusion').value=PuntodeFusion;}else{document.getElementById('PuntodeFusiontr').style.display='none';}

if(PuntodeEbullicion!='' && PuntodeEbullicion!=null ){

document.getElementById('PuntodeEbulliciontr').style.display='block';

document.getElementById('PuntodeEbullicion').value=PuntodeEbullicion;}else{document.getElementById('PuntodeEbulliciontr').style.display='none';}

if(Densidad!='' &&  Densidad!=null){

document.getElementById('Densidadtr').style.display='block';

document.getElementById('Densidad').value=Densidad;}else{document.getElementById('Densidadtr').style.display='none';}

if(PotencialNormaldeReduccion!='' && PotencialNormaldeReduccion!=null ){

document.getElementById('PotencialNormaldeReducciontr').style.display='block';

document.getElementById('PotencialNormaldeReduccion').value=PotencialNormaldeReduccion;}else{document.getElementById('PotencialNormaldeReducciontr').style.display='none';}

if(ConductividadTermica!='' &&  ConductividadTermica!=null){

document.getElementById('ConductividadTermicatr').style.display='block';

document.getElementById('ConductividadTermica').value=ConductividadTermica;}else{document.getElementById('ConductividadTermicatr').style.display='none';}

if(ConductividadElectrica!='' && ConductividadElectrica!=null){

document.getElementById('ConductividadElectricatr').style.display='block';

document.getElementById('ConductividadElectrica').value=ConductividadElectrica;}else{document.getElementById('ConductividadElectricatr').style.display='none';}

if(CalorEspecifico!='' && CalorEspecifico!=null){

document.getElementById('CalorEspecificotr').style.display='block';

document.getElementById('CalorEspecifico').value=CalorEspecifico;}else{document.getElementById('CalorEspecificotr').style.display='none';}

if(CalordeFusion!='' && CalordeFusion!=null){

document.getElementById('CalordeFusiontr').style.display='block';

document.getElementById('CalordeFusion').value=CalordeFusion;}else{document.getElementById('CalordeFusiontr').style.display='none';}

if(CalordeVaporizacion!='' && CalordeVaporizacion!=null){

document.getElementById('CalordeVaporizaciontr').style.display='block';

document.getElementById('CalordeVaporizacion').value=CalordeVaporizacion;}else{document.getElementById('CalordeVaporizaciontr').style.display='none';}

if(CalordeAtomizacion!='' && CalordeAtomizacion!=null){

document.getElementById('CalordeAtomizaciontr').style.display='block';

document.getElementById('CalordeAtomizacion').value=CalordeAtomizacion;}else{document.getElementById('CalordeAtomizaciontr').style.display='none';}

if(EstadosdeOxidacion!=null && EstadosdeOxidacion!=null){

document.getElementById('EstadosdeOxidaciontr').style.display='block';

document.getElementById('EstadosdeOxidacion').value=EstadosdeOxidacion;}else{document.getElementById('EstadosdeOxidaciontr').style.display='none';}

if(PrimerEnergiadeIonizacion!=null && PrimerEnergiadeIonizacion!='' ){

document.getElementById('PrimerEnergiadeIonizaciontr').style.display='block';

document.getElementById('PrimerEnergiadeIonizacion').value=PrimerEnergiadeIonizacion;}else{document.getElementById('PrimerEnergiadeIonizaciontr').style.display='none';}

if(SegunEnergiadeIonizacion!=null && SegunEnergiadeIonizacion!=''){

document.getElementById('SegunEnergiadeIonizaciontr').style.display='block';

document.getElementById('SegunEnergiadeIonizacion').value=SegunEnergiadeIonizacion;}else{document.getElementById('SegunEnergiadeIonizaciontr').style.display='none';}

if(TerEnergiadeIonizacion!=null &&  TerEnergiadeIonizacion!=''){

document.getElementById('TerEnergiadeIonizaciontr').style.display='block';

document.getElementById('TerEnergiadeIonizacion').value=TerEnergiadeIonizacion;}else{document.getElementById('TerEnergiadeIonizaciontr').style.display='none';}

if(AfinidadElectronica!=null && AfinidadElectronica!='' ){

document.getElementById('AfinidadElectronicatr').style.display='block';

document.getElementById('AfinidadElectronica').value=AfinidadElectronica;}else{document.getElementById('AfinidadElectronicatr').style.display='none';}

if(RadioAtomico!=null &&  RadioAtomico!='' ){

document.getElementById('RadioAtomicotr').style.display='block';

document.getElementById('RadioAtomico').value=RadioAtomico;}else{document.getElementById('RadioAtomicotr').style.display='none';}

if(RadioCovalente!=null && RadioCovalente!='' ){

document.getElementById('RadioCovalentetr').style.display='block';

document.getElementById('RadioCovalente').value=RadioCovalente;}else{document.getElementById('RadioCovalentetr').style.display='none';}

if(VolumenAtomico!=null && VolumenAtomico!=''){

document.getElementById('VolumenAtomicotr').style.display='block';

document.getElementById('VolumenAtomico').value=VolumenAtomico;}else{document.getElementById('VolumenAtomicotr').style.display='none';}

if(Polarizabilidad!=null && Polarizabilidad!='' ){

document.getElementById('Polarizabilidadtr').style.display='block';

document.getElementById('Polarizabilidad').value=Polarizabilidad;}else{document.getElementById('Polarizabilidadtr').style.display='none';}

if(Electronegatividad!=null && Electronegatividad!=''){

document.getElementById('Electronegatividadtr').style.display='block';

document.getElementById('Electronegatividad').value=Electronegatividad;}else{document.getElementById('Electronegatividadtr').style.display='none';}

if(Dureza!=null  && Dureza!=''){

document.getElementById('Durezatr').style.display='block';

document.getElementById('Dureza').value=Dureza;}else{document.getElementById('Durezatr').style.display='none';}

if(RadioIonico!=null && RadioIonico!=''){

document.getElementById('RadioIonicotr').style.display='block';

document.getElementById('RadioIonico').value=RadioIonico;}else{document.getElementById('RadioIonicotr').style.display='none';}

if(TerEnergiadeIonizacion!=null && TerEnergiadeIonizacion!='' ){

document.getElementById('TerEnergiadeIonizacion').style.display='block';

document.getElementById('TerEnergiadeIonizacion').value=TerEnergiadeIonizacion;}else{document.getElementById('TerEnergiadeIonizacion').style.display='none';}





}



function validar()
{

if (document.getElementById('nombre').value.length==0){
alert("El campo Nombre es obligatorio");
document.getElementById('nombre').focus();
return false;
}else if (document.getElementById('apellidos').value.length==0){
alert("El campo Apellidos es obligatorio");
document.getElementById('apellidos').focus();
return false;
}else if (document.getElementById('email').value.length==0){
alert("El campo Email es obligatorio");
document.getElementById('email').focus();
return false;
}else if (document.getElementById('consulta').value.length==0){
alert("El campo Consulta es obligatorio");
document.getElementById('consulta').focus();
return false;

}else{
return true;

}

}




