linha_01 = "INATIVA";
linha_02 = "INATIVA";
linha_03 = "INATIVA";
var isNN = (navigator.appName.indexOf("Netscape")!=-1);
var x=1;
function le_sub(){
alert ("dfdfdf");
}
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode;
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}
function insere_tcl_01()
{
insRow_01();
}
function insere_tcl_02()
{
insRow_02();
}
function insere_tcl_03()
{
insRow_03();
}
function verif_estip(){
if (document.estipulante.apolice.value == "") {
alert ("Preencha o número da apólice!");
document.estipulante.apolice.focus();
}
esconde_tcl_01();
}
function insRow_01(){
esconde_tcl_01()
var Cell_cont = "";
var celLinha = document.getElementById("tabela01").insertRow();
var celTexto = celLinha.insertCell(0)
Cell_cont = Cell_cont + "
"
Cell_cont = Cell_cont + ""
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + "
"
Cell_cont = Cell_cont + ""
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + "
"
Cell_cont = Cell_cont + "
"
celTexto.innerHTML = Cell_cont;
linha_01 = "ATIVA"
}
function insRow_02(){
esconde_tcl_01()
var Cell_cont = "";
var celLinha = document.getElementById("tabela02").insertRow();
var celTexto = celLinha.insertCell(0)
Cell_cont = Cell_cont + ""
Cell_cont = Cell_cont + ""
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + "
"
Cell_cont = Cell_cont + ""
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + "
"
Cell_cont = Cell_cont + "
"
celTexto.innerHTML = Cell_cont;
linha_02 = "ATIVA"
}
function insRow_03(){
esconde_tcl_01()
var Cell_cont = "";
var celLinha = document.getElementById("tabela03").insertRow();
var celTexto = celLinha.insertCell(0)
Cell_cont = Cell_cont + ""
Cell_cont = Cell_cont + ""
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + "
"
Cell_cont = Cell_cont + ""
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + " | "
Cell_cont = Cell_cont + "
"
Cell_cont = Cell_cont + "
"
celTexto.innerHTML = Cell_cont;
linha_03 = "ATIVA"
}
function deleteMe(rowIndex){
if (linha_01 == "ATIVA"){
document.getElementById('tabela01').deleteRow(5);
linha_01 = "INATIVA";
}
if (linha_02 == "ATIVA"){
document.getElementById('tabela02').deleteRow(6);
linha_02 = "INATIVA";
}
if (linha_03 == "ATIVA"){
document.getElementById('tabela03').deleteRow(4);
linha_03 = "INATIVA";
}
}
function insere_val(campo,valor){
if (campo == 1){
document.segurado.senhaf.value = document.segurado.senhaf.value + valor
}
if (campo == 2){
document.estipulante.senha.value = document.estipulante.senha.value + valor
}
if (campo == 3){
document.prest_login.senhaf.value = document.prest_login.senhaf.value + valor
}
}
function esconde_tcl_01()
{
deleteMe(0);
}
function esconde_tcl_01_sub()
{
if (document.estipulante.apolice.value!=""){
document.estipulante.le_sub.value = "SIM";
document.estipulante.action = document.estipulante.destino_estip.value;
document.estipulante.submit();
}
}
function env_form()
{
document.estipulante.le_sub.value = "SIM";
document.estipulante.action = document.estipulante.destino_estip.value;
document.estipulante.submit();
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i