<!--MULTI DATED & TIMED POP-UP - II--> <!-- This goes in the HEAD of the html file --> <script language="JavaScript" type="text/javascript"> <!-- Copyright 2007, Sandeep Gangadharan --> <!-- For more free scripts go to http://www.sivamdesign.com/scripts/ --> <!-- var theDate = new Array("3","4","5","21"); // Set the dates the pop-up should open at left in the format shown var theMonth = new Array("01","02","03"); // Set the months the pop-up should open at left in the format shown var theYear = "2010"; // Set the year the pop-up should open at left in the format shown var hourAlrm1 = "09"; // Set the start hour the pop-up should open at left in the format shown var hourAlrm2 = "06"; // Set the end hour till when the pop-up should open at left in the format shown var suf1 = "am"; // Set whether 'am' or 'pm' for the start hour in the format shown (lowercase only) var suf2 = "pm"; // Set whether 'am' or 'pm' for the end hour in the format shown (lowercase only) var month = new Array("01","02","03","04","05","06","07","08","09","10","11","12"); today = new Date(); date = today.getDate(); month = (month[today.getMonth()]); year = (today.getFullYear()); function sivamtime() { now=new Date(); hour=now.getHours(); min=now.getMinutes(); sec=now.getSeconds(); if (min<=9) { min="0"+min; } if (sec<=9) { sec="0"+sec; } if (hour>12) { hour=hour-12; add="pm"; } else { hour=hour; add="am"; } if (hour==12) { add="pm"; } if (hour==00) { hour="12"; } hour = (hour<=9) ? "0"+hour : hour; ST=setTimeout("sivamtime()", 1000); for (i=0; i < theDate.length; i++) { for (e=0; e < theMonth.length; e++) { if (date == theDate[i] && month == theMonth[e] && year == theYear && ((hour >= hourAlrm1 && add == suf1) || (hour <= hourAlrm2 && add == suf2))) { window.clearTimeout(ST); window.open('popwind.html','NewWin','toolbar=no,status=no,width=350,height=135'); } // Create a html document (in this example "popwind.html") that shall be the pop-up } } } // --> </script> <!-- Note the script in the BODY tag --> <body onLoad="sivamtime()">