function moteurRecherche(p, r) {
        	var partenaire = p;
            var ratachement = r;
            var url ;
            var urlLIVE7 = "http://www.live7.com.pt";
            var urlFNAC = "http://www.fnacspectacles.com";
            var urlRFB = "http://www.francebillet.com";
			var urlPROMO = "http://www.promo-sorties.com";
			var urlJUNIOR = "http://www.francebilletjunior.com";
            url = "http://" + partenaire + "." + ratachement + ".com";
 
            if ( ratachement == "fnacspectacles")
                        {
                        document.write("<link href='" + urlLIVE7 + "/moteur_fnac.css' rel='stylesheet' type='text/css' />");
                        document.write("<form name='searchFullTextForm' id='searchFullTextForm' action='" + url + "/recherche/rechercheRapide.do' method='get' target='_self'>");
                        document.write("<table width='100%'  border='0' cellpadding='1' cellspacing='0' bgcolor='#FFFFFF'>");
                        document.write("   <tr>");
                        document.write("    <td><table bgcolor='#FFFFFF' width='295' height='95' border='0' cellpadding='0' cellspacing='0'>");
                        document.write("   <tr>");
                        document.write("  <td valign='top' bgcolor=''><div align='center'>");
                        document.write("  </div></td>");
                        document.write("   <td ><div class='titreRecherche'>Rechercher un spectacle</div> </td>");
                        document.write("<td valign='top' ><div align='right'></div></td>");
                        document.write(" </tr>");
                        document.write(" <tr>");
                        document.write(" <td valign='top'><img src='" + urlLIVE7 + "/images/enconcertlogo.gif' width='50' height='45'></td>");
                        document.write("<td><div align='center'>");
                        document.write("<input name='search' type='text' class='text' id='search3' size='18'>");
                        document.write("  <input class='submit' name='searchOkButton' id='searchFullTextOkButton' value='ok' type='image' src='" + urlFNAC + "/static/uploads/moteurs/fnac/V2/btn_recherche.gif'>");
                        document.write("</div></td>");
                        document.write(" <td bgcolor=''>&nbsp;</td>");
                        document.write(" </tr>");
                        document.write("   <tr>");
                        document.write("  <td valign='bottom' bgcolor=''><div align='left'></div></td>");
                        document.write("<td>&nbsp;</td>");
                        document.write("<td bgcolor='' valign='bottom'></td>");
                        document.write("  </tr>");
                        document.write("</table></td>");
                        document.write(" </tr>");
                        document.write("</table>");
                        document.write("</form>");
                        }
            else 
                        {
                        if( ratachement == "francebillet")
                                   {
						document.write("<link href='" + urlRFB + "/static/uploads/moteurs/rfb/moteur_rfb.css' rel='stylesheet' type='text/css' />");
						document.write("<form name='searchFullTextForm' id='searchFullTextForm' action='" + url + "/recherche/rechercheRapide.do' method='get' target='_self'>");
						document.write("  <table width='100%'  border='0' cellpadding='1' cellspacing='0' >");
						document.write("    <tr>");
						document.write("      <td><table width='260'  border='0' cellpadding='0' cellspacing='0' class='bgTable'>");
						document.write("          <tr>");
						document.write("            <td rowspan='3' valign='top'><div align='left'></div>");
						document.write("              <div align='left'><img src='" + urlRFB + "/static/uploads/moteurs/rfb/logo/logo_rfb_xs.gif' width='76' height='50'></div>");
						document.write("            </td>");
						document.write("            <td ><div class='titreRecherche'>Rechercher un spectacle</div>");
						document.write("            </td>");
						document.write("          </tr>");
						document.write("          <tr>");
						document.write("            <td>");
						document.write("              <input name='search' type='text' class='text' id='search3' size='18'>");
						document.write("              <input class='submit' name='searchOkButton' id='searchFullTextOkButton' value='ok' type='image' src='" + urlRFB + "/static/uploads/moteurs/rfb/logo/b_recherche_submit.gif'>");
						document.write("            </td>");
						document.write("          </tr>");
						document.write("          <tr>");
						document.write("            <td><div class='lienDetail'><a href='" + url + "/recherche/moteurRechercheDetail.do' target='_blank'>Recherche");
						document.write("                  d&eacute;taill&eacute;e</a></div>");
						document.write("            </td>");
						document.write("          </tr>");
						document.write("        </table>");
						document.write("      </td>");
						document.write("    </tr>");
						document.write("  </table>");
						document.write("</form>");                                   }
                        else      
                                 	{
                                   if(ratachement == "promo-sorties")
		{
						document.write("<link href='" + urlPROMO + "/static/uploads/moteurs/promos/moteur_promo_sorties.css' rel='stylesheet' type='text/css' />");
						document.write("<form name='searchFullTextForm' id='searchFullTextForm' action='" + url + "/recherche/rechercheRapide.do' method='get' target='_self'>");
						document.write("  <table width='100%'  border='0' cellpadding='1' cellspacing='0' >");
						document.write("    <tr>");
						document.write("      <td><table width='260' border='0' cellpadding='0' cellspacing='0' class='bgTable'>");
						document.write("          <tr>");
						document.write("            <td rowspan='3' valign='top'><div align='left'></div>");
						document.write("              <div id='logo'><img src='" + urlPROMO + "/static/uploads/moteurs/promos/logo_promo_sorties_xs.gif' width='55' height='28'></div>");
						document.write("            </td>");
						document.write("            <td ><div class='titreRecherche'>Rechercher un spectacle</div>");
						document.write("            </td>");
						document.write("          </tr>");
						document.write("          <tr>");
						document.write("            <td>");
						document.write("              <input name='search' type='text' class='text' id='search3' size='18'>");
						document.write("              <input class='submit' name='searchOkButton' id='searchFullTextOkButton' value='ok' type='image' src='" + urlRFB + "/static/uploads/moteurs/promos/b_recherche_submit.gif'>");
						document.write("            </td>");
						document.write("          </tr>");
						document.write("          <tr>");
						document.write("            <td><div class='lienDetail'><a href='" + url + "/recherche/moteurRechercheDetail.do' target='_blank'>Recherche");
						document.write("                  d&eacute;taill&eacute;e</a></div>");
						document.write("            </td>");
						document.write("          </tr>");
						document.write("        </table>");
						document.write("      </td>");
						document.write("    </tr>");
						document.write("  </table>");
						document.write("</form>");                             
		}
		else { 
		 if ( ratachement == "francebilletjunior")
                        {
                        document.write("<link href='" + urlJUNIOR + "/static/uploads/moteurs/junior/moteur_junior.css' rel='stylesheet' type='text/css' />");
                        document.write("<form name='searchFullTextForm' id='searchFullTextForm' action='" + url + "/recherche/rechercheRapide.do' method='get' target='_blank'>");
                        document.write("<table width='100%'  border='0' cellpadding='1' cellspacing='0' bgcolor='#FFFFFF'>");
                        document.write("   <tr>");
                        document.write("    <td><table width='266' height='95'  border='0' cellpadding='0' cellspacing='0'  bgcolor='#FFFFFF' class='fond_tableau'>");
                        document.write("   <tr>");
                        document.write("  <td valign='top' bgcolor=''><div align='left'>");
                        document.write("  </div></td>");
                        document.write("   <td ><div class='titreRecherche'>Rechercher un spectacle</div> </td>");
                        document.write("<td valign='top' ><div align='right'></div></td>");
                        document.write(" </tr>");
                        document.write(" <tr>");
                        document.write(" <td bgcolor='' valign='top'><img src='" + urlJUNIOR + "/static/uploads/moteurs/junior/logo_junior.gif' width='58'></td>");
                        document.write("<td><div align='center'>");
                        document.write("<input name='search' type='text' class='text' id='search3' size='18'>");
                        document.write("  <input class='submit' name='searchOkButton' id='searchFullTextOkButton' value='ok' type='submit'> ");
                        document.write("</div></td>");
                        document.write(" <td>&nbsp;</td>");
                        document.write(" </tr>");
                        document.write("   <tr>");
                        document.write("  <td valign='bottom' bgcolor=''><div align='left'></div></td>");
                        document.write("<td></td>");
                        document.write("<td valign='bottom'></td>");
                        document.write("  </tr>");
                        document.write("</table></td>");
                        document.write(" </tr>");
                        document.write("</table>");
                        document.write("</form>");
                        }
						else {
			document.write("<br>ERROR : ratachement incoherent <br>");
			}
		}
                                   }                                  
                        }
}

