function slideImgNews(slidePic,picLink,introBar,sampleList){
	this.speed = 40000;
	this.imgIndex = 0;
	this.pause = false;
	this.timer = null;
	this.slidePic = this.get(slidePic);
	this.slideLink = this.get(picLink);
	this.introBar = this.get(introBar); 
	this.slideItems = this.get(sampleList).getElementsByTagName('li');
	this.lastSelected = this.slideItems[0];
	this.slide();
	this.change();
}
slideImgNews.prototype.get = function(id){
	if(!document.getElementById){
		return false;
	}
	else{
		if(typeof id === 'string'){
			return document.getElementById(id);
		}
		else{
			return id;
		}
	}
}
slideImgNews.prototype.slide = function(){
	var that = this;
	var length = that.slideItems.length, i;
	var slide = function(){
		if (!that.pause) {
			that.imgIndex++;
			if (that.timer) {
				clearTimeout(that.timer);
			}
			if (that.imgIndex > (length - 1)) {
				that.imgIndex = 0;
			}
			that.lastSelected.className = "";
			that.slidePic.src = that.slideItems[that.imgIndex].getElementsByTagName('img')[0].src;
			that.slideLink.href = that.slideItems[that.imgIndex].getElementsByTagName('a')[0].href;
			that.introBar.innerHTML = that.slideItems[that.imgIndex].getElementsByTagName('img')[0].alt;
			that.slideItems[that.imgIndex].className = "current";
			that.lastSelected = that.slideItems[that.imgIndex];
			that.timer = setTimeout(slide, that.speed);
		}
		else{
			that.timer = setTimeout(slide, 1000);
			return false;
		}
	}
	setTimeout(slide, that.speed);
}
slideImgNews.prototype.change = function(){
	var that = this;
	var i, length = this.slideItems.length;
	for (i = 0; i < length; i++) {
		this.slideItems[i].onmouseover = function(index){
			return function(){
				that.lastSelected.className = "";
				that.slidePic.src = this.getElementsByTagName('img')[0].src;
				that.slideLink.href = this.getElementsByTagName('a')[0].href;
				that.introBar.innerHTML = this.getElementsByTagName('img')[0].alt;
				this.className = "current";
				that.lastSelected = this;
				that.imgIndex = index;
				that.pause = true;
			}
		}(i);
		this.slideItems[i].onmouseout = function(){
			that.pause = false;
		}
	}
}