Hi there!

I am really really new in Javascript. I am a noob

I want to integrate a slideshow in my site. In the Javascript is a variable for the images array.
the only thing i want to do is:
if the body id is HOME, then the variable should have image1 and image2 for example.
if the body id is TEST, then the variable should have image3 and image4 for example.

First question is, if i use the "document.getElementsByTagName('body')[0];" in this script,
must i include the xxx.js script in the html document IN the body to get it work?
I also tried this, but it wasn't working

my html code:
Code:
...
<script type="text/javascript" src="be_slide.js"></script>
	</head>
	<body id="test">
	
			<div id="slideshow" style="margin-left:15px;margin-top:15px;width:200px;height:200px;">
			<img src="pics/pic01a.jpg" style="width:200px;height:200px;" />
</div>
		</body>
...
The Javascript Code i tried:
Code:
...
var theBody = document.getElementsByTagName('body')[0];
if(theBody === 'test'){
	 var def_imges=new Array ('Maske.jpg', 'Maske2.jpg', 'Maske3.jpg');
	}
...
could you please help me? :/
thank you very very much!