//', ini); codigo = texto.substring(ini,fim); objScript.text = codigo; } document.body.appendChild(objScript); ini = texto.indexOf('0) { queryString += "&"; } queryString += encodeURIComponent(nome) + "=" + encodeURIComponent(valor); }; for (var i=0; i=0) { this.ConcatenaElemento(elemento.name,elemento.options[elemento.selectedIndex].value); } break; case 'select-multiple': for (var j=0; j -1) { page = page.substr(0, page.indexOf('&')); } if (Object.keys(replacement).length > 0) { for (var i in replacement) { if (replacement.hasOwnProperty(i) && page === i) { page = replacement[i]; } } } if (window.history.pushState) { window.history.pushState('', '', '/' + page); //window.alert(teste + div + tipo + campos + hideLoading); } requestPage(pagina,url, div, tipo, campos, hideLoading); } function ajaxLoader(url, div, tipo, campos) { var ajax = null; if(window.ActiveXObject) ajax = new ActiveXObject('Microsoft.XMLHTTP'); else if(window.XMLHttpRequest) ajax = new XMLHttpRequest(); if(ajax != null) { var cache = new Date().getTime(); ajax.open(tipo, url /*+ "&cache=" + cache*/ , true); ajax.onreadystatechange = function status() { if(ajax.readyState == 4) { if(ajax.status == 200) { document.getElementById(div).innerHTML = ajax.responseText; var texto=unescape(ajax.responseText); extraiScript(texto); } } else if(ajax.readyState == 0) document.getElementById(div).innerHTML = '
Carregando...
'; else if(ajax.readyState == 3) document.getElementById(div).innerHTML = '
Carregando...
'; else document.getElementById(div).innerHTML = '
Carregando...
'; } if(tipo == "POST"){ ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); ajax.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate"); ajax.setRequestHeader("Cache-Control", "post-check=0, pre-check=0"); ajax.setRequestHeader("Pragma", "no-cache"); ajax.send(campos); } else { ajax.send(null); } } } function gerar(url, div, tipo, campos) { var ajax = null; if(window.ActiveXObject) ajax = new ActiveXObject('Microsoft.XMLHTTP'); else if(window.XMLHttpRequest) ajax = new XMLHttpRequest(); if(ajax != null) { var cache = new Date().getTime(); ajax.open(tipo, url /*+ "&cache=" + cache*/ , true); ajax.onreadystatechange = function status() { if(ajax.readyState == 4) { if(ajax.status == 200) { document.getElementById(div).innerHTML = ajax.responseText; var texto=unescape(ajax.responseText); //extraiScript(texto); $("#gerarstatus").append(texto); } } else if(ajax.readyState == 0) document.getElementById(div).innerHTML = '
Carregando...
'; else if(ajax.readyState == 3) document.getElementById(div).innerHTML = '
Carregando...
'; else document.getElementById(div).innerHTML = '
Carregando...
'; } if(tipo == "POST"){ ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8"); ajax.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate"); ajax.setRequestHeader("Cache-Control", "post-check=0, pre-check=0"); ajax.setRequestHeader("Pragma", "no-cache"); ajax.send(campos); } else { ajax.send(null); } } } function makevisible(cur,which){ strength=(which==0)? 1 : 0.7 if (cur.style.MozOpacity) cur.style.MozOpacity=strength else if (cur.filters) cur.filters.alpha.opacity=strength*100 } function limparPadrao(campo) { if (campo.value == campo.defaultValue) { campo.value = ""; } } function escreverPadrao(campo) { if (campo.value == "") { campo.value = campo.defaultValue; } } function getRadioValue(strName) { var value = 0; for (var i = 0; i < document.getElementsByName(strName).length; i++) { if (document.getElementsByName(strName)[i].checked == true) { value = document.getElementsByName(strName)[i].value; break; } } return value; } function emptyInput(input) { if (input.value == input.defaultValue) { input.value = ""; } } function writeDefault(input) { if (input.value == "") { input.value = input.defaultValue; } } function str_split(string, split_length) { if (string === undefined || !string.toString || split_length < 1) { return false; } return string.toString().match(new RegExp('.{1,' + (split_length || '1') + '}', 'g')); } function carregarBanco(numero) { switch(numero) { case '1': document.getElementById('trBB').style.display = ''; document.getElementById('trCEF').style.display = 'none'; document.getElementById('trITAU').style.display = 'none'; document.getElementById('trBRAD').style.display = 'none'; document.getElementById('trLOTCXQ').style.display = 'none'; document.getElementById('trCCB').style.display = 'none'; document.getElementById('trHSBC').style.display = 'none'; document.getElementById('trSANTANDER').style.display = 'none'; break; case '2': document.getElementById('trBB').style.display = 'none'; document.getElementById('trCEF').style.display = ''; document.getElementById('trITAU').style.display = 'none'; document.getElementById('trBRAD').style.display = 'none'; document.getElementById('trLOTCXQ').style.display = 'none'; document.getElementById('trCCB').style.display = 'none'; document.getElementById('trHSBC').style.display = 'none'; document.getElementById('trSANTANDER').style.display = 'none'; break; case '3': document.getElementById('trBB').style.display = 'none'; document.getElementById('trCEF').style.display = 'none'; document.getElementById('trITAU').style.display = ''; document.getElementById('trBRAD').style.display = 'none'; document.getElementById('trLOTCXQ').style.display = 'none'; document.getElementById('trCCB').style.display = 'none'; document.getElementById('trHSBC').style.display = 'none'; document.getElementById('trSANTANDER').style.display = 'none'; break; case '4': document.getElementById('trBB').style.display = 'none'; document.getElementById('trCEF').style.display = 'none'; document.getElementById('trITAU').style.display = 'none'; document.getElementById('trBRAD').style.display = ''; document.getElementById('trLOTCXQ').style.display = 'none'; document.getElementById('trCCB').style.display = 'none'; document.getElementById('trHSBC').style.display = 'none'; document.getElementById('trSANTANDER').style.display = 'none'; break; case '5': document.getElementById('trBB').style.display = 'none'; document.getElementById('trCEF').style.display = 'none'; document.getElementById('trITAU').style.display = 'none'; document.getElementById('trBRAD').style.display = 'none'; document.getElementById('trLOTCXQ').style.display = ''; document.getElementById('trCCB').style.display = 'none'; document.getElementById('trHSBC').style.display = 'none'; document.getElementById('trSANTANDER').style.display = 'none'; break; case '6': document.getElementById('trBB').style.display = 'none'; document.getElementById('trCEF').style.display = 'none'; document.getElementById('trITAU').style.display = 'none'; document.getElementById('trBRAD').style.display = 'none'; document.getElementById('trLOTCXQ').style.display = 'none'; document.getElementById('trCCB').style.display = ''; document.getElementById('trHSBC').style.display = 'none'; document.getElementById('trSANTANDER').style.display = 'none'; break; case '10': document.getElementById('trBB').style.display = 'none'; document.getElementById('trCEF').style.display = 'none'; document.getElementById('trITAU').style.display = 'none'; document.getElementById('trBRAD').style.display = 'none'; document.getElementById('trLOTCXQ').style.display = 'none'; document.getElementById('trCCB').style.display = 'none'; document.getElementById('trHSBC').style.display = ''; document.getElementById('trSANTANDER').style.display = 'none'; break; case '11': document.getElementById('trBB').style.display = 'none'; document.getElementById('trCEF').style.display = 'none'; document.getElementById('trITAU').style.display = 'none'; document.getElementById('trBRAD').style.display = 'none'; document.getElementById('trLOTCXQ').style.display = 'none'; document.getElementById('trCCB').style.display = 'none'; document.getElementById('trHSBC').style.display = 'none'; document.getElementById('trSANTANDER').style.display = ''; break; } carregarOpcoes('trBB', '102030'); carregarOpcoes('trCEF', '102030'); carregarOpcoes('trITAU', '102030'); carregarOpcoes('trBRAD', '10203040506070'); carregarOpcoes('trLOTCXQ', '1020'); carregarOpcoes('trCCB', '1020'); carregarOpcoes('trHSBC', '102030'); carregarOpcoes('trSANTANDER', '1020304050'); document.getElementById("tipoDepositoBB").options[0].selected = "true"; document.getElementById("tipoDepositoCEF").options[0].selected = "true"; document.getElementById("tipoDepositoITAU").options[0].selected = "true"; document.getElementById("tipoDepositoBRAD").options[0].selected = "true"; document.getElementById("tipoDepositoLOTCXQ").options[0].selected = "true"; document.getElementById("tipoDepositoCCB").options[0].selected = "true"; document.getElementById("tipoDepositoHSBC").options[0].selected = "true"; document.getElementById("tipoDepositoSANTANDER").options[0].selected = "true"; } function carregarOpcoes(trBanco, campos) { var dumpCampos = new Array(); dumpCampos = str_split(campos); for(i = 0; i < campos.length; i+=2) { document.getElementById(trBanco+''+dumpCampos[i]).style.display = (dumpCampos[i+1] == 0 ? 'none' : '') } document.getElementById('tipoDepositoF').value = campos; }