<?
require_once("../../comun/conexion3.php");

require_once("../../comun/actions.php");

require_once("../../comun/funciones.php");

//echo 'boking '.$txtbooking;
?>
<script type="text/javascript">
function com_ref_ajax(valor) {
 
  	$.post( "listas_de_busquedas/lista_de_communication_reference.php?valor="+valor,
  			function FuncionRecepcion(respuesta) {
  				var laRespuesta = eval('(' + respuesta + ')');
  				if ( laRespuesta != null ) {
  					var laActions = laRespuesta["actions"];
  					var liIdx;
  					for ( liIdx=0 ; liIdx<laActions.length ; liIdx++ )
  						eval( laActions[liIdx] );
  				}
  			});
 }
</script>


<script> 
function create_booking() {
	//alert($('#txtfile').val());
	//alert($('#Nidbooking').val())
	//alert($('#txtbooking_tmp').val())
	
	if($('#txtfile').val()==''){
		alert('Select file first');
		return;
	}
	if($('#txtbooking_tmp').val()!=''){
		alert('Booking already exists');
		return;
	}
	
	if($('#txtbooking_interteam').val()==''){
		alert('Fill up Booking Interteam');
		$('#txtbooking_interteam').focus()
		return;
	}
	if($('#txtforwarder_reference').val()==''){
		alert('Fill up Forwarder Reference');
		$('#txtforwarder_reference').focus()
		return;
	}
	
	var laDatos = valores_forma(document.form_booking);
  	$.post( "guardabooking.php?txtfiles="+$('#txtfile').val()+"&txtbooking="+$('#txtbooking_tmp').val()+"&idbooking="+$('#Nidbooking').val()+"&operacion="+$('#operacionBooking').val(), //guardageneral2booking es el usado ahora
			   $(laDatos),
				function FuncionRecepcion(respuesta) {
					var laRespuesta = eval('(' + respuesta + ')');
					if ( laRespuesta != null ) {
						var laActions = laRespuesta["actions"];
						var liIdx;
						for ( liIdx=0 ; liIdx<laActions.length ; liIdx++ )
							eval( laActions[liIdx] );
					}
				});
}	


function save_changes_booking() {
	if($('#txtfile').val()=='') {
		alert('Select file first');
		return;
	}
	
	if($('#txtbooking_tmp').val()==''){
		alert('Select the booking');
		return;
	}
	
	if($('#txtbooking_interteam').val()==''){
		alert('Fill up Booking Interteam');
		$('#txtbooking_interteam').focus()
		return;
	}
	if($('#txtforwarder_reference').val()==''){
		alert('Fill up Forwarder Reference');
		$('#txtforwarder_reference').focus()
		return;
	}
	var laDatos = valores_forma(document.form_booking);
  	$.post( "guarda_cambio_booking.php?txtfiles="+$('#txtfile').val()+"&txtbooking="+$('#txtbooking_tmp').val()+"&idbooking="+$('#Nidbooking').val()+"&operacion="+$('#operacionBooking').val(), //guardageneral2booking es el usado ahora
			   $(laDatos),
				function FuncionRecepcion(respuesta) {
					var laRespuesta = eval('(' + respuesta + ')');
					if ( laRespuesta != null ) {
						var laActions = laRespuesta["actions"];
						var liIdx;
						for ( liIdx=0 ; liIdx<laActions.length ; liIdx++ )
							eval( laActions[liIdx] );
					}
				});
}

function save_track() {
	loadin('','saving_track','Wait');
	var laDatos = valores_forma(document.form_booking);
  	$.post( "master/save_track.php?txtfiles="+$('#txtfile').val()+"&Tspan=saving_track&txtbooking_interteam="+$('#txtbooking_interteam').val(),
			   $(laDatos),
				function FuncionRecepcion(respuesta) {
					var laRespuesta = eval('(' + respuesta + ')');
					if ( laRespuesta != null ) {
						var laActions = laRespuesta["actions"];
						var liIdx;
						for ( liIdx=0 ; liIdx<laActions.length ; liIdx++ )
							eval( laActions[liIdx] );
					}
				});
}	

function save_despacho() {
	var laDatos = valores_forma(document.form_booking);
  	$.post( "guardaams.php?txtfiles="+$('#txtfile').val()+"&txtbooking="+$('#txtbooking_tmp').val(),
			   $(laDatos),
				function FuncionRecepcion(respuesta) {
					var laRespuesta = eval('(' + respuesta + ')');
					if ( laRespuesta != null ) {
						var laActions = laRespuesta["actions"];
						var liIdx;
						for ( liIdx=0 ; liIdx<laActions.length ; liIdx++ )
							eval( laActions[liIdx] );
					}
				});
}	

/*function save_bookingG() {
	var laDatos = valores_forma(document.form_booking);
  	$.post( "guardacambiobookingexpint.php?txtfiles="+$('#txtfile').val()+"&txtbooking="+$('#txtbooking_tmp').val()+"&idbooking="+$('#idbooking').val(),
			   $(laDatos),
				function FuncionRecepcion(respuesta) {
					var laRespuesta = eval('(' + respuesta + ')');
					if ( laRespuesta != null ) {
						var laActions = laRespuesta["actions"];
						var liIdx;
						for ( liIdx=0 ; liIdx<laActions.length ; liIdx++ )
							eval( laActions[liIdx] );
					}
				});
}	
*/
	

