crestars 0 Newbie Poster

First let me introduce myself as Miss Beginner of all time!...I recently took upon myself to give myself a challenge and take a beginner's javascript my first assignment i have to display certain scripts...i have accomplished everything so far except on my second page i would like to have the "daysTill()" to display where i wrote the text in my document...i would be so ever grateful if someone could help me is my complete 2 pages of scripts and i have bolded and change the color of where i mean exactly:

<script type="text/javascript">
picList = new Array("images/topban1.png","images/topban2.png","images/topban3.png","images/topban4.png","images/topban5.png","images/topban6.png","images/topban7.png");
document.myrotate ="images/background_top.jpg"

thisImg = 0
imgCount = picList.length=7

function rotate() {
if (document.myrotate) {
if (thisImg == imgCount) {
thisImg = 0
setTimeout("rotate()", 3 * 1000);
function daysTill() {
var day = 29 
var month = 03 
var year = 2011 
var end = " days left before the end of the Javascript course?"
var daystocount = new Date(year, month -1, day)
today=new Date()
if (today.getMonth()==month && today.getDate()>day)
var oneday=1000*60*60*24
var write = (Math.ceil((daystocount.getTime()-today.getTime())/(oneday)))
document.write("<h2>" + "There are <strong>" + write + "</strong>" + end +" "+ "</h2>");
<style type="text/css">
body {
 background-color: #000;

#content {
 background: url(images/bkgd.jpg) repeat;
 width: 800px;
 padding: 0px;
 margin: 0px auto;
 font-size: 18px;

#content p noscript em {
 font-size: 14px;

#footer {
 background: #333;
 width: 800px;
 margin-right: auto;
 margin-left: auto;
 font-size: 16px;
 font-style: italic;
 color: #E8B870;
 text-align: center;

#content p {
 text-align: left;
 padding: 8px;

#content h4 {
 text-align: right;
 margin-right: 20px;

#content table {
 text-align: center;
h5 {
h2 {
 font-size: 20px;

<body onLoad="rotate(),daysTill()">
 <div id="content">
  <h4><img src="images/topban1.png" name="bannerImg" width="800" height="90" />by Martine Couture</h4>
<p><noscript><em>This page requires Javascript</em></noscript></p>
<script type="text/javascript">
RightNow = new Date();
hour = RightNow.getHours();
minutes = RightNow.getMinutes(01);
if (minutes < 10){
minutes = "0" + minutes

document.write("<h5>" + "Current time is: " + hour + ":" + minutes + "</h5>");

var i=48;
do {
    document.write("<h2>" + "Yes I am  " +i,(",&nbsp;years old...and who would of have thought I would take on Javascript!" + "</h2>"));
    document.write("<br />");
while (i<=1); 

var answer;
while (answer!=48) {

answer = prompt("Guess my age...careful! ","");
switch (answer) {
case "40":
 alert("I wish!");
case "41":
 alert("Not even close!");
case "43":
 alert("Keep going up!");
case "44":
 alert("Half way there!");
case "45":
 alert("Keep going...");
case "46":
alert("Getting close!");
case "47":
alert("You are so very close!");
case "48":
 alert("Yep you guessed it right!");
 case "49":
 alert("That's not nice!");
alert("Play fair!");

function newWindow(img) {
thisWindow =, "newWin", "width=400,height=300,top=400,left=480");

[COLOR="Red"][B]<p>Did you know there are...days left before the end of the Javascript course?</p>[/B]<[/COLOR]p><span style="cursor:pointer"></span>Did my page meet all expected Javascript? </p>
<p style="cursor:pointer" onclick="window.status='Right on! I may someday learn to love it!';return true">Yes!
<p style="cursor:pointer" onclick="window.status='Darn! Please tell me what I am missing?';return true">Almost!</p>
 <div id="footer">Hoping you enjoyed my last assignment...javascript is a struggle!</div>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.