/* AUTHOR: Cooking2000 (http://www.france.cooking2000.com) */
/* CREATION DATE: 06/01/14 -- YY/MM/DD */
/* REVISION DATE: 06/01/14 -- YY/MM/DD */

function afficherecette(url,dotdot,image,mytitle,longtitle,mydate,thisxmas)
{
var thispath="";
if (mydate == null){mydate="01/01/2000";}
if (typeof thisxmas != "undefined")
{
if (thisxmas == 1){thisxmas='<scr' + 'ipt>xmas(); </scr' + 'ipt>';}
}
else
{thisxmas='';}
if (longtitle == ""){var finishurl=">";}else{var finishurl= '"  title="' + longtitle + '">';}
if (dotdot == 1){var thispath="../";}
var thisimage='<IMG SRC="' + thispath + '../image/camera.gif" BORDER="0" WIDTH="16" HEIGHT="14" ALT="This recipe contains one or more pictures">&nbsp;';
document.write('<br>&#149; <a href=' + '"' + thispath + url +'"' + finishurl);
if (image == 1){document.write(thisimage);}
document.write(mytitle + '</a><scr' + 'ipt>checknew("' + mydate + '")</scr' + 'ipt>'+ thisxmas);
}

function afficherecette2(url,dotdot,image,mytitle,longtitle,mydate,thisxmas,thumbname,w,h)
{
var thispath="";
if (mydate == null){mydate="01/01/2000";}
if (typeof thisxmas != "undefined")
{
if (thisxmas == 1){thisxmas='<scr' + 'ipt>xmas(); </scr' + 'ipt>';}
}
else
{thisxmas='';}

if (longtitle == ""){var finishurl=">";}else{var finishurl= '"  title="' + longtitle + '">';}
if (dotdot == 1){var thispath="../";}
if (dotdot == 2){var thispath="../../";}
document.write('<table border="0" cellpadding="3" cellspacing="2" width="100%">');
document.write('<tr valign="top">');
document.write('<td align="center" width="90">');

if (typeof thumbname != "undefined")
{
document.write('<a href=' + '"' + thispath + url +'"' + finishurl + '<img src=' + thispath + "/image/recipe/" + thumbname + ' border="0" width="' + w + '" height="' + h + '" alt="' + mytitle +'"></a>');
}
else
document.write('&nbsp;');

document.write('</td>');
document.write('<td class="tbl" align="left">');
document.write('<br><a href=' + '"/us/' + thispath + url +'"' + finishurl);
document.write(mytitle + '</a><scr' + 'ipt>checknew("' + mydate + '")</scr' + 'ipt>'+ thisxmas);
document.write('</td>');
document.write('</tr>');
document.write('</table>');
}

function checknew(date)
{
var pic = "/image/new.gif";
expdate = new Date(date);
curdate = new Date();
if (expdate.getTime() > curdate.getTime())
document.write("<img src=" + pic + ">");
}

function xmas()
{
var pic = "http://www.cooking2000.com/image/x-mas/xmastree.gif";
var curdate = new Date();
var moddate=curdate.getMonth() + 1;
if ((moddate == 11) || (moddate == 12))
document.write("&nbsp;<img src=" + pic + " WIDTH='12' HEIGHT='16' ALIGN='middle' ALT='Recette de Noël'>");
}

function inforecipe(dotdot)
{
var thispath="";
if (dotdot == 1){var thispath="../";}
document.write('<TABLE width="95%" BORDER="0"><COL WIDTH="50" ALIGN="center" VALIGN="middle">');
document.write('<TR><TD><IMG SRC="' + thispath + '../image/nouveau.gif" BORDER="0" WIDTH="47" HEIGHT="11" ALT="Recette nouvelle ou mise à jour"></TD>');
document.write('<TD style="font: x-small Verdana">Les recettes nouvelles ou mises-à-jour apparaissent avec cette image.</TD>');
document.write('</TR><TR>');
document.write('<TD><IMG SRC="' + thispath + '../image/camera.gif" BORDER="0" WIDTH="16" HEIGHT="14" ALT="Cette recette contient une ou plusieurs photos"></TD>');
document.write('<TD style="font: x-small Verdana">Les recettes avec ce dessin contiennent une ou plusieurs photos.</TD></TR>');
var pic = "' + thispath + '../image/x-mas/xmastree.gif";
var curdate = new Date();
var moddate=curdate.getMonth() + 1;
if ((moddate == 11) || (moddate == 12))
document.write("<TR><TD><IMG SRC='" + thispath + "../image/x-mas/xmastree.gif' BORDER='0' WIDTH='12' HEIGHT='16' ALT='Recette de Noël' ALIGN='middle'></TD><TD style='font: x-small Verdana'>Il s"+ "'"+ "agit d"+ "'"+ "une " + '<a href="http://www.cooking2000.com/fr/recettes-noel.htm">recette de Noël</a>' + ".</TD></TR>");
document.write('</TABLE>');
}

