function ok(){
	document.myform.thisurl.value=location.href;
	document.target='_self';
	setVoted('15');
	//myform.submit();
}

function getVoted(name) {
	if (document.cookie.length > 0) {
		var start = document.cookie.indexOf(name + '=');
		var len = start + name.length + 1;
		if ((!start) && (name != document.cookie.substring(0, name.length))) return false;
		if (start == -1) return false;
		var end = document.cookie.indexOf(';', len);
		if (end == -1) end = document.cookie.length;
		return unescape(document.cookie.substring(len, end));
	}
	return false;
}

function setVoted (name) {
	document.cookie = name + "=1; path=/;";
}

if (getVoted('15')) {
	document.write('<a name=\"poll\"></a><h2>Sondage</h2><form action="" method="post"><h3>Qui terminera meilleur buteur de Ligue 1?</h3><ul><li class="pourcent"><strong>36%</strong>Niang<span style="width:36%"/></span></li><li class="pourcent"><strong>9%</strong>Gervinho<span style="width:9%"/></span></li><li class="pourcent"><strong>23%</strong>Lisandro Lopez<span style="width:23%"/></span></li><li class="pourcent"><strong>26%</strong>Nen&ecirc;<span style="width:26%"/></span></li><li class="pourcent"><strong>6%</strong>Erding<span style="width:6%"/></span></li></ul></form><p style="text-align:center; margin-top:5px;"><b>1296 votes</p>');
}
else {
	document.write('<h2>Sondage</h2><form method="post" action="/poll/vote/writepoll_new.php?Q_ID=15" name="myform" onsubmit="ok();"><h3>Qui terminera meilleur buteur de Ligue 1?</h3><ul><li class="check"><input name="R_ID" type="radio" value="87" id="q0"/><label for="q0">Niang</label></li><li class="check"><input name="R_ID" type="radio" value="86" id="q1"/><label for="q1">Gervinho</label></li><li class="check"><input name="R_ID" type="radio" value="85" id="q2"/><label for="q2">Lisandro Lopez</label></li><li class="check"><input name="R_ID" type="radio" value="84" id="q3"/><label for="q3">Nen&ecirc;</label></li><li class="check"><input name="R_ID" type="radio" value="103" id="q4"/><label for="q4">Erding</label></li><li><input type="hidden" name="thisurl" value=""><input type="hidden" name="cmd" value="vote"><input class="fr" type="submit" value="Votez"></li></ul></form>');
}

