//This is employed because Internet Explorer expects 'className' instead of 'class' when using the setAttribute methodvar classString = navigator.userAgent.indexOf("MSIE") != -1 ? 'className' : 'class';var headlines = 0;var amt = 5;var spd = 50;var hangtime = 5000;var running = false;var intId = 0;var lastone = 0;var current = 1;function rotate(num) {	var last = num - 1;	if (last <= 0) last = headlines;    if (num > headlines) num = 1;	if (running) fade(last,num,0,1);	else fade(last,num,100,1);	running = true;}function fade(last,id,opac,up) {	// Store headlines which we are working with	lastone = last;	current = id;		// If starting out, show cover layer	if (up && !opac) {	  if (document.all) document.all['cover'].style.display = 'block';	  else if (document.getElementById) document.getElementById('cover').style.display = 'block';		}	// If we've hit the top, set to go back down	if (up && opac > 100) {		// Hide old one	  	if (document.all) document.all['headline'+last].style.display = 'none';		else if (document.getElementById) document.getElementById('headline'+last).style.display = 'none';		// Show the new one		if (document.all) document.all['headline'+id].style.display = 'block';		else if (document.getElementById) document.getElementById('headline'+id).style.display = 'block';		intId = setTimeout('fade('+last+','+id+',90,0)',spd);		return;	}		// If we're done, rotate again in x seconds	if (opac < 0) {	  		if (document.all) {			document.all['cover'].style.display = 'none';		}		else if(document.getElementById) {			document.getElementById('cover').style.display = 'none';		}		document.getElementById('tab' +  id).setAttribute(classString,'selected');		document.getElementById('tab' +  last).setAttribute(classString,'');				if (headlines > 1) intId = setTimeout('rotate('+(id+1)+')',hangtime);		return;	}		// Set opacity of cover    if (document.all) document.all['cover'].filters.alpha.opacity = opac;	else if (document.getElementById) document.getElementById('cover').style.MozOpacity = opac/100;		if (up) opac += amt;	else opac -= amt;	intId = setTimeout('fade('+last+','+id+','+opac+','+up+')',spd);}// Stops the rotationfunction stopRotate(){	// Stop the timeout that is running	window.clearInterval(intId);	running = false;	intId=0;		// If were are on IE	if(document.all) {		document.all['headline'+lastone].style.display = 'none';		document.all['cover'].filters.alpha.opacity = 0;		document.all['cover'].style.display = 'none';	}// Or if we are on Mozilla or compatibles	else if(document.getElementById) { 		document.getElementById('headline'+lastone).style.display = 'none';		document.getElementById('cover').style.MozOpacity = 0;		document.getElementById('cover').style.display = 'none';	}	document.getElementById('tab' +  lastone).setAttribute(classString,'');}// Display new picturefunction displayHeadline(id){	// If user wants to display the same picture then do nothing		if(current == id)		return;	removeFocus();	// If rotation is on, stop it 	if(running)		stopRotate();		// Hide old one	if (document.all)		document.all['headline'+current].style.display = 'none';	else if (document.getElementById)		document.getElementById('headline'+current).style.display = 'none';		// Show the new one	document.getElementById('headline'+id).style.display = 'block';	document.getElementById('tab' +  id).setAttribute(classString,'selected');	document.getElementById('tab' +  current).setAttribute(classString,'');		current = id;	rotate(current);}// Display next picturefunction nextHeadline(){	lastone=current;	displayHeadline(current%headlines+1);}// Display previous picturefunction previousHeadline(){	lastone=current;	var newone = current - 1;	if(newone <= 0)		newone = headlines;	displayHeadline(newone);}function removeFocus() {	focusLink = document.getElementById('focusLink');	if (focusLink && !document.all)		focusLink.focus();}