var miPopup 



function copyycnn(){ 



    this.document.form_booking.txtpickupaddres.value = this.document.form_booking.txt.value

	//main.txtreferencia.value = pref

//    window.close() 

}  







function ponref(pref){ 

    this.document.formcontenedor.txtreferencia.value = pref

    this.document.formoperaciones1.txtreferencia.value = pref 

	//main.txtreferencia.value = pref

//    window.close() 

}  



ns4 = (document.layers)? true:false

ie4 = (document.all)? true:false

function pulsarTecla(e) {

  if (ns4) {var TeclaN=e.which; var teclaReal = String.fromCharCode(TeclaN)

		   }

  if (ie4) {var TeclaIE=event.keyCode; var teclaReal = String.fromCharCode(TeclaIE)

  if (TeclaIE == "113"){

		   abreVentana(e);

		   }

		   }

}





function validabook()

{

if (this.document.form_booking.txtcommunication_reference.value!="")
{
	if (this.document.form_booking.txtReceiverID.value==""){
		alert('Completar con el receiver id, ejemplo: edipa_prod (panalpina)');
		this.document.form_booking.txtReceiverID.focus()
		return false;
	}
	if (this.document.form_booking.txtcustomer_reference.value==""){
		alert('Completar con el customer reference de este booking, si no lo tuviera completar con el nombre del cliente');
		this.document.form_booking.txtcustomer_reference.focus()
		return false;
	}
	if (this.document.form_booking.txtPassword_wwa.value==""){
		alert('Completar el password de usuario wwa de este cliente');
		this.document.form_booking.txtPassword_wwa.focus()
		return false;
	}
	if (this.document.form_booking.txtcustomer_email.value==""){
		alert('Completar el email (customer email) del cliente');
		this.document.form_booking.txtcustomer_email.focus()
		return false;
	}
}

if (this.document.form_booking.txtcustomer.value==""){
	alert ("Customer must be not empty");
	this.document.form_booking.txtcustomer.focus()
	return false;
}

if (this.document.form_booking.txtfinaldestination_booking.value==""){
	alert ("Final Destination must be not empty");
	this.document.form_booking.txtfinaldestination_booking.focus()
	return false;
}

if (this.document.form_booking.txtetafinaldest.value==""){
	alert ("ETA Final Destination must be not empty");
	this.document.form_booking.txtetafinaldest.focus()
	return false;
}

return true;
}

</script>

<script language="Javascript">
function preguntar(inst1,dato){
eliminar=confirm("Do you really want to delete it ? " + dato);
if (eliminar)
window.location.href = inst1; 
}
</script>


<div align="center">
<form name="form_booking" id="form_booking" method="post" >
  <input type="hidden" name="Nidbooking" id="Nidbooking" />
 <input type="hidden" name="Nfiles" id="Nfiles" />
 <input type="hidden" name="Nhbl" id="Nhbl" />
 <input type="hidden" name="Nbooking" id="Nbooking" />

  <input type="hidden" name="operacionBooking" id="operacionBooking" />
  
  <!--<input type="button" value="New Booking" onclick="document.form_booking.reset();document.getElementById('operacion').value='ALTABOOKING';
">-->
      
  <table width="776" border="1" align="left"  >
    <tr>
      <td align="left" colspan="5" id="titulo4" ></td>
    </tr>
    <tr>
      <td align="left" colspan="5" id="titulo3" ><b>BOOKING</b> <br />
        <br />
      <? include("anclas.php")?></td>
    </tr>
    <tr>
      <td align="center" colspan="5" id="titulo2" >&nbsp;</td>
    </tr>
    <tr><td align="center" colspan="5" id="titulo" >
      FILE: *** VESSEL: *** VOYAGE: *** POL: *** ETS: *** POD: *** ETA: ***
      </td></tr>
    
    <tr><td align="center" colspan="5">&nbsp;&nbsp;</td></tr>
    
    <tr><td colspan="5" align="left">
    <table width="924" border="1" align="left"  >
  <tr>
    <td width="211" align="left" >HBL</td>
    <td colspan="2" align="left" id="tit_hbl"></td>
    <td width="177"  align="left"></td>
    <td width="280" align="left" id="td"></td>
  </tr>
  <tr>
    <td align="left" >&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td  align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" >Booking</td>
    <td colspan="2" align="left"><input name="txtbooking_tmp" type="text" id="txtbooking_tmp" readonly="readonly" /></td>
    <td  align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" >&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td  align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" >Booking Interteam</td>
    <td colspan="2" align="left"><input name="txtbooking_interteam" type="text" id="txtbooking_interteam" /></td>
    <td  align="left"> WWAShipmentReference</td>
    <td align="left"><input name="txtWWAShipmentReference" type="text" id="txtWWAShipmentReference" /></td>
  </tr>
  <tr>
    <td colspan="5">&nbsp;&nbsp;</td>
  </tr>
  <tr>
    <td  align="left"> Communication Reference </td>
    <td colspan="2" align="left"><input name="txtcommunication_reference" type="text" id="txtcommunication_reference" onblur="com_ref_ajax(this.value)" /></td>
    <td  align="left"> Receiver Id</td>
    <td align="left"><input name="txtReceiverID" type="text" id="txtReceiverID" readonly="readonly" /></td>
  </tr>
  <tr>
    <td  align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td  align="left">Customer Reference</td>
    <td colspan="2" align="left"><input name="txtcustomer_reference" type="text" id="txtcustomer_reference" readonly="readonly" /></td>
    <td align="left">Password</td>
    <td align="left"><input name="txtPassword_wwa" type="text" id="txtPassword_wwa" readonly="readonly" /></td>
  </tr>
  <tr>
    <td  align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td  align="left">Customer Email</td>
    <td colspan="2" align="left"><input name="txtcustomer_email" type="text" id="txtcustomer_email" /></td>
    <td align="left">BUCustomer Email</td>
    <td align="left"><input name="txtBUcustomer_email" type="text" id="txtBUcustomer_email" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Customer Nick Name</td>
    <td colspan="2" align="left"><input name="txtcustomer_nick_name" readonly="readonly" type="text" id="txtcustomer_nick_name" /></td>
    <td align="left">Customer</td>
    <td align="left"><input name="txtcustomer" type="text" id="txtcustomer" />
      <input type="button" style="background-image:url(../../images/buscar.png); background-repeat:no-repeat; background-position:right; background-color:#D6D6D6" 
        onclick='dhtmlwindow.open("ClientesBox", &quot;iframe&quot;, &quot;customers/searchcustomer.php&quot;, &quot;Search Customer&quot;, 
