function makeNews(image,newsid,newsimages){
      this.newsid = newsid;
	this.newsimages = newsimages;
	this.img = image;
	this.write = writeNews;
}

function writeNews(){
	var str = '';

      str += '<div style="position: relative;"><a href=http://www.fyc-pro.com/index.php?page=news&nid=' + this.newsid + '>';
      str += '<img border=0 width=611 height=194 src=http://www.fyc-pro.com/images/news/' + this.img + '></a></div>';
      str += '<div style="float: left; position: relative; z-index: 2; margin: -185px 0 0 10px; display: inline;">';
	str += this.newsimages;
      str += '</div>';
	return str;
}

var nIndex = 0;
var timerID = null;
var numSel = null;
function rotateNews(numSel){
	var len = newsArray.length;

if (numSel != null) {
	nIndex = numSel;
}
	if(nIndex >= len)
		nIndex = 0;
	document.getElementById('latestnews').innerHTML = newsArray[nIndex];
	nIndex++;
	timerID = setTimeout('rotateNews()',6000);
}
function pauseNews() {
	if (timerID != null) {
		clearTimeout(timerID);
		timerID = null;
	}
}

function playNews() {
	if (timerID == null) {
		timerID = setTimeout('rotateNews()', 6000);
	}
}

