function IsEmailValid() {
var EmailOk  = true
var Temp     = document.forms["cotizacion"].email
var AtSym    = Temp.value.indexOf('@')
var Period   = Temp.value.lastIndexOf('.')
var Space    = Temp.value.indexOf(' ')
var Length   = Temp.value.length - 1
if ((AtSym < 1) ||
(Period <= AtSym+1) ||
(Period == Length ) ||
(Space  != -1))
{
msg2a += "  - Por favor, ingrese su Dirección de Correo Electrónico.\n";
bValidForm = false;
Temp.focus()
return false
}
return true
}

var bValidForm;
var msg2a;
function SubmitForm() {
bValidForm = true;
msg2a  = "___________________________________________________________\n\n";
msg2a += "No puede enviarse el formulario por los siguientes errores!\n";
msg2a += "___________________________________________________________\n\n";

if(document.forms["cotizacion"].empresa.value=="") {
msg2a += "  - Por favor, ingrese el nombre de su Empresa.\n";
bValidForm = false; }

if(document.forms["cotizacion"].nombre.value=="") {
msg2a += "  - Por favor, ingrese su Apellido y Nombre.\n";
bValidForm = false; }

if(document.forms["cotizacion"].cargo.value=="") {
msg2a += "  - Por favor, ingrese su Cargo.\n";
bValidForm = false; }

if(document.forms["cotizacion"].direccion.value=="") {
msg2a += "  - Por favor, ingrese su Dirección.\n";
bValidForm = false; }

if(document.forms["cotizacion"].ciudad.value=="") {
msg2a += "  - Por favor, ingrese su Ciudad.\n";
bValidForm = false; }

if(document.forms["cotizacion"].provincia.value=="") {
msg2a += "  - Por favor, ingrese su Provincia.\n";
bValidForm = false; }

if(document.forms["cotizacion"].pais.value=="") {
msg2a += "  - Por favor, ingrese su País.\n";
bValidForm = false; }

if(document.forms["cotizacion"].cod_pais.value=="") {
msg2a += "  - Por favor, ingrese su Código de País.\n";
bValidForm = false; }

if(document.forms["cotizacion"].cod_ciudad.value=="") {
msg2a += "  - Por favor, ingrese su Código de Ciudad.\n";
bValidForm = false; }

if(document.forms["cotizacion"].cod_telefono.value=="") {
msg2a += "  - Por favor, ingrese su Número de Teléfono.\n";
bValidForm = false; }

if(document.forms["cotizacion"].actividad.value=="") {
msg2a += "  - Por favor, ingrese la Actividad de su Empresa.\n";
bValidForm = false; }

if(document.forms["cotizacion"].usuarios.value=="") {
msg2a += "  - Por favor, ingrese el Número Total de Usuarios.\n";
bValidForm = false; }

IsEmailValid()
if (bValidForm==true) {
return true;
} else {
msg2a  += "\n\n";
alert(msg2a);
return false; }
}
