

/* 
Dynamic Images by Kaosweaver
Copyright 2007, All rights reserved
*/
var sS = {
	init:function() {
		d=document; newImg=d.createElement("img");
		newImg.src=sS.imgList[0];newImg.id=sS.obj+"_ss";
		tO=d.getElementById(sS.obj);if (tO) {
		tO.appendChild(newImg);setTimeout("sS.startShow()",sS.tM);}},
	setObj:function(o,t) {sS.obj=o;sS.sT=t;},
	addImg:function() {sS.imgList.push(arguments[0]);},
	startShow:function() {
		x=document.getElementById(sS.obj+"_ss");if (sS.sT==0){sS.sP++;
		if (sS.sP==sS.imgList.length) sS.sP=0;}else{
		var j=parseInt(Math.random()*sS.imgList.length);sS.sP=(isNaN(j))?0:j}
		x.src=sS.imgList[sS.sP];setTimeout("sS.startShow()",sS.tM);},
	addEvent: function(obj,evt, fn) {
		if (obj.addEventListener) {obj.addEventListener(evt, fn, false);
		} else if (obj.attachEvent) {obj.attachEvent('on'+evt, fn);
		} else {obj['on'+evt]=fn;}},
	imgList:[],obj:"",sP:0,sT:0,tM:6000
}
sS.setObj("randomImage",0,6000);
sS.addImg("images/storm/small/storm1_DSC00531.jpg");
sS.addImg("images/storm/small/storm2_DSC00532.jpg");
sS.addImg("images/storm/small/storm3_DSC00533.jpg");
sS.addImg("images/storm/small/storm4_DSC00534.jpg");
sS.addImg("images/storm/small/storm5_DSC00549.jpg");
sS.addImg("images/storm/small/storm6_DSC00550.jpg");
sS.addImg("images/storm/small/storm7_DSC00551.jpg");
sS.addImg("images/storm/small/storm_DHTpic3.jpg");
sS.addImg("images/storm/small/storm_DHTpic4.jpg");
sS.addEvent(window,'load',sS.init);

