/* create the uri for the target yellow search page an load it */
function launchYellowSearch() {
	var uri = new Object();
	var targetUrl = 'http://beta.yellow.lu/search/';
		
	var yellowQuery = document.getElementById('yellowQuery').value;
	var yellowLocation = document.getElementById('yellowLocation').value;
//	var mnumber = document.getElementById('mnumber').value;
//	var muid = document.getElementById('muid').value;
	if (!yellowQuery) {
		//var toLoad = 'http://nicolas.yellowv3.dev/search/details/?uid=' + muid + '&dtab=pregame';
		var toLoad = 'http://nicolas.yellowv3.dev/';
		window.location.href = toLoad;
	} else {
		var toLoad = targetUrl + '?query=' + yellowQuery + '&location=' + yellowLocation + '&form=1&yellowAction=search';
		window.location.href = toLoad;
	}
}


function checkInteratction(event) {

    if (event.keyCode == 13) {
		launchYellowSearch();
	}
}

function IncludeJavaScript(jsFile) {
      document.write('<script type="text/javascript" src="'
        + jsFile + '"></scr' + 'ipt>'); 
 }


		  
//document.write('<input type="hidden" id="mnumber" value="">');
//document.write('<input type="hidden" id="muid" value="">');
document.write('<div id="searchBox">');
document.write('<b>Faites une recherche sur Yellow.lu :</b><br/><br/>');
//document.write('<table >');
//document.write('		<td >');
document.write('			<!-- right box -->');
document.write('				<form>');
document.write('				<table border="0" >');
//document.write('					<tr>');
//document.write('						<td valign="top" height="60px">&nbsp;</td>');
//document.write('					</tr>');
document.write('					<tr>');
document.write('						<td valign="top" style="font-family: Tahoma; font-size: 13px;"><strong>Qui, Quoi :</strong></td>');
document.write('					</tr>');
document.write('					<tr>');
document.write('						<td valign="top"><input type="text" tabindex="2" id="yellowQuery" name="query" value="" size="20" style="border: 1px solid #ffc000;" onKeyPress="checkInteratction(event);"/><br/><span style="font-family: Tahoma; font-size: 11px; color: #484848">Ex.: Restaurant</span></td>');
document.write('					</tr>');
document.write('					<tr>');
document.write('						<td valign="top" style="font-family: Tahoma; font-size: 13px;"><strong>Localit&eacute; :</strong> </td>');
document.write('					</tr>');
document.write('					<tr>');
document.write('						<td class="input"><input type="text" tabindex="2" id="yellowLocation" name="location" value="" size="20" style="border: 1px solid #ffc000;" onKeyPress="checkInteratction(event);"/><br/><span style="font-family: Tahoma; font-size: 11px; color: #484848">Ex.: Walferdange</span></td>');
document.write('					</tr>');
document.write('					<tr>');
document.write('						<td><img title="Trouver" alt="Trouver" id="searchBox_searchButton" src="http://images.newmedia.lu/yellow.rtl.lu/lessentiel/searchBtnEssentiel.png" onClick="launchYellowSearch();" style="cursor: pointer"/></td>');
document.write('					</tr>');
document.write('				</table>');
document.write('				<input type="hidden" name="form" value="1" />');
document.write('				</form>');
//document.write('		</td>');
//document.write('	</tr>');
//document.write('</table>');
document.write('');
document.write('</div>');
//document.write('<div id="shootabook" style="display: none; width: 135px; height: 150px; background: url(http://images.newmedia.lu/yellow.rtl.lu/lessentiel/mysteryFooter2.gif) top no-repeat;">');
//document.write('<div id="mystery" style="padding-top: 40px; text-align: center; font-family: Arial;"></div>');
//document.write('<div style="font-family: Tahoma; font-size: 11px; color: #484848: padding: 5px; text-align: center; border: 0px solid #ff0000; height: 80px;">Entrez le num&eacute;ro myst&egrave;re dans le champs<br> &laquo; Qui, Quoi &raquo;<br> et cliquez sur Trouver</div>');
//document.write('</div>');


//IncludeJavaScript('http://yellow.rtl.lu/shootthebook/mystery');
