function CheckCmp (form) {
  if (form.name.value == "") {
    alert("Veuillez renseigner une société.");
    return (false);
  }
  if ((form.city.value == "") && (form.deptId.value == "")) {
    alert("Veuillez renseigner une ville ou un département");
    return (false);
  }
  form.action = "http://www.1bis.com/1bis/" + ((form.city.value != "") ? "geo/geocode" : "act/find_company") + ".asp";
  return (true);
}

document.write('<FORM NAME="cmpForm" METHOD="POST" onSubmit="return CheckCmp(this)" TARGET="_blank">')
document.write('<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="0" BORDERCOLOR="#000000" BGCOLOR="#FFFFFF">')
document.write('<TR>')
document.write('<TD NOWRAP BGCOLOR="#006699"><FONT COLOR="#FFFFFF" FACE="Arial, Helvetica, sans-serif" SIZE="2"><B>') 
document.write('&nbsp;Annuaire professionnel avec</B></FONT><A HREF="http://www.1bis.com" TARGET="_blank"><IMG SRC="http://www.1bis.com/1bis/affiliate/1bis_logo.gif" ALIGN="ABSMIDDLE" BORDER="0"></A></TD></TR>')
document.write('<TR><TD><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3" BGCOLOR="#FFFFFF" WIDTH="100" HEIGHT="100" ALIGN="CENTER">')
document.write('<TR><TD ALIGN="RIGHT"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="1" COLOR="#000000">Nom</FONT></TD>')
document.write('<TD COLSPAN="2"><INPUT TYPE="text" NAME="name" SIZE="15"></TD></TR>')
document.write('<TR><TD ALIGN="RIGHT" NOWRAP><FONT FACE="Arial, Helvetica, sans-serif" SIZE="1" COLOR="#000000">Ville (ou CP)</FONT></TD>')
document.write('<TD COLSPAN="2"> <INPUT TYPE="text" NAME="city" SIZE="15"></TD>')
document.write('</TR><TR><TD ALIGN="RIGHT"><FONT FACE="Arial, Helvetica, sans-serif" SIZE="1" COLOR="#000000">Dpt</FONT></TD>')
document.write('<TD><INPUT TYPE="text" NAME="deptId" SIZE="3" MAXLENGTH="5"></TD><TD ALIGN="RIGHT"><INPUT TYPE="submit" VALUE="OK"></TD></TR>')
document.write('</TABLE></TD></TR></TABLE></FORM>')
