<?php
 session_start();
 include ("emenu1.php"); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>Contacto</TITLE>
<script language="javascript" src="fstandar.js"></script>
<link rel="stylesheet" href="styles.css">
<script language="javascript">
function validar(form1){
 if (form1.nombre.value.length < 4){
  alert("Escriba por lo menos 4 caracteres en el campo \"Nombre Completo\".");
  document.form1.nombre.style.backgroundColor="#FFFFCC";
  document.form1.nombre.focus();
  return (false);
 }
 var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚabcdefghijklmnñopqrstuvwxyzáéíóú ";
 var checkStr = document.form1.nombre.value;
 var allValid = true;
 for (i = 0;  i < checkStr.length;  i++){
  ch = checkStr.charAt(i);
  for (j = 0;  j < checkOK.length;  j++)
  if (ch == checkOK.charAt(j))
  break;
  if (j == checkOK.length){
   allValid = false;
   break;
  }
 }
 if (!allValid){
  alert("Escriba sólo letra caracteres en el campo \"nombre\".");
  document.form1.nombre.style.backgroundColor="#FFFFCC";
  document.form1.nombre.focus();
  return (false);
 }
 if (document.form1.telefono.value.length <= 5){
  alert("Escriba un valor de (6) seis digitos para regiones y de 7 (siete) para santiago en el campo \"telefono\".");
  document.form1.telefono.style.backgroundColor="#FFFFCC";
  document.form1.telefono.focus();
  return (false);
 }
 var checkOK = "0123456789-";
 var checkStr = form1.telefono.value;
 var allValid = true;
 var decPoints = 0;
 var allNum = "";
 for (i = 0;  i < checkStr.length;  i++){
  ch = checkStr.charAt(i);
  for (j = 0;  j < checkOK.length;  j++)
  if (ch == checkOK.charAt(j))
  break;
  if (j == checkOK.length){
   allValid = false;
   break;
  }
  allNum += ch;
 }
 if (!allValid){
  alert("Escriba sólo caracteres numericos en el campo \"Telefono\".");
  document.form1.telefono.style.backgroundColor="#FFFFCC";
  document.form1.telefono.focus();
  return (false);
 }
 var chkVal = allNum;
 var prsVal = parseInt(allNum);
 if (chkVal != "" && !(prsVal >= "111111" && prsVal <= "9999999")){
  alert("Escriba un valor de (6) seis digitos para regiones y de (7) siete para santiago en el campo \"telefono\".");
  document.form1.telefono.style.backgroundColor="#FFFFCC";
  document.form1.telefono.focus();
  return (false);
 }
 if ((document.form1.email.value.indexOf ('@', 0) == -1)||(document.form1.email.value.length < 5)){ 
  alert("Escriba una dirección de correo válida en el campo \"Dirección de correo\".");
  document.form1.email.style.backgroundColor="#FFFFCC";
  document.form1.email.focus();
  return (false); 
 }
 return (true);
}
//--></SCRIPT>

