I have an xml file i want to get the value from xml to html

i have an xml file i want to get the value from xml to html i written code but not work
i am getting date,day ,month year but not the message from xml in marquee scrolling so please check and give me correct see in last javascript i have written there only correction required


so my xml file islike
<Company>



<Staff empid="9966">
<month>6</month>
<date>30</date>
<message>jgk</message>
</Staff><Staff empid="8877">
<month>12</month>
<date>25</date>
<message>hjkjk</message>
</Staff><Staff empid="8855">
<month>12</month>
<date>25</date>
<message>hjkjk</message>
</Staff>




<Staff empid="4411">
<month>4</month>
<date>16</date>
<message>"BY the study of different RELIGIONS we find that in essence they are one."</message>
</Staff>


<Staff>
<month>4</month>
<date>15</date>
<message>"The greatest religion is to be true to your own nature. Have faith in yourselves!"</message>
</Staff>


<Staff>
<month>4</month>
<date>14</date>
<message>"All the powers in the universe are already ours. It is we who have put our hands before our eyes and cry that it is dark."</message>
</Staff>


<Staff>
<month>4</month>
<date>13</date>
<message>"The more we come out and do good to others, the more our hearts will be purified, and God will be in them."</message>
</Staff>


<Staff>
<month>4</month>
<date>12</date>
<message>"The world is the great gymnasium where we come to make ourselves strong."</message>
</Staff>


<Staff>
<month>4</month>
<date>11</date>
<message>"The first sign of your becoming religious is that you are becoming cheerful"</message>
</Staff>


<Staff>
<month>4</month>
<date>10</date>
<message>"You cannot believe in God until you believe in yourself."</message>
</Staff>


<Staff>
<month>4</month>
<date>9</date>
<message>"Where can we go to find God if we cannot see Him in our own hearts and in every living being."</message>
</Staff>


<Staff>
<month>4</month>
<date>8</date>
<message>"You have to grow from the inside out. None can teach you, none can make you spiritual. There is no other teacher but your own soul"</message>
</Staff>


<Staff>
<month>4</month>
<date>7</date>
<message>"What is Art? It is the response of man's creative soul to the call of the Real."</message>
</Staff>


<Staff>
<month>4</month>
<date>6</date>
<message>"From the solemn gloom of the temple children run out to sit in the dust, God watches them play and forgets the priest"</message>
</Staff>


<Staff>
<month>4</month>
<date>5</date>
<message>"The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence."</message>
</Staff>


<Staff>
<month>4</month>
<date>4</date>
<message>"Bigotry tries to keep truth safe in its hand with a grip that kills it."</message>
</Staff>


<Staff>
<month>4</month>
<date>3</date>
<message>"Everything comes to us that belongs to us if we create the capacity to receive it."</message>
</Staff>


<Staff empid="2279">
<month>4</month>
<date>2</date>
<message>"He who is too busy doing good finds no time to be good."</message>
</Staff>


<Staff>
<month>4</month>
<date>1</date>
<message>"Let me light my lamp", says the star, "And never debate if it will help to remove the darkness.</message>
</Staff>


<Staff> <month>3</month>
<date>31</date>
<message>"The flower which is single need not envy the thorns that are numerous."</message>
</Staff>


<Staff>
<month>3</month>
<date>30</date>
<message>"To be outspoken is easy when you do not wait to speak the complete truth."</message>
</Staff>


<Staff>
<month>3</month>
<date>29</date>
<message>"In Art, man reveals himself and not his objects."</message>
</Staff>


<Staff>
<month>3</month>
<date>28</date>
<message>"By plucking her petals, you do not gather the beauty of the flower."</message>
</Staff>


<Staff>
<month>3</month>
<date>27</date>
<message>"Depth of friendship does not depend on length of acquaintance."</message>
</Staff>


<Staff>
<month>3</month>
<date>26</date>
<message>"The butterfly counts not months but moments, and has time enough."</message>
</Staff>


