/**
  * Arquivo com funcionalidades para pequenas consultas ao Rotaer por sites externos
  *
  * @author    Airsoft Informática e Tecnologia <atendimento@airsoft.com.br>
  * @version   1.0
  * @copyright Copyright © 2008, Airsoft
*/

buscarRotaer = function(form)
{
  if (form.elements['indRW'].value == "") {
    alert('O campo a ser consultado deve ser preenchido.');
    form.elements['indRW'].focus();
  }
  else {
    var nome_target = "rotaerWeb";
    var inf = window.open('', nome_target, 'top=0,left=0,width=800,height=668,status=no,resizable=no');
    form.target = nome_target;
    form.submit();
    inf.focus();
  }
}

document.write(
'<style type="text/css">'+
' div#rotaerWeb { background: #FFF; border: 1px #CCC solid; width: 150px }'+
' div#rotaerWeb form { background: url("http://www.airsoft.com.br/airsoft/geral/logo_airsoft.gif") no-repeat 15px 27px; font-family: Verdana, Arial; font-size: 11px; color: #000 }'+
' div#rotaerWeb form div#tituloRW { height: 20px; line-height: 20px; text-align: center; background: #E8E8E8; border-bottom: 1px #CCC solid; font-weight: bold; color: #666 }'+
' div#rotaerWeb form div#conteudoRW { margin: 5px; margin-top: 40px }'+
' div#rotaerWeb form div#conteudoRW label { height: 20px; line-height: 20px }'+
' div#rotaerWeb form div#conteudoRW input[type="text"] { width: 135px; text-transform: uppercase; border: 1px #CCC solid }'+
' div#rotaerWeb form div#conteudoRW input[type="button"] { display: block; width: 120px; margin: 4px 10px }'+
'</style>'+
'<div id="rotaerWeb">'+
'  <form method="post" action="http://www.airsoft.com.br/airsoft/geral/selo.aspx">'+
'    <div id="tituloRW">Informações ROTAER</div>'+
'    <div id="conteudoRW">'+
'      <label for="indRW">Consultar por:</label>'+
'      <input type="text" name="indRW" id="indRW" maxlength="14" />'+
'      <label><input type="radio" name="tipoRW" value="1" checked="checked" /> Indicativo</label><br />'+
'      <label><input type="radio" name="tipoRW" value="2" /> Cidade</label>'+
'      <input type="button" value="Consultar" onclick="buscarRotaer(this.form)" />'+
'    </div>'+
'  </form>'+
'</div>'
);

