
var news	= new Array();

news[0] = "<a href=javascript:openchildwindownews('news/adviceamerica-fiserv.html')>AdviceAmerica joins the Fiserv organization, the leading global provider of financial services technology solutions.</a> D-June 7, 2010";

news[1] = "<a href=javascript:openchildwindownews('news/adviceamerica-new-location.html')>New Silicon Valley Location Accommodates Company Growth, Larger In-house Datacenter.</a> D-August 28, 2009";

news[2] = "<a href=javascript:openchildwindownews('news/Metavante-News-Release.html')>Metavante and Adviceamerica team to enable delivery of Planning-centric WMS.</a> D- August 10, 2009";

news[3]		= "<a href=javascript:openchildwindownews('news/AdvisorVision_7.html')>AdviceAmerica Introduces AdvisorVision 7 Comprehensive Financial Planning System  </a> D- April 28, 2009";

news[4]		= "<a href=javascript:openchildwindownews('news/ClientVision-pr.html')>AdviceAmerica Announces New ClientVision</a>D- February 10, 2009";

news[5]		= "<a href=javascript:openchildwindownews('news/news_av_india_version.html')>AdviceAmerica Announces New Indian Version of AdvisorVision</a>D- August 18, 2008";

news[6]		= "<a href=javascript:openchildwindownews('news/news_advisorvision_version_6.html')>AdviceAmerica Announces New Major Release of its Flagship Product Line</a>D-  August 01, 2008";

news[7]		= "<a href=javascript:openchildwindownews('news/Retirement_Express.html')>AdviceAmerica Announces New Retirement Express Platform</a> D- May 20, 2008";


var news_pnt= -1;
var mouse_flag	= 1;

var len	= news.length;
var cur_news	= news_pnt;
function previousnews()
{	
	if(cur_news==0)
	{
		cur_news	= len-1;
	}
	else
	{
		cur_news	= cur_news-1;
	}	
	
	txt		= news[cur_news];
	var dat	= txt.search(/D-/);
	var news_head	= txt.substring(0,dat);
	var date_head	= txt.substring(dat+2);
	
	var news_area		= document.getElementById('news_section');
	if (news_area != null)
	news_area.innerHTML	= news_head;
	if (news_area != null)
	var date_section		= document.getElementById('date_section');
	date_section.innerHTML	= date_head;
}

function nextnews(flg)
{
	if(cur_news==len-1)
	{
		cur_news	= 0;
	}
	else
	{
		cur_news	= cur_news+1;
	}
	txt		= news[cur_news];
	var dat	= txt.search(/D-/);
	var news_head	= txt.substring(0,dat);
	var date_head	= txt.substring(dat+2);
	
	if(flg==0)
	{
		if(mouse_flag==0) return;
	}
	
	var news_area		= document.getElementById('news_section');
	if (news_area != null)
	news_area.innerHTML	= news_head;
	if (news_area != null)

	var date_section		= document.getElementById('date_section');
	date_section.innerHTML	= date_head;
}

function sleep(num)
{
	for(i=0;i<num;i++)
	{
		;
	}
}
function Func1()
{
	if(mouse_flag==1)
		setTimeout("nextnews(0)", 1000);

	setTimeout("Func1()", 3000);
}
Func1();

// arrow changes//





function Selectlink(id)
{
	//document.getElementById(id).style.backgroundImage = "url(images/link_bg1.gif)";
document.getElementById(id).style.color = "#464444";	

	if(id == "allnews_TD")
		ChangeArrowImagetoRed('allnews_TDIMG');
	
}
function UnSelect(id)
{
			
	//alert("here");
	//document.getElementById(id).style.backgroundImage = "url(images/menuline1.gif)";
	document.getElementById(id).style.color = "#000000";
	
	
}

function UnSelectlink(id)
{
	//alert("here");
	
	
	//var url = document.URL;
	//var anchorNo = url.split("#")[1];
	
	//if(id == "allnews_TD")
		ChangeArrowImagetoNormal('allnews_TDIMG');
		
	
	
//	document.getElementById(id).style.backgroundImage = "url(images/link_bg2.gif)";
	document.getElementById(id).style.color = "#000000";		
		
}

function ChangeArrowImagetoRed(imgId)
{
	//alert("here");
		var imgSrc = document.getElementById(imgId).src;
		imgSrc = imgSrc.replace(/ar2.gif/, "ar2down.gif");
		document.getElementById(imgId).src = imgSrc;	
}

function ChangeArrowImagetoNormal(imgId)
{
		var imgSrc = document.getElementById(imgId).src;
		imgSrc = imgSrc.replace(/ar2down.gif/, "ar2.gif");
		document.getElementById(imgId).src = imgSrc;	
}