&quot;width=950px,height=600px,resize=1,scrolling=1,center=1&quot;, &quot;recal&quot;)'
          value="Search     " />
      
      <!--
       
        <!--<!--onClick="abreVentana('customers/searchcustomer.php')"--></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Customer 
      
      Fax</td>
    <td colspan="2" align="left"><input name="txtcustomerfax" type="text" id="txtcustomerfax" /></td>
    <td align="left">Customer 
      
      Tel</td>
    <td align="left"><input name="txtcustomertel" type="text" id="txtcustomertel" /></td>
  </tr>
  <tr>
    <td >&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td  >&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Customer 
      
      Email</td>
    <td colspan="2" align="left"><input name="txtcustomeremail" type="text" id="txtcustomeremail" /></td>
    <td  align="left">Customer 
      
      Contact</td>
    <td align="left"><input name="txtcustomercontact" type="text" id="txtcustomercontact" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Final 
      
      Destination</td>
    <td colspan="2" align="left"><input name="txtfinaldestination_booking" type="text" id="txtfinaldestination_booking" /></td>
    <td align="left">Place 
      
      of Acceptance</td>
    <td align="left"><input name="txtplaceofdelivery" type="text" id="txtplaceofdelivery" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Incoterms</td>
    <td colspan="2" align="left"><select name="txtincoterms" id="txtincoterms" class="aa">
      <?php

		$authors = mysqli_query("SELECT * FROM incoterms order by incoterms");

		  while ($author = mysqli_fetch_array($authors)) {

    $aid = $author["incoterms"];

    $aname = htmlspecialchars($author["incoterms"]);

    echo("<option value=\"$aid\">$aname</option>\n"); 			

		  }

		    printf ("<option value=\"%s\" selected>%s</option>",$txtincoterms,$txtincoterms) ;

		?>
    </select></td>
    <td align="left">ETA 
      
      Final Destination (yyyy/mm/dd)</td>
    <td align="left"><input name="txtetafinaldest" type="text" id="txtetafinaldest" size="12" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Transport 
      
      Tel</td>
    <td colspan="2" align="left"><input name="txttransporttel" type="text" id="txttransporttel" /></td>
    <td align="left">Transport 
      
      Company</td>
    <td align="left"><input name="txttransportcompany" type="text" id="txttransportcompany" />
      <input type="button" style="background-image:url(../../images/buscar.png); background-repeat:no-repeat; background-position:right; background-color:#D6D6D6" 
        onclick='dhtmlwindow.open("TransportCompaniesBox","iframe", "transportcompanies/transportcompanyexpint.php","Transport Company Maintenance", 
"width=950px,height=600px,resize=1,scrolling=1,center=1","recal")'
          value="Search     " />
      <!--onClick="abreVentana('searchtransportcompany.php')"--></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Tansport 
      
      Contact</td>
    <td colspan="2" align="left"><input name="txttransportcontact" type="text" id="txttransportcontact" /></td>
    <td align="left">Transport 
      
      Fax</td>
    <td align="left"><input name="txttransportfax" type="text" id="txttransportfax" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Tansport Comments</td>
    <td colspan="2" align="left"><input name="txttransport_comments" type="text" id="txttransport_comments" /></td>
    <td align="left">Transport Email</td>
    <td align="left"><input name="txttransportemail" type="text" id="txttransportemail" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Pick up Date (yyyy/mm/dd)</td>
    <td colspan="2" align="left"><input name="txtpickupdate" type="text" id="txtpickupdate" size="12" /></td>
    <td align="left">Pick up Address</td>
    <td align="left"><input name="txtpickupaddres" type="text" id="txtpickupaddres" />
      <input type="button" style="background-image:url(../../images/buscar.png); background-repeat:no-repeat; background-position:right; background-color:#D6D6D6" 
        onclick='dhtmlwindow.open("PickUpBox", &quot;iframe&quot;, &quot;pick_up_address/searchcustomerpickup2.php&quot;, &quot;Search Pick Up Address&quot;, 
