if (document.getElementById) {
	function showfirstnewstab()
	{
		var firstnewstab = document.getElementById('newstab1');
		if (firstnewstab!=null)
		{
			firstnewstab.style.display = 'block';
		}
		for (var i=2; i<=newstabcount; i++)
		{
			var currentnewstab = document.getElementById('newstab' + i.toString());
			if (currentnewstab!=null)
			{
				currentnewstab.style.display = 'none';
				currentnewstabpos = 1;
			}
		}
	}

	function showpreviousnewstab()
	{
		if ((currentnewstabpos-1)>=1)
		{
			var newnewstabposition = currentnewstabpos-1;
			var nextnewstab = document.getElementById('newstab' + newnewstabposition.toString());
			if (nextnewstab!=null)
			{
				hideallnewstabs();
				nextnewstab.style.display = 'block';
				currentnewstabpos = newnewstabposition;
			}
		}
	}

	function shownextnewstab()
	{
		if ((currentnewstabpos+1)<=newstabcount)
		{
			var newnewstabposition = currentnewstabpos+1;
			var nextnewstab = document.getElementById('newstab' + newnewstabposition.toString());
			if (nextnewstab!=null)
			{
				hideallnewstabs();
				nextnewstab.style.display = 'block';
				currentnewstabpos = newnewstabposition;
			}
		}
	}
	
	function showlastnewstab()
	{
		var lastnewstab = document.getElementById('newstab' + newstabcount.toString());
		if (lastnewstab!=null)
		{
			lastnewstab.style.display = 'block';
		}
		for (var i=1; i<newstabcount; i++)
		{
			var currentnewstab = document.getElementById('newstab' + i.toString());
			if (currentnewstab!=null)
			{
				currentnewstab.style.display = 'none';
				currentnewstabpos = newstabcount;
			}
		}
	}

	function hideallnewstabs()
	{
		for (var i=1; i<=newstabcount; i++)
		{
			var currentnewstab = document.getElementById('newstab' + i.toString())
			if (currentnewstab!=null)
			{
				currentnewstab.style.display = 'none';
			}
		}
	}
}