<Staff>
<month>3</month>
<date>25</date>
<message>"Don't limit a child to your own learning, for he was born in another time."</message>
</Staff>


<Staff>
<month>3</month>
<date>24</date>
<message>"Facts are many, but the truth is one."</message>
</Staff>


<Staff>
<month>3</month>
<date>23</date>
<message>"Music fills the infinite between two souls"</message>
</Staff>


<Staff>
<month>3</month>
<date>22</date>
<message>"Imagination is more important than knowledge"</message>
</Staff>


<Staff>
<month>3</month>
<date>21</date>
<message>"You can't cross the sea merely by standing and staring at the water."</message>
</Staff>


<Staff>
<month>3</month>
<date>20</date>
<message>"Somebody must play the bad parts in this world, on and off the stage"</message>
</Staff>

<Staff>
<month>3</month>
<date>19</date>
<message>"First say to yourself what you would be"</message>
</Staff>


<Staff>
<month>3</month>
<date>18</date>
<message>"Happy are those who dream dreams and are ready to pay the price to make them come true."</message>
</Staff>


<Staff>
<month>3</month>
<date>17</date>
<message>"The more difficulties one has to encounter, within and without, the more significant and the higher in inspiration his life will be."</message>
</Staff>


<Staff>
<month>3</month>
<date>16</date>
<message>"Where can we go to find God if we cannot see Him in our own hearts and in every living being"</message>
</Staff>


<Staff>
<month>3</month>
<date>15</date>
<message>" Happy are those who dream dreams and are ready to pay the price to make them come true."</message>
</Staff>


<Staff>
<month>3</month>
<date>14</date>
<message>" Patriotism is not enough. I must have no hatred or bitterness towards anyone"</message>
</Staff>

and my html code using java script is
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<meta http-equiv="refresh" content="3600" />


<script type="text/javascript">

calendar = new Date();
day = calendar.getDay();
month = calendar.getMonth();
date = calendar.getDate();
year = calendar.getYear();
if (year < 1000)
year += 1900
cent = parseInt(year / 100);
g = year % 19;
k = parseInt((cent - 17) / 25);
i = (cent - parseInt(cent / 4) - parseInt((cent - k) / 3) + 19 * g + 15) % 30;
i = i - parseInt(i / 28) * (1 - parseInt(i / 28) * parseInt(29 / (i + 1)) * parseInt((21 - g) / 11));
j = (year + parseInt(year / 4) + i + 2 - cent + parseInt(cent / 4)) % 7;
l = i - j;
emonth = 3 + parseInt((l + 40) / 44);
edate = l + 28 - 31 * parseInt((emonth / 4));
emonth--;
var dayname = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
var monthname = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");


//-->
</script>


<script type="text/javascript">
var xmlDoc = null;
if (window.ActiveXObject) {
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
}
else if (document.implementation.createDocument) {
xmlDoc = document.implementation.createDocument("", "", null);
}
else {
alert('Browser cannot handle this script');
}
if (xmlDoc != null) {
xmlDoc.async = false;
xmlDoc.onload("emp3.xml");

var x = xmlDoc.getElementsByTagName("company");
var i;

}
</script>


<script type="text/javascript">
window.onload = function () {
// this will hide the scroll bar
document.getElementsByTagName("body")[0].style.overflow = "hidden";
}

</script>