&quot;width=950px,height=600px,resize=1,scrolling=1,center=1&quot;, &quot;recal&quot;)'
          value="Search     " />
 </td>
  </tr>
  <tr>
    <td align="left" >&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" >Pick 
      
      up Contact</td>
    <td colspan="2" align="left"><input name="txtpick_up_contact" type="text" id="txtpick_up_contact" /></td>
    <td align="left">Pick up Telephone</td>
    <td align="left"><input name="txtpick_up_telephone" type="text" id="txtpick_up_telephone" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td >&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Pick 
      
      up Time</td>
    <td colspan="2" align="left"><input name="txtpickuptime" type="text" id="txtpickuptime" /></td>
    <td >&nbsp;</td>
    <td align="left"><input name="txtport_cto" type="hidden" id="txtport_cto" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left" >&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left"> Pick Up Fee</td>
    <td colspan="2" align="left"><input name="txtpick_up_fee" type="text" id="txtpick_up_fee" /></td>
    <td align="left" >*Pick 
      
      up Fee</td>
    <td align="left"><input name="txtpick_up_fee2" type="text" id="txtpick_up_fee2" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">*Pick up Fee</td>
    <td colspan="2" align="left"><input name="txtpick_up_fee3" type="text" id="txtpick_up_fee3" /></td>
    <td align="left">Pick up Comments</td>
    <td align="left"><input name="txtpick_up_comments" type="text" id="txtpick_up_comments" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Departure Date CFS (yyyy/mm/dd)</td>
    <td colspan="2" align="left"><input name="txtdeparture_date_cfs" type="text" id="txtdeparture_date_cfs" /></td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td >&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Customs Agent</td>
    <td colspan="2" align="left"><input name="txtcustomsagent" type="text" id="txtcustomsagent" />
      <input type="button" style="background-image:url(../../images/buscar.png); background-repeat:no-repeat; background-position:right; background-color:#D6D6D6" 
        onclick='dhtmlwindow.open("customsagentsBox","iframe","customsagents/customsagentexpint.php", "Customs Agent Maintenance", 
