yo modifique el codigo y ya no funciona para hacer el calculo asi es como yo queria que quede mas abajo les pongo el original para que me digan que tengo que hacer para que me quede como aca y funcione

<form name="datos" action="">
<p>
<input type="text" name="a" size="3"/>
x<sup>2</sup> +
<input type="text" name="b" size="3"/>
x +
<input type="text" name="c" size="3"/>
= 0</p>
<br />
<p>
<input name="button" type="button" onClick="res()" value="Resolver"/>
</p>
<br />
<p>
discriminante
<input type="text" name="d" size="3"/>
<br />
<br />
x<sub>1</sub>=
<input type="text" name="x1" size="3"/>
<br />
<br />
x<sub>2</sub>=
<input type="text" name="x2" size="3"/>
</p>
</form>
este es el codigo original de la web que lo saque
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[url]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/url]">
<html xmlns="[url]http://www.w3.org/1999/xhtml[/url]" xml:lang="es" lang="es"><!-- InstanceBegin template="/Templates/temas_resolver.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<!--Zona editable 1 -->
<!-- InstanceBeginEditable name="doctitle" -->
<title>Resolver ecuaciones de 2º grado. Actividades en vadenumeros.es</title>
<meta name="Description" content="Este guión te permite resolver ecuaciones de segundo grado, obtienes el valor del discriminante y las soluciones." />
<meta name="Keywords" content="matemáticas, matemáticas bachillerato, matemáticas ESO, selectividad" />
<script type="text/javascript">
function res()
{
a=document.datos.a.value;b=document.datos.b.value;c=document.datos.c.value;
disc=parseFloat(b*b-4*a*c);
document.datos.d.value=disc;
if (disc<0) {alert('No hay solución real')}
else
{ x1=(-b-Math.sqrt(disc))/(2*a);
x2=(-b+Math.sqrt(disc))/(2*a);
document.datos.x1.value=x1;
document.datos.x2.value=x2; }
}
</script>
<!-- InstanceEndEditable -->
<!--Fin Zona editable 1 -->
<meta name="Author" content="Pilar Ferrero"/>
<meta name="Language" content="es"/>
<meta name="Robots" content="index, follow"/>
<link rel="alternate" href="[url]http://www.vadenumeros.es[/url]" title="Matemáticas"
media="all" xml:lang="es" lang="es"/>
<link href="../estilo/temas_resolver.css" rel="stylesheet" type="text/css" />
<link href="../estilo/menu.css" rel="stylesheet" type="text/css"/>
<link href="../estilo/menuBox_corto.css" rel="stylesheet" type="text/css"/>
<!--Coloco una zona editable sin nada, por si tengo que poner algo más-->
<!-- InstanceBeginEditable name="cabeza" --><!-- InstanceEndEditable -->
<script type="text/javascript" src="[url]https://apis.google.com/js/plusone.js[/url]"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-10327489-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? '[url]https://ssl[/url]' : '[url]http://www[/url]') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="container"><!-- InstanceBeginEditable name="icono" -->
<div id="header">
<h1><a href="[url]http://www.vadenumeros.es[/url]" title="Matemáticas"> <img src="../imagenes/logo-vadenumeros.png"
width="221" height="41" alt="Matemáticas"
style="border-style:none; margin-bottom: 0px;"/><span>Resolver una ecuación de 2º grado</span></a></h1>
</div>
<!-- InstanceEndEditable -->
<!--div cierre header-->
<div id="buscar">
<form action="[url]http://www.google.com/cse[/url]" id="cse-search-box">
<div>
<p>
<input type="hidden" name="cx" value="012099250906825036053:y0hnrloq1pq" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" size="31" />
<input type="submit" name="sa" value="Buscar" />
</p>
</div>
</form>
<script type="text/javascript" src="[url]http://www.google.com/jsapi[/url]"></script>
<script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script>
<script type="text/javascript" src="[url]http://www.google.com/coop/cse/t13n?form=cse-search-box&[/url] t13n_langs = es"></script>
<script type="text/javascript" src="[url]http://www.google.com/coop/cse/brand?form=cse-search-box&lang=es[/url]"></script>
</div>
<!--cierre de buscar-->
<div id="menu">
<ul>
<li class="nivel1"><a href="[url]http://www.vadenumeros.es[/url]" title="Inicio" class="nivel1">INICIO</a>
<!--[if lte IE 6]><a href="[url]http://www.vadenumeros.es[/url]" class="nivel1ie">INICIO<table class="falsa"><tr><td><![endif]-->
</li>
<li class="nivel1"><a href="#" title="ESO" class="nivel1">ESO</a>
<!--[if lte IE 6]><a href="#" class="nivel1ie">ESO<table class="falsa"><tr><td><![endif]-->
<ul class="dos">
<li><a href="#"></a></li>
<li><a href="../tercero/indice-tercero-de-eso.htm" title="Índice 3º de ESO ">Tercero</a></li>
<li><a href="../cuarto/indice-cuarto-de-eso-a.htm" title="Índice 4º de Sociales">Cuarto de Sociales (A)</a></li>
<li><a href="../cuarto/indice-cuarto-de-eso-b.htm" title="Índice 4º de Ciencias" >Cuarto de Ciencias (B)</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="nivel1"><a href="#" title="Bachillerato" class="nivel1">BACHILLERATO</a>
<!--[if lte IE 6]><a href="#" class="nivel1ie">BACHILLERATO<table class="falsa"><tr><td><![endif]-->
<ul class="tres">
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="../primero/indice-primero-de-ciencias.htm" title="1º de Bachiller Ciencias">Primero de Ciencias</a></li>
<li><a href="../primero/indice-primero-de-sociales.htm" title="1º de Bachiller Sociales">Primero de Sociales</a></li>
<li><a href="../segundo/indice-segundo-de-ciencias.htm" title="2º de Bachiller Ciencias">Segundo de Ciencias</a></li>
<li><a href="../segundo/indice-segundo-de-sociales.htm" title="2º de Bachiller Sociales">Segundo de Sociales</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="nivel1"><a href="[url]http://www.vadenumeros.es/selectividad/selectividad.htm[/url]" title="Selectividad"
class="nivel1">SELECTIVIDAD</a>
<!--[if lte IE 6]><a href="[url]http://www.vadenumeros.es/selectividad/selectividad.htm[/url]"
class="nivel1ie">SELECTIVIDAD<table class="falsa"><tr><td><![endif]-->
</li>
<li class="nivel1"><a href="[url]http://www.vadenumeros.es/actividades/indice-de-actividades.htm[/url]"
title="Actividades" class="nivel1">ACTIVIDADES</a>
<!--[if lte IE 6]><a href="[url]http://www.vadenumeros.es/actividades/indice-de-actividades.htm[/url]"
class="nivel1ie">ACTIVIDADES<table class="falsa"><tr><td><![endif]-->
</li>
<li class="nivel1"><a href="[url]http://www.vadenumeros.es/descargas/descargas.htm[/url]" title="Descargas"
class="nivel1">DESCARGAS</a>
<!--[if lte IE 6]><a href="[url]http://www.vadenumeros.es/descargas/descargas.htm[/url]"
class="nivel1ie">DESCARGAS<table class="falsa"><tr><td><![endif]-->
</li>
<li class="nivel1"><a href="[url]http://www.vadenumeros.es/enlaces.htm[/url]" title="Enlaces" class="nivel1">ENLACES</a>
<!--[if lte IE 6]><a href="[url]http://www.vadenumeros.es/enlaces.htm[/url]" class="nivel1ie">ENLACES<table class="falsa">
<tr><td><![endif]-->
</li>
<li class="nivel1"><a href="#" title="Más" class="nivel1">MÁS </a>
<!--[if lte IE 6]><a href="#" class="nivel1ie">MÁS COSAS<table class="falsa"><tr><td><![endif]-->
<ul class="ocho">
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="#"></a></li>
<li><a href="../matematicas-on-line.htm" title="Matemáticas online">Matemáticas online</a></li>
</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>
</div>
<!--cierre menu-->
<div id="publi_1">
<p>
<script type="text/javascript"><!--
google_ad_client = "pub-1241077363478841";
/* 728x90, creado 27/04/08 */
google_ad_slot = "8262091468";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript" src="[url]http://pagead2.googlesyndication.com/pagead/show_ads.js[/url]">
</script>
</p>
</div>
<!--cierre de espacio publi_1-->
<!-- InstanceBeginEditable name="contenidos" -->
<div id="contenidos">
<div id="enlaces_horizontal">
<p><a href="[url]http://www.vadenumeros.es[/url]" title="Matemáticas"> Inicio </a> >
<a href="indice-de-actividades.htm" title="Índice de actividades">Índice de actividades</a>
> Resolver una ecuación de 2º grado </p>
</div>
<!--Cierre enlaces_horizontal-->
<br />
<h2>Resolver una ecuación de 2º grado</h2>
<br />
<h3>Utilización</h3>
<br />
<h5>Resolver la ecuación: x<sup>2</sup>- 5x + 6 =0 </h5>
<br />
<p>Introduce 1,-5, 6 como coeficientes (no olvides el 1). </p>
<p>Por último haz clic en el botón Resolver.</p>
<p>Obtendrás el valor del discriminante = 1 y las soluciones x<sub>1</sub>= 2, x<sub>2</sub>= 3.</p>
<br />
<!--Abrimos id formulario-->
<div id="formulario">
<form name="datos" action="">
<p>
<input type="text" name="a" size="3"/>
x<sup>2</sup> +
<input type="text" name="b" size="3"/>
x +
<input type="text" name="c" size="3"/>
= 0</p>
<br />
<p>
<input name="button" type="button" onClick="res()" value="Resolver"/>
</p>
<br />
<p>
discriminante
<input type="text" name="d" size="3"/>
<br />
<br />
x<sub>1</sub>=
<input type="text" name="x1" size="3"/>
<br />
<br />
x<sub>2</sub>=
<input type="text" name="x2" size="3"/>
</p>
</form>
</div>
<!--Cierre de formulario-->
<br />
<h3>Practica</h3>
<br />
<p>Resuelve las siguientes ecuaciones: </p>
<br />
<p>a) x<sup>2</sup>+ 5x + 6 = 0
b) x<sup>2</sup>- 2x + 1 = 0
c) x<sup>2</sup> + 2x + 5 = 0 </p>
<br />
<p> d) x<sup>2</sup>- 9 = 0
e) -7x<sup>2</sup> + 11x - 23 = 0
f) x<sup>2 </sup>+ 9 = 0 </p>
<br />
<!-- menuBox corto para navegar al final del tema-->
<div id="menuBox">
<ul>
<li><a href="#"><strong>+ Enlaces relacionados ...</strong></a>
<ul>
<li>Volver a:</li>
<li><a href="../tercero/ecuaciones-de-segundo-grado.htm" title="Ecuaciones de 2º grado">
3º 7.1 Ecuaciones de 2º grado. </a></li>
<li><a href="../cuarto/ecuaciones-y-sistemas.htm" title="Ecuaciones y sistemas">
4º 4.1 Ecuaciones y sistemas </a></li>
<li><a href="../primero/ecuaciones-logaritmicas.htm" title="">
1º 3.1 Ecuaciones. Ecuaciones logarítmicas </a></li>
</ul>
</li>
</ul>
</div>
<!--cierre de menuBox corto-->
<br/>
</div>
<!-- InstanceEndEditable -->
<!--cierre de contenidos-->
<div id="publicidad">
<div id="plusone_general" >
<script type="text/javascript">
// <![CDATA[
document.writeln('<g:plusone></g:plusone>');
// ]]>
</script>
</div>
<div id="publi_2">
<p>
<script type="text/javascript"><!--
google_ad_client = "pub-1241077363478841";
/* 300x250, creado 15/11/08 */
google_ad_slot = "7092417731";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="[url]http://pagead2.googlesyndication.com/pagead/show_ads.js[/url]">
</script>
</p>
</div>
<!--fin de publi_2-->
<br />
<div id="publi_3">
<p>
<script type="text/javascript"><!--
google_ad_client = "pub-1241077363478841";
/* 300x250, creado 15/11/08 */
google_ad_slot = "8579099222";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="[url]http://pagead2.googlesyndication.com/pagead/show_ads.js[/url]">
</script>
</p>
</div>
<!--fin de publi_3-->
</div>
<!--Cierre de publicidad LATERAL-->
<!--ABRIMOS PUBLICIDAD PIE-->
<div id="publi_pie">
<script type="text/javascript"><!--
google_ad_client = "pub-1241077363478841";
//728x15, creado 29/12/07
google_ad_slot = "4734010726";
google_ad_width = 728;
google_ad_height = 15;
//--></script>
<script type="text/javascript"
src="[url]http://pagead2.googlesyndication.com/pagead/show_ads.js[/url]">
</script>
<!--vinculo1-->
<script type="text/javascript"><!--
google_ad_client = "pub-1241077363478841";
//728x15, creado 29/12/07
google_ad_slot = "4734010726";
google_ad_width = 728;
google_ad_height = 15;
//--></script>
<script type="text/javascript"
src="[url]http://pagead2.googlesyndication.com/pagead/show_ads.js[/url]">
</script>
<!--vinculo2-->
</div>
<!--cierre de publi_pie-->
<div id="footer">
<p>
© 2007 - 2012 |
<a href="../datoslegales.htm" title="Legal">Legal</a> |
<a href="../sugerencias-va-de-numeros.htm" title="Sugerencias">Contacto</a>
| <a href="../presentacion-va-de-numeros.htm" title="Presentación">Presentación</a>
| <a href="../mapa-del-sitio-4.htm" title="Mapa del sitio vadenumeros.es">Mapa del sitio</a> </p>
</div>
<!--cierre footer-->
</div><!--cierre container-->
</body>
<!-- InstanceEnd --></html>
al modificar el codigo original ya no hace los calculos me pueden ayudar para que funcione?