<style>
marquee { font-family:arial; color:#ffffff; font-weight:bold; font-size:54px; text-align:left; height: 100px; padding-top:25px; border: 2px white solid}
.logo { font-family:arial; color:#ffffff; font-size:45px; text-align:left; height: 100px; padding-top:2px; border: 2px white solid}
.auto-style1 {
width: 792px;
height: 842px;
margin-right: 93px;
margin-bottom: 0px;
}
.auto-style2 {
height: 858px;
width: 247%;
margin-bottom: 0px;
margin-right: 143px;
}
</style>

</HEAD>


<BODY leftMargin='0' topMargin='0' rightmargin ='0' bgcolor="#000000">
<table border='00' align="left" class="auto-style1">
<tr>
<td align="center" colspan='2' valign="top">


<script language="javascript" type="text/javascript">
var slideimages = new Array()
var slidelinks = new Array()

var currentTime = new Date()
var day = currentTime.getDay()
var date = currentTime.getDate()
function slideshowimages() {
for (i = 1, j = 0; i < slideshowimages.arguments.length; i++) {
if (i <= 9 || i - 9 == date) {
slideimages[j] = new Image()
slideimages[j].src = slideshowimages.arguments[i - 1]
j++
}
}
}

//-->
</script>
<a href="javascript:gotoshow()"><img src="ektha1.jpg" name="slide" border=0 class="auto-style2"></a>
<script type="text/javascript">
<!--

//configure the paths of the images, plus corresponding target links
slideshowimages("my file images")
//configure the speed of the slideshow, in miliseconds
var slideshowspeed = 1000

var whichlink = 0
var whichimage = 0
function slideit() {
if (!document.images)
return
document.images.slide.src = slideimages[whichimage].src
whichlink = whichimage
if (whichimage < slideimages.length - 1) {
whichimage++
}
else
whichimage = 0
setTimeout("slideit()", slideshowspeed)
}
slideit()
//-->
</script>

<td valign="top" hspace=10 vspace=10>
<script type="text/javascript">
var months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
var thetime = new Date();
var themonth = thetime.getMonth();
var theday = thetime.getUTCDate();



//imageView.image= null;
//myimage.onerror = function() { this.style.visibility = 'hidden'; }
var m = '<img src="' + months[themonth] + '' + theday + '.jpg">';
document.write(m);
document.write(theday);

if (m.exists)
document.write('<img src=' + months[themonth] + '' + theday + '.jpg" alt="Image of the month: ' + months[themonth] +' width="150" height="150" />');

(function () {

var allimgs = document.images;

for (var i = 0; i < allimgs.length; i++) {

allimgs[i].onerror = function () {

this.style.visibility = "hidden"; // other elements not affected

}

}

})();


//document.write('<html><body>');
//document.write('<br/>');
//document.write('<img src="bday6.jpg" width="270" height="300" />');
</script>
<head>
<meta http-equiv="refresh" content="800" />
</head>

</td>
</tr>
<tr>
<td height = '100px' bgcolor='#000055' border =0 class='logo'> ektha</td>

<td><marquee style="font-family:arial; color: #FFFFFF; width: 240%; height: 135px; margin-left: 0px;" bgcolor="#990000" scrollamount="20">

<script type="text/javascript">



//var x = document.getElementById("staff").getAttribute("message");


document.write(dayname[day] + ", ");
document.write(monthname[month] + " ");
document.write(date + ", ");
document.write(year + ",");
document.write(x + "");






//xmlDoc = loadXMLDoc("emp3.xml");
//x = xmlDoc.getElementsByTagName('company');


//for (i = 0; i < x.length; i++) {
// document.write(x[i].getAttributeNode('message').nodeValue);
// document.write("<br>");
//}


i = 0;
for (i = 0; i < x.length; i++) {
//alert(i);
//alert(month);
var x = null;
var y = null;
var z = null;
var Z = null;
var d = new Date();
var monthNumber = d.getMonth() + 1;
var nodes = xmlDoc.getElementsByTagName("staff");
for (j = 0; j < nodes.length; j++) {

x = xmlDoc.getElementsByTagName("month")[j]
y = x.childNodes[0];
z = xmlDoc.getElementsByTagName("date")[j]
Z = z.childNodes[0];

if (monthNumber == y.nodeValue) {
if (date == Z.nodeValue)
var message = xmlDoc.getElementsByTagName("message").item[0];
var Message = message.childNodes[0];
document.write(getAttribute('message'));
}

}
}




// January

</SCRIPT>


</td></marquee>
</tr>
</table>

</BODY>
</HTML>