&quot;width=950px,height=600px,resize=1,scrolling=1,center=1&quot;, &quot;recal&quot;)'
          value="Search     " />
     
      <!--onClick="abreVentana('searchcustomsagent.php')"--></td>
    <td >&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Customs 
      
      Tel</td>
    <td colspan="2" align="left"><input name="txtcustomstel" type="text" id="txtcustomstel" /></td>
    <td align="left">Customs 
      
      Fax</td>
    <td align="left"><input name="txtcustomsfax" type="text" id="txtcustomsfax" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Customs 
      
      Contact</td>
    <td colspan="2" align="left"><input name="txtcustomscontact" type="text" id="txtcustomscontact" /></td>
    <td align="left">Customs 
      
      Email</td>
    <td align="left"><input name="txtcustomsemail" type="text" id="txtcustomsemail" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Comment 
      
      Booking</td>
    <td colspan="2" align="left"><input name="txtcommentbooking" type="text" id="txtcommentbooking" /></td>
    <td align="left">Blind 
      
      Comment Booking</td>
    <td align="left"><input name="txtblindcommentbooking" type="text" id="txtblindcommentbooking" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Ocean 
      
      Freight Terms</td>
    <td colspan="2" align="left"><input name="txtoceanfreightterms" type="text" id="txtoceanfreightterms" /></td>
    <td align="left">Inland 
      
      Freight Terms</td>
    <td align="left"><input name="txtinlandfreightterms" type="text" id="txtinlandfreightterms" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td >&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Issue 
      
      HBL:</td>
    <td colspan="2" align="left"><select name="txtissue_hbl_booking" id="txtissue_hbl_booking" class="aa">
      <option value="ORIGIN">ORIGIN</option>
      <option value="DESTINATION">DESTINATION</option>
    </select></td>
    <td nowrap="nowrap" >Forwarder Reference<br />
      No Forwarder&nbsp;
      <input name="chk_no_forwarder" id="chk_no_forwarder" type="checkbox" value="" 
      onclick="if(this.checked){
      document.getElementById('txtforwarder_reference').value='Not provided';
      }else{
      document.getElementById('txtforwarder_reference').value='';
      }" />
    </td>
    <td>
      <input name="txtforwarder_reference" type="text" id="txtforwarder_reference" value="<? echo"$txtforwarder_reference"?>" />
    </td>
    </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td >&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td colspan="4" align="left"><input type="button" value="Save New Booking"  onclick="if(validabook()) { loadin('','svn_bkg','Wait: saving');create_booking();}" />
      <input type="button" value="Save Changes"  onclick="if(validabook()) { loadin('','svn_bkg','Wait: saving');save_changes_booking();}" />
      
        <span id="svn_bkg" style="color:#F00"></span>   
        
      </td>
    <td>&nbsp;</td>
  </tr>
    </table>

    </td></tr>
    
    
    <tr>
      <td colspan="5" align="left">&nbsp;</td>
    </tr>
    <tr><td colspan="5" align="left">&nbsp;&nbsp;
      <div id="tracking_info"></div></td></tr>
    
    <tr>
      <td colspan="5" align="left" style="font-family:Eurostile, EurostileDCDBol; font-size:14px">
        
        
      </td>
    </tr>
    
    
    <tr>
      
      <td colspan="5" align="left" style="font-family:Eurostile, EurostileDCDBol; font-size:14px"><B>TRACK &amp; TRACE &raquo; </B><br /></td>
      
    </tr>
    
  <tr><td colspan="5" align="left">&nbsp;&nbsp;</td></tr>    
    
  <tr>
    <td colspan="5" align="left"><? include("anclas.php");?></td></tr>
    
    
  <tr>
    <td colspan="5" align="left">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="5" align="left">
    <span style="font-family:Eurostile, EurostileDCDBol; font-size:14px"><B>SAILING CONFIRMATION</B></span>
    <BR /></td>
  </tr>
  <tr><td colspan="5" align="left">&nbsp;&nbsp;</td></tr>
    
    
    <tr>
      <td colspan="5" align="left"><table width="961" border="1">
        <tr>
          <td width="107">Booking</td>
          <td width="159"><input name="txtbooking_tt" type="text" id="txtbooking_tt" readonly="readonly" /></td>
          <td width="156">HBL</td>
          <td width="145"><input name="txthbl_tt" type="text" id="txthbl_tt"  readonly="readonly"/></td>
          <td width="120">Ref. Customer</td>
          <td width="144"><input name="txtrefcustomer_tt" type="text" id="txtrefcustomer_tt" /></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Vessel</td>
          <td><input name="txtvessel_tt" type="text" id="txtvessel_tt"  readonly="readonly"/></td>
          <td>Voyage</td>
          <td><input name="txtvoyage_tt" type="text" id="txtvoyage_tt"  readonly="readonly"/></td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>Port of Loading</td>
          <td><input name="txtport_of_loading_tt"  readonly="readonly" type="text" id="txtport_of_loading_tt" /></td>
          <td>Actual time of departure</td>
          <td><input name="txtactual_time_of_departure_tt"  readonly="readonly" type="text" id="txtactual_time_of_departure_tt" /></td>
          <td align="left">Received at warehouse (yyyy/mm/dd)</td>
          <td align="left"><input name="txteta_port" type="text" id="txteta_port" /></td>
          </tr>
      </table></td>
    </tr>
    <tr>
      <td colspan="5" align="left">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="5" align="left">
      <span style="font-family:Eurostile, EurostileDCDBol; font-size:14px"><B>ARRIVAL CONFIRMATION</B></span>
    <BR /></td>
    </tr>
    
    <tr>
      <td colspan="5">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="5"><table width="961" border="1">
        <tr>
          <td width="131"><div align="left">Port of Discharge</div></td>
          <td width="163"><div align="left">
            <input name="txtport_of_discharge_tt"  readonly="readonly" type="text" id="txtport_of_discharge_tt" />
          </div></td>
          <td width="172"><div align="left">ATA Pod</div></td>
          <td width="160"><div align="left">
            <input name="txtata_pod_tt" type="text"  readonly="readonly" id="txtata_pod_tt" />
          </div></td>
          <td width="133"><div align="left"></div></td>
          <td width="162"><div align="left"></div></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
        </tr>
        <tr>
          <td><div align="left">Devanning Place</div></td>
          <td><div align="left">
            <input name="txtdevanning_place_tt" type="text"  readonly="readonly" id="txtdevanning_place_tt" />
          </div></td>
          <td><div align="left">ATA Devanning Place</div></td>
          <td><div align="left">
            <input name="txtata_devanning_place_tt"  readonly="readonly" type="text" id="txtata_devanning_place_tt" />
          </div></td>
          <td><div align="left">Devanning Date</div></td>
          <td><div align="left">
            <input name="txtdevanning_date_tt"  readonly="readonly" type="text" id="txtdevanning_date_tt" />
          </div></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
        </tr>
        <tr>
          <td><div align="left">Actual Transit Time</div></td>
          <td><div align="left">
            <input name="txtactual_transit_time_tt"  readonly="readonly" type="text" id="txtactual_transit_time_tt" />
          </div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td width="190">&nbsp;</td>
      <td width="182" colspan="2">&nbsp;</td>
      <td width="173">&nbsp;</td>
      <td width="197">&nbsp;</td>
    </tr>
     <tr>
      <td colspan="5" align="left">
      <span style="font-family:Eurostile, EurostileDCDBol; font-size:14px"><B>TRANSHIPMENT REPORT (1ST LEG)</B></span><BR />
    
      </td>
    </tr>
    <tr>
       <td colspan="5">&nbsp;</td>
    </tr>
    <tr>
       <td colspan="5"><table width="1075" border="1">
         <tr>
           <td><div align="left">Port of Loading / Place of Carriage</div></td>
           <td><div align="left">
             <input name="txtplace_of_carriage1" type="text" id="txtplace_of_carriage1" />
           </div></td>
           <td width="141"><div align="left"></div></td>
           <td width="157">&nbsp;</td>
           <td width="121"><div align="left"></div></td>
           <td width="235"><div align="left"></div></td>
         </tr>
         <tr>
           <td width="230">&nbsp;</td>
           <td width="151">&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
         </tr>
         <tr>
           <td><div align="left">Estimated time of Sailing</div></td>
           <td><div align="left">
             <input name="txtestimated_time_of_sailing1" type="text" id="txtestimated_time_of_sailing1" />
           </div></td>
           <td><div align="left">Actual time of Sailing</div></td>
           <td><div align="left">
             <input name="txtactual_time_of_sailing1" type="text" id="txtactual_time_of_sailing1" />
           </div></td>
           <td><div align="left"></div></td>
           <td><div align="left"></div></td>
         </tr>
         <tr>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
         </tr>
         <tr>
           <td><div align="left">Transhipment Vessel</div></td>
           <td><div align="left">
             <input name="txttranshipment_vessel1" type="text" id="txttranshipment_vessel1" />
           </div></td>
           <td><div align="left">Voyage</div></td>
           <td><div align="left">
             <input name="txtvoyage1" type="text" id="txtvoyage1" />
           </div></td>
           <td><div align="left">Container Number</div></td>
           <td><div align="left">
             <input name="txtcontainer_no1" type="text" id="txtcontainer_no1" />
           </div></td>
         </tr>
         <tr>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
         </tr>
         <tr>
           <td><div align="left">Motor</div></td>
           <td><div align="left">
             <input name="txtmotor1" type="text" id="txtmotor1" />
           </div></td>
           <td><div align="left">Plate</div></td>
           <td><div align="left">
             <input name="txtplate1" type="text" id="txtplate1" />
           </div></td>
           <td><div align="left"></div></td>
           <td><div align="left"></div></td>
         </tr>
         <tr>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
         </tr>
         <tr>
           <td><div align="left">Port of Discharge</div>             <div align="left"></div></td>
           <td><div align="left">
             <input name="txtport_of_discharge1" type="text" id="txtport_of_discharge1" />
           </div></td>
           <td> <div align="left">Place of Delivery</div></td>
           <td><div align="left">
             <input name="txtplace_of_delivery1" type="text" id="txtplace_of_delivery1" />
           </div></td>
           <td>&nbsp;</td>
           <td><div align="left"></div></td>
         </tr>
         <tr>
           <td colspan="2">&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
           <td>&nbsp;</td>
         </tr>
         <tr>
           <td><div align="left">Estimated time of Arrival</div></td>
           <td><div align="left">
             <input name="txtestimated_time_of_arrival1" type="text" id="txtestimated_time_of_arrival1" />
           </div></td>
           <td><div align="left">Actual time of Arrival</div></td>
           <td><div align="left">
             <input name="txtactual_time_of_arrival1" type="text" id="txtactual_time_of_arrival1" />
           </div></td>
           <td><div align="left">Actual Transit Time</div></td>
           <td><div align="left">
             <input name="txtactual_transit_time1" type="text" id="txtactual_transit_time1" />
           </div></td>
         </tr>
       </table></td>
    </tr>
    <tr>
      <td colspan="5">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="5" align="left">
      <span style="font-family:Eurostile, EurostileDCDBol; font-size:14px"><B>TRANSHIPMENT REPORT (2ND LEG)</B></span><BR /></td>
    </tr>
    <tr>
      <td colspan="5">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="5"><table width="1075" border="1">
        <tr>
          <td><div align="left">Port of Loading / Place of Carriage</div></td>
          <td><div align="left">
            <input name="txtplace_of_carriage2" type="text" id="txtplace_of_carriage2" />
          </div></td>
          <td width="141"><div align="left"></div></td>
          <td width="157">&nbsp;</td>
          <td width="121"><div align="left"></div></td>
          <td width="235"><div align="left"></div></td>
        </tr>
        <tr>
          <td width="230">&nbsp;</td>
          <td width="151">&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left">Estimated time of Sailing</div></td>
          <td><div align="left">
            <input name="txtestimated_time_of_sailing2" type="text" id="txtestimated_time_of_sailing2" />
          </div></td>
          <td><div align="left">Actual time of Sailing</div></td>
          <td><div align="left">
            <input name="txtactual_time_of_sailing2" type="text" id="txtactual_time_of_sailing2" />
          </div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left">Transhipment Vessel</div></td>
          <td><div align="left">
            <input name="txttranshipment_vessel2" type="text" id="txttranshipment_vessel2" />
          </div></td>
          <td><div align="left">Voyage</div></td>
          <td><div align="left">
            <input name="txtvoyage2" type="text" id="txtvoyage2" />
          </div></td>
          <td><div align="left">Container Number</div></td>
          <td><div align="left">
            <input name="txtcontainer_no2" type="text" id="txtcontainer_no2" />
          </div></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left">Motor</div></td>
          <td><div align="left">
            <input name="txtmotor2" type="text" id="txtmotor2" />
          </div></td>
          <td><div align="left">Plate</div></td>
          <td><div align="left">
            <input name="txtplate2" type="text" id="txtplate2" />
          </div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left">Port of Discharge</div>
            <div align="left"></div></td>
          <td><div align="left">
            <input name="txtport_of_discharge2" type="text" id="txtport_of_discharge2" />
          </div></td>
          <td><div align="left">Place of Delivery</div></td>
          <td><div align="left">
            <input name="txtplace_of_delivery2" type="text" id="txtplace_of_delivery2" />
          </div></td>
          <td>&nbsp;</td>
          <td><div align="left"></div></td>
        </tr>
        <tr>
          <td colspan="2">&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left">Estimated time of Arrival</div></td>
          <td><div align="left">
            <input name="txtestimated_time_of_arrival2" type="text" id="txtestimated_time_of_arrival2" />
          </div></td>
          <td><div align="left">Actual time of Arrival</div></td>
          <td><div align="left">
            <input name="txtactual_time_of_arrival2" type="text" id="txtactual_time_of_arrival2" />
          </div></td>
          <td><div align="left">Actual Transit Time</div></td>
          <td><div align="left">
            <input name="txtactual_transit_time2" type="text" id="txtactual_transit_time2" />
          </div></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td colspan="5">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="5" align="left">
      <span style="font-family:Eurostile, EurostileDCDBol; font-size:14px"><B>TRANSHIPMENT REPORT (3RD LEG)</B></span><BR /></td>
    </tr>
    <tr>
      <td colspan="5">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="5"><table width="1075" border="1">
        <tr>
          <td><div align="left">Port of Loading / Place of Carriage</div></td>
          <td><div align="left">
            <input name="txtplace_of_carriage3" type="text" id="txtplace_of_carriage3" />
          </div></td>
          <td width="141"><div align="left"></div></td>
          <td width="157">&nbsp;</td>
          <td width="121"><div align="left"></div></td>
          <td width="235"><div align="left"></div></td>
        </tr>
        <tr>
          <td width="230">&nbsp;</td>
          <td width="151">&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left">Estimated time of Sailing</div></td>
          <td><div align="left">
            <input name="txtestimated_time_of_sailing3" type="text" id="txtestimated_time_of_sailing3" />
          </div></td>
          <td><div align="left">Actual time of Sailing</div></td>
          <td><div align="left">
            <input name="txtactual_time_of_sailing3" type="text" id="txtactual_time_of_sailing3" />
          </div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left">Transhipment Vessel</div></td>
          <td><div align="left">
            <input name="txttranshipment_vessel3" type="text" id="txttranshipment_vessel3" />
          </div></td>
          <td><div align="left">Voyage</div></td>
          <td><div align="left">
            <input name="txtvoyage3" type="text" id="txtvoyage3" />
          </div></td>
          <td><div align="left">Container Number</div></td>
          <td><div align="left">
            <input name="txtcontainer_no3" type="text" id="txtcontainer_no3" />
          </div></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left">Motor</div></td>
          <td><div align="left">
            <input name="txtmotor3" type="text" id="txtmotor3" />
          </div></td>
          <td><div align="left">Plate</div></td>
          <td><div align="left">
            <input name="txtplate3" type="text" id="txtplate3" />
          </div></td>
          <td><div align="left"></div></td>
          <td><div align="left"></div></td>
        </tr>
        <tr>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left">Port of Discharge</div>
            <div align="left"></div></td>
          <td><div align="left">
            <input name="txtport_of_discharge3" type="text" id="txtport_of_discharge3" />
          </div></td>
          <td><div align="left">Place of Delivery</div></td>
          <td><div align="left">
            <input name="txtplace_of_delivery3" type="text" id="txtplace_of_delivery3" />
          </div></td>
          <td>&nbsp;</td>
          <td><div align="left"></div></td>
        </tr>
        <tr>
          <td colspan="2">&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><div align="left">Estimated time of Arrival</div></td>
          <td><div align="left">
            <input name="txtestimated_time_of_arrival3" type="text" id="txtestimated_time_of_arrival3" />
          </div></td>
          <td><div align="left">Actual time of Arrival</div></td>
          <td><div align="left">
            <input name="txtactual_time_of_arrival3" type="text" id="txtactual_time_of_arrival3" />
          </div></td>
          <td><div align="left">Actual Transit Time</div></td>
          <td><div align="left">
            <input name="txtactual_transit_time3" type="text" id="txtactual_transit_time3" />
          </div></td>
        </tr>
      </table></td>
    </tr>
    <tr>
      <td colspan="5">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="5" align="left"><input type="button" value="Save Track & Trace" 
      onclick="if(document.getElementById('txtbooking_tt').value.length==0) {alert('Booking Interteam not selected');} else {save_track();}" />        &nbsp;
       <span id="saving_track" style="color:#F00"></span>
      </td>
    </tr>
    <tr>
      <td colspan="5">&nbsp;</td>
    </tr>
    <tr>
      <td colspan="5">
      </td>
      
    </tr>
    
    <tr>
      <td align="left" colspan="5"><div id="ams_despacho"></div></td>
    </tr>
    
    <tr>
      <td align="left" style="font-family:Eurostile, EurostileDCDBol; font-size:14px"><b>AMS - DESPACHO</b></td>
      <td colspan="2" align="left">&nbsp;</td>
      <td align="left">&nbsp;</td>
      <td align="left">&nbsp;</td>
    </tr>
    <tr>
      <td align="left">&nbsp;</td>
      <td colspan="2" align="left">&nbsp;</td>
      <td align="left">&nbsp;</td>
      <td align="left">&nbsp;</td>
    </tr>
    <tr>
      <td align="left" colspan="5">
        <? include("anclas.php");?>
      </td>
    </tr>
    <tr>
      <td align="left">&nbsp;</td>
      <td colspan="2" align="left">&nbsp;</td>
      <td align="left">&nbsp;</td>
      <td align="left">&nbsp;</td>
    </tr>
    
    <tr>
      <td colspan="5" align="left">
      <table width="776" border="1" align="left"  >
  <tr>
    <td align="left">Exporter</td>
    <td colspan="2" align="left"><input name="txtexporter" type="text" id="txtexporter" />
      <input name="Button52" type="button" onclick="abreVentana('searchexporter.php')" value="Search" /></td>
    <td align="left">Direccion</td>
    <td align="left"><input name="txtexportador_direccion" type="text" id="txtexportador_direccion" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">RFC</td>
    <td colspan="2" align="left"><input name="txtexportador_rfc" type="text" id="txtexportador_rfc" /></td>
    <td align="left">Telefono</td>
    <td align="left"><input name="txtexportador_telefono" type="text" id="txtexportador_telefono" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Fax</td>
    <td colspan="2" align="left"><input name="txtexportador_fax" type="text" id="txtexportador_fax" /></td>
    <td align="left">Contacto</td>
    <td align="left"><input name="txtexportador_contacto" type="text" id="txtexportador_contacto" /></td>
  </tr>
  <tr>
    <td nowrap="nowrap" >&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td nowrap="nowrap" >&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Importer 
      
      - Consignee </td>
    <td colspan="2" align="left"><input name="txtimporter" type="text" id="txtimporter" />
      <input name="Button5" type="button" onclick="abreVentana('bconsignatarios_expobook.php')" value="Search" /></td>
    <td align="left">Direccion</td>
    <td align="left"><input name="txtconsignee_direccion" type="text" id="txtconsignee_direccion" /></td>
  </tr>
  <tr>
    <td align="left" >&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left" >TAX 
      
      ID</td>
    <td colspan="2" align="left"><input name="txtconsignee_tax_id" type="text" id="txtconsignee_tax_id" /></td>
    <td align="left">Telefono</td>
    <td align="left"><input name="txtconsignee_telefono" type="text" id="txtconsignee_telefono" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Fax</td>
    <td colspan="2" align="left"><input name="txtconsignee_fax" type="text" id="txtconsignee_fax" /></td>
    <td align="left">Contacto</td>
    <td align="left"><input name="txtconsignee_contacto" type="text" id="txtconsignee_contacto" /></td>
  </tr>
  <tr>
    <td >&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left" >Comprador</td>
    <td colspan="2" align="left"><input name="txtcomprador" type="text" id="txtcomprador" />
      <input name="Button7" type="button" onclick="abreVentana('bcomprador_expobook.php')" value="Search" /></td>
    <td align="left">Direccion</td>
    <td align="left"><input name="txtcomprador_direccion" type="text" id="txtcomprador_direccion" /></td>
  </tr>
  <tr>
    <td >&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td bgcolor="#00E1A9">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left">TAX 
      
      ID</td>
    <td colspan="2" align="left"><input name="txtcomprador_tax_id" type="text" id="txtcomprador_tax_id" /></td>
    <td align="left">Telefono</td>
    <td align="left"><input name="txtcomprador_telefono" type="text" id="txtcomprador_telefono" /></td>
  </tr>
  <tr>
    <td >&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td bgcolor="#00E1A9" >&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Fax</td>
    <td colspan="2" align="left"><input name="txtcomprador_fax" type="text" id="txtcomprador_fax" /></td>
    <td align="left" >Contacto</td>
    <td align="left"><input name="txtcomprador_contacto" type="text" id="txtcomprador_contacto" /></td>
  </tr>
  <tr>
    <td >&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left">SCAC 
      
      Code</td>
    <td colspan="2" align="left"><input name="txtscaccode" type="text" id="txtscaccode" /></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td >&nbsp;</td>
    <td colspan="2">&nbsp;</td>
    <td  bgcolor="#00E1A9" >&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Customs 
      
      Tariff Code</td>
    <td colspan="2" align="left"><input name="txtcustomstariffcode" type="text" id="txtcustomstariffcode3" /></td>
    <td align="left">Regimen 
      
      de exportacion</td>
    <td align="left"><input name="txtregimen_de_exportacion" type="text" id="txtregimen_de_exportacion" /></td>
  </tr>
  <tr>
    <td colspan="5" nowrap="nowrap" >&nbsp;</td>
  </tr>
  <tr>
    <td colspan="5" align="left" style="font-family:Eurostile, EurostileDCDBol; font-size:14px">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="5" align="left" style="font-family:Eurostile, EurostileDCDBol; font-size:14px"><strong>DESPACHO</strong></td>
  </tr>
  <tr>
    <td colspan="5" nowrap="nowrap" >&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Factura 
      
      Comercial</td>
    <td colspan="2" align="left"><input name="txtfactura_comercial_da" type="text" id="txtfactura_comercial_da" /></td>
    <td align="left">Fecha 
      
      Factura</td>
    <td align="left"><input name="txtfecha_factura_da" type="text" id="txtfecha_factura_da" /></td>
  </tr>
  <tr>
    <td colspan="5" >&nbsp;&nbsp;</td>
  </tr>
  <tr>
    <td align="left">Valor 
      
      Comercial ( Espeficar Moneda)</td>
    <td colspan="2" align="left"><input name="txtvalor_comercial_da" type="text" id="txtvalor_comercial_da" /></td>
    <td align="left">Valor 
      
      Agregado (Obligatorio)</td>
    <td align="left"><input name="txtvalor_agregado_da" type="text" id="txtvalor_agregado_da" /></td>
  </tr>
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <tr>
    <td align="left"><input type="button" value="Save Despacho" onclick="save_despacho()"/></td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  
  <tr>
    <td align="left">&nbsp;</td>
    <td colspan="2" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
</table>

      
      </td>
    </tr>
  </table>
  
</form>


