/*
* Title: Random Image Script
* Code by Raymond Angana. username: rangana [dynamicdrive.com/forums]
* This notice must remain intact
*/
var rPics=[
'http://kingtan.com.au/images/header/ipod2.jpg', 
'http://kingtan.com.au/images/header/sincity.jpg',
'http://kingtan.com.au/images/header/united_as_one.jpg',
'http://kingtan.com.au/images/header/typography.jpg',
'http://kingtan.com.au/images/header/ipod1.jpg',
'http://kingtan.com.au/images/header/synergy.jpg'// note that the last element in the array dont have comma
]; // Add all the picture variables in this array.

window.onload=function() {
rRandom=Math.floor(Math.random()*rPics.length); // Randomly choose a number
var img=document.createElement('img'); // Create an image element
img.setAttribute('src',rPics[rRandom]); // Set the source of the image
img.className='myimage'; // Set a class name for the image. This is use to style the image via CSS
document.getElementById('headerpic').appendChild(img); // Append the image
}