function recipemenu(dotdot)
{
var thispath="";
if (dotdot == 1){var thispath="../";}
if (dotdot == 2){var thispath="../../";}
document.write('<hr noShade size="1">');
document.write('<a NAME="GiveMeTheRecipes"></a>');
document.write('<script>topheader("XXYour menu with our recipes…","cafede"); </script>');
/* document.write('<a href="' + thispath + 'recettes-noel.htm"><b>Recettes de Noël</b></a><br>'); */
document.write('<br><a href="' + thispath + 'cocktail.htm">Cocktails</a><br><br>');
document.write('<a href="' + thispath + 'starter.htm">Starters</a><br>');
document.write('<a href="' + thispath + 'sauce.htm">Sauces</a><br>');
document.write('<a href="' + thispath + 'salad.htm">Salads</a><br>');
document.write('<a href="' + thispath + 'fish.htm">Fishes, Seafoods</a><br>');
document.write('<a href="' + thispath + 'meat.htm">Meats</a><br>');
document.write('<a href="' + thispath + 'dish.htm">Main courses</a><br>');
document.write('<a href="' + thispath + 'veget.htm">Vegetables</a><br>');
document.write('<a href="' + thispath + 'cheese.htm">Cheeses</a>&nbsp;<script> checknew("08/31/2007"); </script><br>');
document.write('<a href="' + thispath + 'dessert.htm">Desserts</a><br>');
document.write('<hr noShade size="1">');
}

function c2khelp(dotdot,thisvalue)
{
var thispath="";
if (dotdot == 1){var thispath="../";}
if (dotdot == 2){var thispath="../../";}
document.write('<div align="center">');
document.write('<script>topheader("XXSearch<br>a recipe","cafede"); </script>');
document.write('<a href="' + thispath + 'advsearch.htm">Advanced search</a>');
document.write('<form method="get" action="http://search.atomz.com/search/">');
document.write('<input type="text" size="20" name="sp-q" value="' + thisvalue + '" style="background-color: #CAFEDE"><br>');
document.write('<input type="hidden" name="sp-not-found-page" value="http://www.cooking2000.com/advsearch.htm">');
document.write('<input type="submit" value="Search">');
document.write('<input type="hidden" name="sp-a" value="000330fe-sp1002ac6c">');
document.write('</form></div>');
}

/* Affichage des livres */
function drawthisstuff(url,imagename,imgwidth,imgheight,altname,mydate)
{
var reg = new RegExp("\n", "g");
altnameHTML = altname;
altnameHTML = altnameHTML.replace(reg, "<br>");
if (url.match("amazon.fr") == null)
{
document.write('<tr class="tbl"><td width="30%" align="center"><a href="' + url + '"><img src="' + imagename + '" border="0" width="' + imgwidth + '" height="' + imgheight + '" alt="' + altname + '" hspace="3" vspace="3"></a></td><td width="50%"><a href="' + url + '">' + altnameHTML + '</a>&nbsp;<script> checknew("' + mydate + '"); </script></td><td width="20%" align="center"><a href="' + url + '" target="_blank"><IMG SRC="../../image/amazon/order-amzn.gif" BORDER="0" WIDTH="104" HEIGHT="29" ALT="Passer votre commande avec Amazon.fr"></a></td></tr>');
}
else
{
document.write('<tr class="tbl"><td width="30%" align="center"><a href="' + url + '" target="_blank"><img src="' + imagename + '" border="0" width="' + imgwidth + '" height="' + imgheight + '" alt="' + altname + '" hspace="3" vspace="3"></a></td><td width="50%"><a href="' + url + '" target="_blank">' + altnameHTML + '</a>&nbsp;<script> checknew("' + mydate + '"); </script></td><td width="20%" align="center"><a href="' + url + '" target="_blank"><IMG SRC="../../image/amazon/order-amzn.gif" BORDER="0" WIDTH="104" HEIGHT="29" ALT="Passer votre commande avec Amazon.fr"></a></td></tr>');
}
}

