<?php
include("paginas/stilos/config.inc.php");
 include("stilos/config.inc.php");
  include("../clases/BDConexion.php");
  include("../clases/clsReq.php");
  include("Funciones.php");
  include("funcion/funciones.php");
  $objPer=new clsReq;
  if(isset($valor1)){$valor1=$valor1;}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>.:LABORATORIO:.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="stilos/Estilos.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE=javascript>
function fn(form,field)
{
		var next=0, found=false
		var f=form
		if(event.keyCode!=13) return;
		for(var i=0;i<f.length;i++) {
		if(field.name==f.item(i).name){
		next=i+1;
		found=true
		break;
		}
}
while(found){
		if( f.item(next).disabled==false && f.item(next).type!='hidden'){
		f.item(next).focus();
		break;
}
else{
		if(next<f.length-1)
		next=next+1;
		else
			break;
		}
}
}
</SCRIPT>
<SCRIPT>
function enviar_url()
{
	if(document.form1.raz_emp.value ==""){alert('No Escribio la Razon Social de la Empresa y Es Obligatorio'); document.form1.raz_emp.focus(); return; }
	if(document.form1.dir_emp.value ==""){alert('No Escribio la Direccion de la Empesa y Es Obligatorio'); document.form1.dir_emp.focus(); return; }
	if(document.form1.ruc_emp.value ==""){alert('No Escribio la Direccion de la Empesa y Es Obligatorio'); document.form1.ruc_emp.focus(); return; }
	form1.submit();
}
</SCRIPT>
<script> 
function centrar() { 
    iz=(screen.width-document.body.clientWidth) / 2; 
    de=(screen.height-document.body.clientHeight) / 2-50; 
    moveTo(iz,de); 
}     
</script>
<script language="JavaScript"> 
<!--
//sURL,x,y
function Vincular_Ventana(sURL) { 
	if (!window.focus) return;
			window.location.href=sURL;
		}
//-->

</script>
<script language="javascript" type="text/javascript">
  function mensajes(m){
			  if (m==1){alert('No se Pudo Grabar la Empresa,\n Porque ya existe Una Empresa con este Numero de Ruc');
			            document.form1.ruc_emp.select();
			            document.form1.ruc_emp.focus();
			           }
  }

</script>

<link href="stilos/Estilos.css" rel="stylesheet" type="text/css">
<link href="paginas/stilos/Estilos.css" rel="stylesheet" type="text/css">
<link href="Estilos.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Estilo1 {color: #FFFFFF}
.Estilo2 {font-size: 10px}
-->
</style>
</head>
<?php if ($cerrar==1){?>
<body background='../imagenes/fondo.jpg' onload='window.close();'>
<?php }else{?>
   <?php if ($men==1){?>
			<body background='../imagenes/fondo.jpg' onload='document.form1.raz_emp.focus(); centrar(); mensajes(1);'><?php }?>
 		    
			<body background='../imagenes/fondo.jpg' onload='document.form1.raz_emp.focus(); centrar()'>
<?php }?>
<table width="269" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr class="lblCampo" >
    <td colspan="4"><div align="center">
        <table width="385" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="25"><img src="../estilo_tabla/parte_sup_izq.gif" width="25" height="25"></td>
            <td width="409" background="../estilo_tabla/parte_sup_cen.gif" valign="bottom">
			<div align="left" class="lblTituloReporte Estilo1" >Crear Nueva Empresa </div>			</td>
            <td width="25"><img src="../estilo_tabla/parte_sup_der.gif" width="25" height="25"></td>
          </tr>
          <tr>
            <td width="25" background="../estilo_tabla/parte_med_izq.gif">&nbsp;</td>
            <td width="409" height="86" background="../estilo_tabla/parte_med_cen.gif"><div align="center">
              
                <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
				<form name="form1" method="post" action="procesos/cvp_valida_empresas.php?param=1">
                  <tr class="parrafo">
                    <td height="18" colspan="3" class="normal">&nbsp;</td>
                    </tr>
                  
                  <tr class="parrafo">
                    <td width="39%" height="18" class="rdoBanners"><div align="left" class="lblCampo Estilo2">Raz&oacute;n de la Empresa </div></td>
                    <td colspan="2">
                      <div align="left">
                        <input name="raz_emp" type="text" class="lblForm" id="login" onkeyup=fn(this.form,this) value="<?=$raz_emp?>" size="40.">
                      </div></td>
                  </tr>
                  <tr class="parrafo">
                    <td height="18" class="rdoBanners">Direccion </td>
                    <td colspan="2"><input name="dir_emp" type="text" class="lblForm" id="dir_emp" onkeyup=fn(this.form,this) value="<?=$dir_emp?>" size="40."></td>
                  </tr>
                  <tr class="parrafo">
                    <td height="18" class="rdoBanners">N&ordm; Ruc</td>
                    <td colspan="2"><input name="ruc_emp" type="text" class="lblForm" id="ruc_emp" onkeyup=fn(this.form,this) value="<?=$ruc_emp?>" size="40."></td>
                  </tr>
                  <tr class="parrafo">
                    <td height="18" class="rdoBanners">Contacto</td>
                    <td colspan="2"><input name="cont_emp" type="text" class="lblForm" id="cont_emp" onkeyup=fn(this.form,this) value="<?=$cont_emp?>" size="40."></td>
                  </tr>
                  <tr class="parrafo">
                    <td height="18" class="rdoBanners">Pais</td>
                    <td colspan="2" align="left"><?php echo $objPer->TiposPais("tipo_pais","PERU") ?></td>
                  </tr>
                  <tr class="parrafo">
                    <td height="18" class="rdoBanners">Ciudad</td>
                    <td colspan="2" align="left"><input name="ciud_emp" type="text" class="lblForm" id="ciud_emp" onkeyup=fn(this.form,this) value="<?=$ciud_emp?>" size="33"></td>
                  </tr>
                  <tr class="parrafo">
                    <td height="18" class="rdoBanners">&nbsp;</td>
                    <td colspan="2">&nbsp;</td>
                  </tr>
                  <tr class="parrafo">
                    <td height="18" class="normal">
                      
                        
                        <div align="center">
                          <input name="Button" type="button" value="Grabar" style="<?=$stylo['st2']?>" class="botira" onClick="enviar_url()" >
                        </div></td>
                    <td width="10%" height="18" class="normal">&nbsp;</td>
                    <td width="51%" class="normal"><input name="Button2" type="button" value="Cancelar" style="<?=$stylo['st2']?>" class="botira" onClick="window.close();"  >
                      <label></label></td>
                  </tr>
				  </form>
                </table>
              
            </div></td>
            <td background="../estilo_tabla/parte_med_der.gif">&nbsp;</td>
          </tr>
          <tr>
            <td><img src="../estilo_tabla/parte_inf_izq.gif" width="25" height="20"></td>
            <td background="../estilo_tabla/parte_inf_cen.gif">&nbsp;</td>
            <td><img src="../estilo_tabla/parte_inf_der.gif" width="25" height="20"></td>
          </tr>
        </table>
    </div></td>
  </tr>
  <tr valign="top" class="lblCampo" >
    <td colspan="4">
      <div align="center"> </div></td>
  </tr>
</table>
</body>

</html>

