function CheckNomDom(okChar,minLength,maxLength,startEndChar)
{
	nom = document.form1.domain.value;
	//ok = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-";
	ok = okChar;
	sw = 0;
	if (!nom == "")
	{
		if (nom.length >= minLength && nom.length <= maxLength)
		{
			if (nom.charAt(0) != startEndChar && nom.charAt(nom.length-1) != startEndChar && nom.charAt(0) != "-" && nom.charAt(nom.length-1) != "-")
			{
				for (i=0; i <= nom.length-1;i++)
				{
					if (ok.indexOf(nom.charAt(i)) == -1 )
					{
						sw = 1;
					}
				}
				if (sw == 0)
				{
					r = true;
				}
				else
				{
					MensajeError(MensajeError1);
				}
			}
			else
			{
				MensajeError(MensajeError2);
			}
		}
		else
		{
			MensajeError(MensajeError3);
		}
	}
	else
	{
		MensajeError(MensajeError4);
	}
}
 
 
function CheckNomDom_ext(okChar,minLength,maxLength,startEndChar)
{
	extension=""
	nom = document.form1.domain.value;
	if (document.form1.ext.length >0)
	{
		myOption = -1;
		for (i=document.form1.ext.length-1; i > -1; i--)
		{
			if (document.form1.ext[i].checked)
			{
				myOption = i;
				extension=extension+"-"+document.form1.ext[i].value;
			}
		}
	}
 
	document.form1.Extencion.value=extension.substring(1);
 
	//ok = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-";
	ok = okChar;
	sw = 0;
	if ((!nom == "")&&(myOption != -1))
	{
		document.form1.domains.value=nom;
		if (nom.length >= minLength && nom.length <= maxLength)
		{
			if (nom.charAt(0) != startEndChar && nom.charAt(nom.length-1) != startEndChar)
			{
				for (i=0; i <= nom.length-1;i++)
				{
					if (ok.indexOf(nom.charAt(i)) == -1 )
					{
						sw = 1;
					}
				}
				if (sw == 0)
				{
					r = true;
				}
				else
				{
					MensajeError(MensajeError1);
				}
			}
			else
			{
				MensajeError(MensajeError2);
			}
		}
		else
		{
			MensajeError(MensajeError3);
		}
	}
	else
	{
		if ((myOption == -1)&&(nom==""))
		{
			MensajeError(MensajeError6);
		}
		else
		{
			if (nom == "")
			{
				MensajeError(MensajeError4);
			}
			else
			{
				if ((myOption == -1))
				{
					MensajeError(MensajeError5);
				}
			}
		}
 
	//MensajeError(MensajeError4);
	}
}
 
 
function MensajeError(mensaje)
{
	alert(mensaje);
	r = false;
	document.form1.domain.focus();
}
 
 
function chkextension(thisform)
{
	extension=""
	domino=thisform.domain.value;
	if (thisform.ext.length >0)
	{
		myOption = -1;
		for (i=thisform.ext.length-1; i > -1; i--)
		{
			if (thisform.ext[i].checked)
			{
				myOption = i;
				extension=extension+"-"+thisform.ext[i].value;
			}
		}
	}
	thisform.Extencion.value=extension.substring(1);
	if ((myOption == -1)&&(domino==""))
	{
		MensajeError(MensajeError6);
		document.form1.domain.focus();
		return false;
	}
	if ((myOption == -1))
	{
		MensajeError(MensajeError5);
		return false;
	}
}