function thisbook(dotdot,ASIN,local,image,hauteur,largeur,altname,promolivre,promourl,promotexte)
{
/* local IS NOT used anymore */
var thispath="";
var d=document;
if (dotdot == 1){var thispath="../";}
if (dotdot == 2){var thispath="../../";}

d.write('<div style="text-align: center">');
d.write('<scr'+'ipt>topheader(\'XXOur Selection…\',"cafede"); </scr'+'ipt>');
d.write('<a href="/book.htm"><b>books</b></a>, <a href="/us/book/usoft.htm">software</a>,');
d.write('<br><a href="/us/book/video.htm">movies</a> and <a href="/poster.htm">posters/prints</a>');
if (local == 1 || local == 11)
	{
	/* update BELOW */
	d.write('<br><img src="http://www.assoc-amazon.fr/e/ir?t=cooking2000-21&l=as2&o=8&a=' + ASIN + '" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /><a href="http://www.amazon.fr/gp/product/' + ASIN + '?ie=UTF8&tag=cooking2000-21&linkCode=as2&camp=1642&creative=19458&creativeASIN=' + ASIN + '" target="_blank">');
	d.write('<img src="/' + image + '" border="0" width="' + hauteur + '" height="' + largeur + '" alt="' + altname + '" hspace="3" vspace="3">');
	if (altname.match("\n"))
	{
		var reg = new RegExp("\n", "g");
		altnameHTML = altname;
		altnameHTML = altnameHTML.replace(reg, "<br>");
		d.write('<br>' + altnameHTML);
	}
	d.write('<br><img src="/image/amazon/buyamazon.bmp" border="0" width="120" height="28" alt="Buy this book from Amazon.com"></a>');
	if (promolivre == 1)
		{
		/* update BELOW */

		d.write('<br><a href="' + thispath + 'book/'+ promourl + '"><font color="#ff0000">Please read our article on<br>' + promotexte + '</font></a>');
		}
	}
else
	{
		/* update BELOW */
		d.write('<br><iframe src="http://rcm-fr.amazon.fr/e/cm?t=cooking2000-21&o=8&p=8&l=as1&asins='+ASIN+'&nou=1&fc1=000000&IS2=1&lt1=_blank&lc1=0000ff&bc1=000000&bg1=ffffff&f=ifr" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>');
	}
d.write('</div>');
}

function inforecipe2007()
{
document.write('<TABLE width="95%" BORDER="0"><COL WIDTH="50" ALIGN="center" VALIGN="middle">');
document.write('<TR><TD><IMG SRC="/image/new.gif" BORDER="0" WIDTH="47" HEIGHT="11" ALT="New or updated recipe"></TD>');
document.write('<TD style="font: x-small Verdana">New or updated recipes are displayed with this picture.</TD>');
document.write('</TR><TR>');
document.write('<TD><IMG SRC="/image/camera.gif" BORDER="0" WIDTH="16" HEIGHT="14" ALT="Cette recette contient une ou plusieurs photos"></TD>');
document.write('<TD style="font: x-small Verdana">Copyright for the pictures are listed in the recipes.</TD></TR>');
var pic = "' + thispath + '../image/x-mas/xmastree.gif";
var curdate = new Date();
var moddate=curdate.getMonth() + 1;
if ((moddate == 10) || (moddate == 11) || (moddate == 12))
document.write("<TR><TD><IMG SRC='/image/x-mas/xmastree.gif' BORDER='0' WIDTH='12' HEIGHT='16' ALT='Christmas recipes' ALIGN='middle'></TD><TD style='font: x-small Verdana'>It is a recipe for Christmas.</TD></TR>");
document.write('</TABLE>');
document.write('<br>');
}

function AfficheRecetteBy2(data1,data2)
{
if (((data1.length==10) && (data2.length==10))&&(data1[3]!=data2[3]))
	{
	document.write('<br><table summary="" border="0">');
	document.write('<tr class="tbl">');
	document.write('<td width="250">');
	afficherecette2(data1[0],data1[1],data1[2],data1[3],data1[4],data1[5],data1[6],data1[7],data1[8],data1[9]);
	document.write('</td>');
	document.write('<td width="250">');
		if (data2[0] == "dummy")
			{
			document.write('&nbsp;');
			}
		else
			{
			afficherecette2(data2[0],data2[1],data2[2],data2[3],data2[4],data2[5],data2[6],data2[7],data2[8],data2[9]);
			}
	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
	}
else
	{
	document.write('<b>Erreur affichage du titre de la recette pour</b> <br>'+ data1[3]+'<br>ou<br>'+ data2[3]);
	}
}

function AfficheRecetteBy29(data1,data2)
{
if (((data1.length==10) && (data2.length==10))&&(data1[3]!=data2[3]))
	{
	document.write('&lt;br&gt;&lt;table summary="" border="0"&gt;');
	document.write('&lt;tr class="tbl"&gt;');
	document.write('&lt;td width="250"&gt;');
	afficherecette29(data1[0],data1[1],data1[2],data1[3],data1[4],data1[5],data1[6],data1[7],data1[8],data1[9]);
	document.write('&lt;/td&gt;');
	document.write('&lt;td width="250"&gt;');
		if (data2[0] == "dummy")
			{
			document.write('&nbsp;');
			}
		else
			{
			afficherecette29(data2[0],data2[1],data2[2],data2[3],data2[4],data2[5],data2[6],data2[7],data2[8],data2[9]);
			}
	document.write('&lt;/td&gt;');
	document.write('&lt;/tr&gt;');
	document.write('&lt;/table&gt;');
	}
else
	{
	document.write('&lt;b&gt;Erreur affichage du titre de la recette pour&lt;/b&gt; &lt;br&gt;'+ data1[3]+'&lt;br&gt;ou&lt;br&gt;'+ data2[3]);
	}
}

