';
nImv = -1;
nItTb = 0;
for (i = 0; i < oJson.itens.length; i++) {
if (nImv != oJson.itens[i].imov) {
for (j = 0; j < oJson.imov.length; j++) {
if (oJson.imov[j].cod == oJson.itens[i].imov) {
break;
}
}
if (nImv != -1) {
cConteudo += "
";
/*
if (i > 0) {
oObj.innerHTML = cConteudo;
}
else {
*/
if (i < 1) {
//oObj.innerHTML = '
Nenhum boleto em aberto foi encontrado.';
cConteudo = '
Nenhum boleto em aberto foi encontrado.';
}
cConteudo += "
" +
'' +
'';
oObj.innerHTML = cConteudo;
}
else {
lRet = false;
}
return lRet;
}
function spaInqFechaPesquisa() {
document.getElementById("spa-inq-resultado").style.display = "none";
document.getElementById("spa-inq-login").style.display = "block";
document.getElementById("spa-inq-usuario").value = "";
document.getElementById("spa-inq-senha").value = "";
document.getElementById("spa-inq-usuario").focus();
}
function spaInqLinkOver(oObj) {
//oObj.style.color = "#0000CC";
oObj.style.cursor = "hand";
/*
* Um "hack" maluco necessário para o Firefox. Seria um bug ou uma feature?
* Curioso é que no IE, com ou sem esta linha, tudo funciona perfeitamente.
*/
oObj.style.cursor = "pointer";
}
function spaInqLinkOut(oObj) {
//oObj.style.color = "#000000";
oObj.style.cursor = "pointer";
}
function spaInqExibeBoleto(oObj) {
/*
* O Firefox só obedece width e height. A janela traz barra de endereço, statusbar e permite redimensionamento.
* Só é possível mudar este comportamento em about:config.
*/
cID = oObj.id;
cItem = cID.substring(cID.indexOf("_") + 1);
cURL = "spa_query.php?tp=13&id=" + document.getElementById("spa-inq-chave_" + cItem).value + "&sr=" + gcSpaSrInqPro +
"&us=" + gcSpaInqUsu + "&se=" + gcSpaInqSen;
window.open(cURL,"_blank","width=830,height=" + window.clientHeight + ",resizable=1,scrollbars=1,menubar=1,toolbar=1");
/*$lb.launch({ url: cURL, options: 'width:900 height:700 scrollbars:no showPrint:true ', title: '', description: '
Powered by: Spaic Sistemas' }); */
/*
// Usar IFrame
oIFrame = parent.document.createElement("iframe");
if (oIFrame) {
oIFrame.id = "frm_bol";
oIFrame.src = cURL;
cNav = navigator.userAgent;
lMSIE = (cNav.indexOf("MSIE") != -1);
if (lMSIE) {
oIFrame.id = "frm_bol_ie";
}
else {
oIFrame.style.position = "fixed";
oIFrame.style.top = "5px";
}
oIFrame.style.width = "800px";
oIFrame.style.height = "520px"; //"515px";
window.alert(top.availHeight);
oIFrame.style.left = "97px";
if (lMSIE) {
nCurScrollOffset = cumulativeScrollOffset(parent.document.getElementById("wrapper"));
oIFrame.style.top = nCurScrollOffset + 5;
window.alert(oIFrame.style.top);
}
oIFrame.style.padding = "0px";
oIFrame.style.border = "solid 4px #74653D";
oIFrame.frameBorder = "0";
oBody = parent.document.body;
oBody.appendChild(oIFrame);
}
*/
}
function spaInqFrmSen() {
oAjax = spaInqCriaAjax();
if (oAjax) {
cURL = "spa_query.php?tp=22&sr=" + gcSpaSrInqPro;
oAjax.open('GET',cURL,false);
oAjax.send(null);
if (oAjax.readyState == 4) {
if (oAjax.status == 200) {
oDiv = document.getElementById(gcSpaIDCtn);
oDiv.innerHTML = oAjax.responseText;
document.getElementById("spa-inq-usuario").focus();
cNav = navigator.userAgent;
lMSIE = (cNav.indexOf("MSIE") != -1);
if (lMSIE) {
document.getElementById("spa-inq-usuario").focus();
}
}
}
}
}
function spaInqAltSen() {
nStatus = 0;
oUsuario = document.getElementById("spa-inq-usuario");
oSenha = document.getElementById("spa-inq-senha");
oNovSen = document.getElementById("spa-inq-nov-sen");
oConfSen = document.getElementById("spa-inq-conf-sen");
if (oUsuario.value.length == 0 || oSenha.value.length == 0) {
nStatus = 1;
}
else if (oNovSen.value.length == 0 || oConfSen.value.length == 0) {
nStatus = 2;
}
else if (oNovSen.value != oConfSen.value) {
nStatus = 3;
}
if (nStatus == 0) {
oAjax = spaInqCriaAjax();
if (oAjax) {
cURL = "spa_query.php?tp=23&us=" + oUsuario.value + "&se=" + oSenha.value + "&sr=" + gcSpaSrInqPro +
"&nse=" + oNovSen.value;
oAjax.open('GET',cURL,false);
oAjax.send(null);
if (oAjax.readyState == 4) {
if (oAjax.status == 200) {
if (oAjax.responseText.indexOf("*NE*") != -1) {
nStatus = 4;
}
else if (oAjax.responseText.indexOf("*ER*") != -1) {
nStatus = 5;
}
else {
oDiv = document.getElementById(gcSpaIDCtn);
oDiv.innerHTML = oAjax.responseText;
}
}
}
}
}
switch (nStatus) {
/*
case 0:
gcSpaProUsu = oUsuario.value;
gcSpaProSen = oSenha.value;
document.getElementById("spa-pro-login").style.display = "none";
document.getElementById("spa-pro-resultado").style.display = "block";
break;
*/
case 1:
window.alert("Voc\u00EA deve informar o usu\u00E1rio e a senha atual.");
oUsuario.select();
oUsuario.focus();
break;
case 2:
window.alert("Voc\u00EA deve digitar a nova senha 2 vezes para confirm\u00E1-la.");
oNovSen.select();
oNovSen.focus();
break;
case 3:
window.alert("A nova senha digitada n\u00E3o confere com a confirma\u00E7\u00E3o.");
oNovSen.select();
oNovSen.focus();
break;
case 4:
window.alert("Usu\u00E1rio e/ou senha inv\u00E1lidos.");
oUsuario.select();
oUsuario.focus();
break;
case 5:
window.alert("Erro desconhecido. A senha n\u00E3o p\u00F4de ser alterada!");
oUsuario.select();
oUsuario.focus();
break;
}
}
function spaInqVoltSen() {
oAjax = spaInqCriaAjax();
if (oAjax) {
cURL = "spa_query.php?tp=11&sr=" + gcSpaSrInqPro;
oAjax.open('GET',cURL,false);
oAjax.send(null);
if (oAjax.readyState == 4) {
if (oAjax.status == 200) {
oDiv = document.getElementById(gcSpaIDCtn);
oDiv.innerHTML = oAjax.responseText;
document.getElementById("spa-inq-usuario").focus();
cNav = navigator.userAgent;
lMSIE = (cNav.indexOf("MSIE") != -1);
if (lMSIE) {
document.getElementById("spa-inq-usuario").focus();
}
}
}
}
}
function spaInqEsqSen() {
oAjax = spaInqCriaAjax();
if (oAjax) {
cURL = "spa_query.php?tp=24&sr=" + gcSpaSrInqPro;
oAjax.open('GET',cURL,false);
oAjax.send(null);
if (oAjax.readyState == 4) {
if (oAjax.status == 200) {
oDiv = document.getElementById(gcSpaIDCtn);
oDiv.innerHTML = oAjax.responseText;
}
}
}
}