<style type="text/css">
<!--
.Estilo1 {
	color: #FF0000;
	font-weight: bold;
}
.Estilo2 {color: #FFFFFF}
-->
</style>
</HEAD>
<BODY>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" align=center 
border=0>
  <TBODY>
  <TR>
    <TD vAlign=center align=middle height="100%">
      <TABLE height=400 cellSpacing=0 cellPadding=0 width=718 border=0>
        <TBODY>
        <TR>
          <TD width="718" height=22>
            <TABLE height=22 cellSpacing=0 cellPadding=0 width="100%" 
              border=0><TBODY>
              <TR>
                <TD vAlign=top align=left width=24><A 
                  href="index.php"><IMG src="images/xc_left.gif" alt="Inicio" width=24 
                  height=22 
                  border=0></A></TD>
                <TD vAlign=top align=left width="100%"><IMG height=22 
                  src="images/xc_center.gif" width="100%" 
                border=0></TD>
              <TD vAlign=top align=right width=24><IMG height=22 
                  src="images/xc_right.gif" width=24 
              border=0></TD></TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD class=BottomTable vAlign=top 
          background=images/xc_stripes.gif height="100%">
            <TABLE class=IconsTable height=33 cellSpacing=0 cellPadding=0 
            width="100%" border=0>
              <TBODY>
              <TR>
                <TD height="32"><div align="right" class="larger">
                  <div align="right">Vemol</div>
                </div></TD>
                </TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=0 width="715" 
              border=0>
              <TBODY>
              <TR>
                <TD width=23 height=18>&nbsp;</TD>
                <TD vAlign=top align=left width=180 height=18>&nbsp;</TD>
                <TD width=12 height=18>&nbsp;</TD>
                <TD width="461" height=18 class=MainMenuHead>Formulario de Contacto :</TD>
                <TD width=20 height=18>&nbsp;</TD></TR>
              <TR>
                <TD width=23 height="100%">&nbsp;</TD>
                <TD vAlign=top align=left width=180 height="100%">
                  <TABLE cellSpacing=0 cellPadding=0 width="150" border=0>
                    <TBODY>
                    <TR>
                      <TD width=10 align="left" valign="top"><IMG height=12 
                        src="images/xc_dotgrey.gif" width=10></TD>
                      <TD width=4>&nbsp;</TD>
                      <TD class=LeftMenu noWrap><acronym title="Solo usuarios Registrados">Envi&eacute;nos este Formulario<br />
y nuestro equipo le <br />
responder&aacute; a la brevedad. </acronym></TD>
                    </TR>
                    <TR>
                      <TD width=10 align="left" valign="top"><IMG height=12 
                        src="images/xc_dotgrey.gif" width=10></TD>
                      <TD width=4>&nbsp;</TD>
                      <TD class=LeftMenu noWrap>Indique datos v&aacute;lidos de <br />
                        contacto.</TD>
                    </TR>
                    <TR>
                      <TD width=10 valign="top"><IMG height=12 
                        src="images/xc_dotgrey.gif" width=10></TD>
                      <TD>&nbsp;</TD>
                      <TD class=LeftMenu noWrap>&oacute; Ll&aacute;menos a los tel&eacute;fonos:<br />
                        (56 2) 222-3669.<br />
                        (56 2) 634-3078.</TD>
                    </TR></TBODY></TABLE></TD>
                <TD width=12 height="100%">&nbsp;</TD>
                <td class="contentcell"><form action="mensaje.php" method="post" onSubmit="return validar(this)" name="form1" id="form1">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                      <tr>
                        <th scope="row"><div align="right" class="Emphasize">Nombre:</div></th>
                        <td><input name="nombre" type="text" id="nombre" size="50" maxlength="100"/></td>
                      </tr>
                      <tr>
                        <th scope="row"><div align="right" class="Emphasize">Direcci&oacute;n:</div></th>
                        <td><input name="direccion" type="text" id="direccion" size="50" maxlength="100"/></td>
                      </tr>
                      <tr>
                        <th scope="row"><div align="right" class="Emphasize">Comuna:</div></th>
                        <td><input name="comuna" type="text" id="comuna" size="20" maxlength="30"/></td>
                      </tr>
                      <tr>
                        <th scope="row"><div align="right" class="Emphasize">Telef&oacute;no:</div></th>
                        <td><input name="telefono" type="text" id="telefono" size="14" maxlength="15"/></td>
                      </tr>
                      <tr>
                        <th scope="row"><div align="right" class="Emphasize">Celular:</div></th>
                        <td><input name="celular" type="text" id="celular" size="14" maxlength="15"/></td>
                      </tr>
                      <tr>
                        <th scope="row"><div align="right" class="Emphasize">Email:</div></th>
                        <td><input name="email" type="text" id="email" size="50" maxlength="100"/></td>
                      </tr>
                      <tr>
                        <th valign="top" scope="row"><div align="right" class="Emphasize">Motivo del Contacto:</div></th>
                        <td><textarea name="motivo" cols="30" rows="3" id="motivo">
</textarea></td>
                      </tr>

                      <tr>
                        <th colspan="2" scope="row"><input name="cmdenvia" type="submit" id="cmdenvia" value="Enviar" onclick="valida()" />
                            <label></label>
                          &nbsp;&nbsp;
                          <label></label>
                          <label></label>
                          <label></label>
                          &nbsp;&nbsp;
                          <input name="cmlimp" type="reset" id="cmlimp" value="Limpiar" onclick="eliminar()"/>
                          <label></label></th>
                      </tr>
                    </table>
                </form></td>
                <TD width=20 height="100%">&nbsp;</TD></TR>
              <TR>
                <TD width=23 height=8>&nbsp;</TD>
                <TD width=180 height=8>&nbsp;</TD>
                <TD width=12 height=8>&nbsp;</TD>
                <TD width="461" height=8><p class="Emphasize">&nbsp;</p>
                  <p>&nbsp;</p></TD>
                <TD width=20 
      height=8>&nbsp;</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY>
<!-- /Footer -->
<script language="JavaScript" src="menu.js"></script>
<script language="JavaScript" src="menu_tpl.js"></script>
<script language="JavaScript">
	new menu (MENU_ITEMS, MENU_POS);
</script>
</TABLE>
	</BODY>
</HTML>