function pngAlpha(objImagem,strW,strH) { if (document.all) {document.write("
"); } else {document.write(""); }}function pngVeiculos(objImagem,strW,strH) { if (document.all) {document.write("
"); } else {document.write(""); }}function limparForm(strForm) { eval("document." + strForm + ".reset()");}function inputOn(objInput, strCampo) { if (objInput.value == strCampo) {if (objInput.name == 'senha') {objInput.style.background = '#FFF';}objInput.value = ''; }}function inputOff(objInput, strCampo) { if (objInput.value == '') {if (objInput.name == 'senha') {objInput.style.background = 'url(../../img/bgr_inputsenha.gif) no-repeat';objInput.value = '';}else {objInput.value = strCampo;} }}function keyPress(e){ var keyNum; if(window.event) keyNum = window.event.keyCode; else if(e.keyCode) keyNum = e.keyCode; if ( (keyNum == 32) ||(keyNum == 33) ||(keyNum == 34) ||(keyNum == 35) ||(keyNum == 36) ||(keyNum == undefined) ) {return false; }}function alertar(strTit,strTxt,strBotoesPadrao) { objDivAlert = document.getElementById('divAlert'); objDivAlert.innerHTML = ''+strTit+'
'; intTop = (screen.availHeight-550)/2; intLeft = (document.body.offsetWidth-236)/2; if (document.documentElement.scrollHeight > screen.availHeight) { intTop = intTop+(document.documentElement.scrollTop); } paginaRolar = document.documentElement.scrollTop; objDivAlert.style.top = intTop + "px"; objDivAlert.style.left = intLeft + "px"; objDivAlert.style.visibility = 'visible'; document.onkeypress = keyPress; alertarTexto(strTxt); alertarBotoes(strBotoesPadrao); window.scrollTo(0,paginaRolar);}function alertarTexto(strTxt) { objDivAlert = document.getElementById('divAlert'); objDivAlert.innerHTML += '' + strTxt + '
';}function alertarBotoes(strBotoesPadrao) { arrBotoes = strBotoesPadrao.split(";"); for (i=0; i' + strBotoes + ''; strBotoes = '';}function verificarBotoes(strBotaoNome,strBotaoAcao) { switch (strBotaoNome) {case "Sim":strBotoes += '
';break;case "Nao":strBotoes += '
';break;case "Ok":strBotoes += '
';break;case "Cancelar":strBotoes += '
';break;default:; }}function botaoClick(strBotaoNome,strBotaoAcao) { switch (strBotaoNome) {case "Sim":location.replace(strBotaoAcao);break;case "Nao":alertarFechar();break;case "Ok":alertarFechar();break;case "Cancelar":alertarFechar();break;default:; }}function alertarFechar() { objDivAlert = document.getElementById('divAlert'); objDivAlert.style.visibility = 'hidden'; document.onkeypress = '';}function validarForm(strForm,strRetorno,strCampos,strTitErro) { strErro = ''; strErroNull = ''; strFormulario = ''; strFormulario = document.getElementById(strForm); arrCampos = strCampos.split(';'); for (i=0; iPreencha os campos corretamente.
' + strErroNull,'Ok,false'); }}function verificar(strFormulario,strCampo,strTipo) { objCampo = document.getElementById(strCampo); switch (strTipo) {case 'txt': {MostraErro(strCampo, '', (objCampo.value == '') || (objCampo.value == 'nome') || (objCampo.value == 'nome:') || (objCampo.value == 'email:'), strTipo);break;}case 'num': {MostraErro(strCampo, '', !ApenasNumeros(objCampo.value), strTipo);break;}case 'ema': {MostraErro(strCampo, '', !EmailValido(objCampo.value), strTipo);break;}case 'null': {MostraErro(strCampo, '', !RadioValido(strCampo), strTipo);break;}default: break; }}function RadioValido(strRadio) { for (iRadio=1; iRadio<6; iRadio++) {objRadio = document.getElementById(strRadio+iRadio);if (objRadio.checked == true) {return true;} } strErroNull = 'Escolha uma alternativa'; return false;}function ApenasNumeros(strNumero) { objRegExp = new RegExp("^[0-9]{1,}$"); return objRegExp.test(strNumero);}function EmailValido(objEmail) { if (objEmail.indexOf("@") == -1 ||objEmail.indexOf(".") == -1 ||objEmail.indexOf(" ") != -1 ||objEmail.length < 6) {return false; } else {return true; }}function MostraErro(strObjID, strMensagem, blnErro, strTipo) { strBordaOn = '1px solid #C00'; strBackgroundOn = '#FDFDFD'; strBordaOff = '1px solid #85A1BC'; strBackgroundOff = '#FFF'; objCampo = document.getElementById(strObjID); if (blnErro == true) {if (strTipo != 'null') {objCampo.style.border = strBordaOn;objCampo.style.background = strBackgroundOn;}strErro = true; } else {if (strTipo != 'null') {objCampo.style.border = strBordaOff;objCampo.style.background = strBackgroundOff;} }}function abreresp(name) { if (document.getElementById(name).style.display == 'block') {document.getElementById(name).style.display = 'none'; } else {document.getElementById(name).style.display = 'block'; }}/*function abreresp(name) { if (name.style.display == 'block') {name.style.display = 'none'; } else {name.style.display = 'block'; }}*/function abreDisc(strDivId,objDivPrincipal) { objDiv = document.getElementById(strDivId); if (objDiv.style.display == 'block') {objDivPrincipal.className = 'disListPrincipal';objDiv.style.display = 'none'; } else {objDivPrincipal.className = 'disListPrincipalOn';objDiv.style.display = 'block'; }}function catTrocaFoto(strSrcFoto,strSecao) { document.getElementById('veiculosImgGR').innerHTML = '
';}function MM_preloadImages() { 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