function A(c) 
{ 
	var entra=new Array(' ','-','_','*','/','+','.','!','@','#','$','%','^','&','(',')','=','{','}','[',']',':',';',',','<','>','?','|','`','~','¡','¿','á','é','í','ó','ú','ä','ë','ï','ö','ü','à','è','ì','ò','ù','ñ'); 
	var sale =new Array('','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','','a','e','i','o','u','a','e','i','o','u','a','e','i','o','u','n'); 
	do
	{
		var oc=new String(c.value),nt=new String(""),nc; 
		oc = c;
		for(var q=0;q<oc.length;q++) 
		{ 
			nc=oc.charAt(q); 
			for(var w=0;w<entra.length;w++) 
			{ 
				if(oc.charAt(q)==entra[w]) 
				{ 
					if(q!=0 && entra[w]=='-')
					{ 
						break;
					}
					else
					{
						nc=sale[w]; 
						break; 
					}
				} 
			} 
			nt+=nc; 
		} 
		document.formaBusq.dominio.value=nt;
		c=nt;
		nc=nt.charAt(0);
		delete oc,nt; 
	}while(nc=='-')
} 

function verificaSintaxis() {
	var regex = new RegExp('^[a-zA-Z0-9]([a-zA-Z0-9\-])*[a-zA-Z0-9]$');
	var cont = 0;
	var dominio
	var dominio2
	dominio = document.formaBusq.dominio.value
	dominio2 = dominio.split(".")
	document.formaBusq.dominio.value = dominio2[0]
	A(document.formaBusq.dominio.value)

/*	if (!regex.test(document.formaBusq.dominio.value)) {
		alert("Error en captura, favor de revisar la sintaxis");
		flag = 0;
		return false;
	}
	if (document.formaBusq.tipo.length) {
		var len = document.formaBusq.tipo.length;
		var flag = 0, i, cont = 0;
		for (i = 0;i < len; i++) {
			if (document.formaBusq.tipo[i].checked){
				cont = cont + 1;
				flag = 1;
			}
		}
	}
	else
		if (document.formaBusq.tipo.checked)
			flag = 1;

	if (!flag) {
		alert("Por favor selecciona por lo menos un dominio a registrar");
		return false;
	}
	document.formaBusq.cont.value = cont; */
}

document.write('<table width="468" height="60" border="0" cellpadding="0" cellspacing="0" bgcolor="ececec">');
document.write('  <tr><td>');
document.write('	<table width="468" border="0" align="center" cellpadding="0" cellspacing="0">');
document.write('        <tr><td align="left"><img src="http://dominios.terra.com.mx/i/esq1.gif" width="10" height="13"></td>');
document.write('          <td width="448" align="left" bgcolor="1C3964"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Consulta ');
document.write('            <strong>GRATIS</strong> la disponibilidad de tu dominio:</font></td>');
document.write('          <td><img src="http://dominios.terra.com.mx/i/esq2.gif" width="10" height="13"></td>');
document.write('		</tr>');
document.write('    </table>');
document.write('  </td></tr>');
//document.write('	<tr bgcolor="ececec" height="5"><td></td></tr>');
document.write('  <tr><td>');
document.write('        <table width="468" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="ececec">');
document.write('        <form action="http://dominios.terra.com.mx/buscaDominio2.asp" method="post" name="formaBusq" id="formaBusq" target="_blank" onSubmit="return(verificaSintaxis());">');
document.write('		<input type="hidden" name="cont" value="8">');
document.write('		<input type="hidden" name="mx" value="0">	');
//document.write('		<tr bgcolor="ececec" height="5"><td><font color="ececec"></font></td><td> </td><td> </td></tr>');
document.write('          <tr bgcolor="ececec"><td height="19" align="right" valign="top"><font size="1" face="Arial, Helvetica, sans-serif"> ');
document.write('            <img src="http://dominios.terra.com.mx/i/img_wwwc.gif" width="54" height="17" border="0" > ');
document.write('            <input name="dominio" type="text" style="font-family: Arial; font-size:9px;" size="30" maxlength="40" height="15">');
document.write('            &nbsp; </font></td>');
document.write('              <td height="19" align="left"><font size="1" face="Arial, Helvetica, sans-serif"><input name="image3" type="image" src="http://dominios.terra.com.mx/i/btn_consultarc.gif" width="75" height="19" border="0"></font></td>');
document.write('          <td><img src="http://dominios.terra.com.mx/i/ej1.gif" width="117" height="13"><input type="hidden" name="tipo" value=".com.mx, .net.mx, .org.mx, .edu.mx, .gob.mx, .com, .net, .org"></td>');
document.write('          	<td></td>');
document.write('		  </tr>');
//document.write(' 		<tr bgcolor="ececec" height="5"><td><font color="ececec"></font></td><td></td><td></td></tr>');
//document.write('          <tr bgcolor="ececec"><td height="17" colspan="3" align="center" valign="bottom"><font size="1" face="Arial, Helvetica, sans-serif"> ');
//document.write('            <input type="checkbox" name="tipo" value=".com.mx">.com.mx ');
//document.write('            <input type="checkbox" name="tipo" value=".net.mx">.net.mx ');
//document.write('            <input type="checkbox" name="tipo" value=".org.mx">.org.mx ');
//document.write('            <input type="checkbox" name="tipo" value=".edu.mx">.edu.mx ');
//document.write('            <input type="checkbox" name="tipo" value=".gob.mx">.gob.mx ');
//document.write('            <input type="checkbox" name="tipo" value=".com">.com ');
//document.write('            <input type="checkbox" name="tipo" value=".net">.net ');
//document.write('            <input type="checkbox" name="tipo" value=".org">.org</font></td>');
document.write('		</form>');
document.write('        </table>');
document.write('  </td></tr>');
document.write('  <tr><td>');
document.write('     <table width="468" border="0" align="center" cellpadding="0" cellspacing="0">');
document.write('        <tr><td width="10" height="5"><img src="http://dominios.terra.com.mx/i/esq3.gif" width="10" height="5"></td>');
document.write('        <td width="448" height="5" bgcolor="ececec"><img src="" width="448" height="1"></td>');
document.write('        <td width="10" height="5"><img src="http://dominios.terra.com.mx/i/esq4.gif" width="10" height="5"></td>');
document.write('     </table>');
document.write('  </td></tr>');
document.write('</table>');
