function Imprimir (DivId)
{
	var NavName = navigator.appName;
	var NavVer = parseFloat(navigator.appVersion);
	
	var Informe = document.getElementById(DivId).innerHTML;
	
	WinInforme = window.open("/librerias/imprimir/Print.php","WinInforme","width=500");
	WinInforme.document.open();
	WinInforme.document.write ('<html>\n<head><link href="/styles/estilos.css" rel="stylesheet" type="text/css" /></head>\n<body><div id="Informe">\n<img src="/librerias/imprimir/InformeDeuda.jpg" width="482" height="60" /><hr>' + Informe + '\n</div></body>\n</html>');
	WinInforme.document.close();
	WinInforme.print();
	WinInforme.close();
	
}

function VaciarCampo (Campo)
{
	Campo.value = "";
}

function VerCampoVacio()
{
	var txtQuery = document.getElementById("txtQuery");
	var btnBusqueda = document.getElementById("btnBusqueda");
	
	if(txtQuery.value == "Ingrese su busqueda")
	{
		btnBusqueda.disabled= true;
	}
	else
	{
		btnBusqueda.disabled=false;
	}
}

function BoxEnable ()
{
	var IsCheck = document.getElementById("ChkCuotas").checked;
	if (IsCheck == true)
	{	
		var SelCuotas = document.getElementById("SelCuotas");
		SelCuotas.disabled = false;
	}
	else
	{
		var SelCuotas = document.getElementById("SelCuotas");
		SelCuotas.disabled = true;
	}
}

function getCode ()
{
document.getElementById("CodSeg").src = 'librerias/libcode/Code.php?sid=' + Math.random();
}

function LongitudMaxima (Longitud, DOMElement)
{
    if (DOMElement.value.length > Longitud)
    {
           DOMElement.value = DOMElement.value.substr(0,Longitud);
    }    
}

function show_hide_div(element_id)
{

	div_element = document.getElementById(element_id);

	if (div_element.style.display == 'none' || div_element.style.display == '')
	{
		
		div_element.style.display = 'block';
	}
	else
	{
		div_element.style.display = 'none';
	}
}

function show_popup (title,img_path,rel)
{
	SexyLightbox.show(title,img_path,rel); 
}



