// JavaScript Document
over = 0;
function $(id) { return document.getElementById(id); }
function ov(obj) { obj.style.backgroundColor='#DDD'; over=1; }
function ou() { over=0; setTimeout("outime();",800); }
function oo(obj) { obj.style.backgroundColor=''; over=0; setTimeout("outime();",800); }
function oo2() { over=1; }
function outime() { if(!over) $('lemur').style.display='none'; }
function st(awb,obj) { $('preawb').value=awb; $('cmp').value=obj.innerHTML; $('lemur').style.display='none'; $('selecawb').innerHTML = obj.innerHTML; }
function msg() { $('lemur').style.display='none'; alert("Esta Compañia Aérea no dispone de Tracking"); }
function showpaquets (cant) 
{
	cant = parseInt(cant);
	$("paquets").innerHTML = "";
	var code = "";
	code += '<table class="pac"><tr>';
	code += '<th>Cantidad</th>';
	code += '<th>Largo</th>';
	code += '<th>Ancho</th>';
	code += '<th>Alto</th>';
	code += '<th>Volumen</th>';
	code += '</tr></table>';
	i=0;
	while (i < cant)
	{
		code += '<table class="pac"><tr>';
		code += '<td><input type="text" size="5" name="pac'+i+'_cantidad" maxlength="5" /></td>';
		code += '<td><input type="text" size="5" name="pac'+i+'_largo" maxlength="5" /></td>';
        code += '<td><input type="text" size="5" name="pac'+i+'_ancho" maxlength="5" /></td>';
        code += '<td><input type="text" size="5" name="pac'+i+'_alto" maxlength="5" /></td>';
        code += '<td><input type="text" size="5" name="pac'+i+'_volumen" maxlength="5" /></td>';
        code += '</tr></table>';
		i++;
	}
	$("paquets").innerHTML = code;
}
function addbulto()
{
	var div = document.createElement("div");
	code = '<table class="pac"><tr>';
	code += '<td><input type="text" size="5" name="pac'+i+'_cantidad" maxlength="5" /></td>';
	code += '<td><input type="text" size="5" name="pac'+i+'_largo" maxlength="5" /></td>';
	code += '<td><input type="text" size="5" name="pac'+i+'_ancho" maxlength="5" /></td>';
	code += '<td><input type="text" size="5" name="pac'+i+'_alto" maxlength="5" /></td>';
	code += '<td><input type="text" size="5" name="pac'+i+'_volumen" maxlength="5" /></td>';
	code += '</tr></table>';
	div.innerHTML = code;
	i++;
	$("paquets").appendChild(div);
}
