//pre-load images
var listImg = new Image();
listImg.src = '';
var treeImg = new Image();
treeImg.src = '';
var formImg = new Image();
formImg.src = '';
var autoImg = new Image();
autoImg.src = '';

function makeNews(c,l,f,i){
	this.copy = c;
	this.link = l;
	this.follow = f;
	this.img = i;
	this.write = writeNews;
}

function writeNews(){
	var str = '';
	str += this.copy + '<br>';
        str +=  '<a href="' + this.link + '">' + this.follow + '</a>';
	return str;
}

var newsArray = new Array();
newsArray[0] = new makeNews("<span style='font-size:10px; color: #ce2301;'>hover over to pause rotation</span><h3>Business Torts</h3>Claims of unfair competition frequently spawn litigation between or among business competitors. Allred & Allred, P.C. regularly represents businesses as plaintiffs and defendants in business tort matters bottomed on claims of interference with business or contractual relations, unfair competition and violation of non-compete agreements in the business arena. <div style=float:right; text-align:right; line-height:16px; margin:10px 0 0 0;><a href=/content.asp?id=314055 class=more>All Practice Areas >></a></div>",'','',listImg).write();

newsArray[1] = new makeNews("<span style='font-size:10px; color: #ce2301;'>hover over to pause rotation</span><h3>Motor Carrier Liability</h3>The firm represents numerous motor carriers, both self-insured and under liability insurance policies, in claims involving personal injury, wrongful death or property damage. We regularly represent major truck lines operating nationwide in actions involving alleged negligent operation of commercial vehicles as well as alleged violations of the Federal Motor Carrier Safety Regulations. Claims in the transportation arena frequently involve the potential for significant exposure. With this in mind, the firm has the resources to initiate efforts immediately after an accident to investigate the facts and preserve evidence needed in the event of litigation.<div style=float:right; text-align:right; line-height:16px; margin:10px 0 0 0;><a href=/content.asp?id=314055 class=more>All Practice Areas >></a></div>",'','',treeImg).write();

newsArray[2] = new makeNews("<span style='font-size:10px; color: #ce2301;'>hover over to pause rotation</span><h3>Products Liability</h3>Allred & Allred, P.C. defends manufacturers, distributors, wholesalers and retailers of products in litigation arising from commercial, industrial and consumer claims involving personal injury, brought under the Alabama Extended Manufacturer's Liability Doctrine (AEMLD), or damages to property caused by an allegedly defective product. The firm has experience defending cases involving alleged product design defects and inadequate safeguards as well alleged failure to warn.<div style=float:right; text-align:right; line-height:16px; margin:10px 0 0 0;><a href=/content.asp?id=314055 class=more>All Practice Areas >></a></div>",'','',autoImg).write();

newsArray[3] = new makeNews("<span style='font-size:10px; color: #ce2301;'>hover over to pause rotation</span><h3>Contractor Liability</h3>As the construction industry has become more specialized, it follows that litigation in this arena has become more complex. Allred & Allred, P.C. represents general contractors, subcontractors, architects and civil engineers in claims arising from alleged construction defects. The firm's focus in this practice area includes defense of claims arising from the installation of Exterior Insulation and Finish Systems (EIFS) as well as defense of homeowner warranty claims against homebuilders.<div style=float:right; text-align:right; line-height:16px; margin:10px 0 0 0;><a href=/content.asp?id=314055 class=more>All Practice Areas >></a></div>",'','',formImg).write();

var nIndex = 0;
var timerID = null;
function rotateNews(){
	var len = newsArray.length;
	if(nIndex >= len)
		nIndex = 0;
	document.getElementById('stories').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()', 1000);
	}
}
