Witam dobrzy ludzie powiedzcie jak mam za pomocą cookie (chyba najlepiej) zrobic zeby oto ten skrypt wywalał mi okienko raz na 24h

a nie tak jak jest teraz co odswierzanie strony mi go ładuje

<link rel="stylesheet" href="windowfiles/dhtmlwindow.css" type="text/css" />
<script type="text/javascript" src="windowfiles/dhtmlwindow.js">
/***********************************************
* DHTML Window Widget- Š Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use.
* Visit
<a href="http://www.dynamicdrive.com/" target="_blank">http://www.dynamicdrive.com/
</a> for full source code
***********************************************/
<link rel="stylesheet" href="modalfiles/modal.css" type="text/css" />
<script type="text/javascript" src="modalfiles/modal.js"></script>
<!-##################### 1) DHTML Modal Window Example 1: ###################-->
<script type="text/javascript">
var agreewin=dhtmlmodal.open("agreebox", "iframe","/zakaz.gif", "This image has been marked as adult content. You must be 18 years of age or older to proceed.", "width=300px,height=300px,center=1,resize=1,scrolling=0", "recal")
agreewin.onclose=function(){ //Define custom code to run when window is closed
var theform=this.contentDoc.getElementById("eula") //Access form with id="eula" inside iframe
var yesbox=theform.eulabox[0] //Access the first radio button within form
var nobox=theform.eulabox[1] //Access the second radio button within form
if (yesbox.checked==true)
alert("You agreed to the terms")
else if (nobox.checked==true)
alert("You didn't agree to the terms")
return true //Allow closing of window in both cases
}