function background() {};

background = new background();
number = 0;
countImages = 6 ;  //total images

// imageArray 
for (var i=1; i < countImages; i++) {
	// keep adding items here...
	background[number++] = "<style type='text/css'>html #header{background:#fff url(images/home/pics/pic0" + i + ".jpg) 0px 0px  no-repeat;}</style>"
	
}

increment = Math.floor(Math.random() * number);
document.write(background[increment]);		