var am=250;
var tm=250;
var cont=0;
var asynchronous = new Asynchronous();
asynchronous.complete = function(responseText, id) {
	document.getElementById(id).innerHTML = responseText;
}

function load_content(url, id){
    var responseItem = document.getElementById(id)
	mostrarCapa(id,true);
    responseItem.innerHTML = '<img src="images/cargando.gif" align="absmiddle"/> Buscando composición del lote...';
    asynchronous.call(url, id)
}

function mostrarLote(idLote){
	load_content("get_lote.asp?id="+idLote+"","capa_lote"+idLote);
}

function mostrarCapa(id,mostrar){
	var capa = document.getElementById(id);
	if(mostrar){
		capa.style.visibility == "visible";
		capa.style.display = "block";
	}else{
		capa.style.visibility == "hidden"
		capa.style.display = "none";
	}
}

function toggleDisplay(divId) {
  var div = document.getElementById(divId);
  div.style.display = (div.style.display=="block" ? "none" : "block");
}

function toggleOcultar(divId) {
  var div = document.getElementById(divId);
  div.style.display = (div.style.display=="block" ? "none" : "none");
}

function NavRollOverMenu(oTd) {if (!oTd.contains(event.fromElement)) {oTd.bgColor="#345098";}}
function NavRollOutMenu(oTd) {if (!oTd.contains(event.toElement)) {oTd.bgColor="#1A398B";}}

function enviarBusc(){
	if(window.document.getElementsByName("texto_buscar").item(0).value.length>0){
		window.document.getElementsByName("formu_buscar").item(0).submit()
	}
}

function verNovedades(){
	window.document.getElementsByName("formu_novedad").item(0).submit();
}

function verLoMasVendido(){
	window.document.getElementsByName("formu_lomas").item(0).submit();
}

function salir(){
	window.parent.close();
}

function mostrar_pop(div)
{
document.getElementById(div).style.display='block';
return false
}
function ocultar_pop(div)
{
document.getElementById(div).style.display='none';
return false
}


