
function combine()
{
var x; 	//looping variable 
var newsitems = new Array();//array containing the Newsitems 
							// here we can add new newsitems using + operator between pagename,description & publicationdate
newsitems[0] = "archives_2003_07.html+UTI Venture Funds(UTI Ventures) has picked up a 17.15 percent stake in Strand Geonomics+The Hindu | November 03, 2001";
newsitems[1] = "archives_2003_06.html+ExcelSoft ties up with with UK firm+Economic Times | December 04, 2001";
newsitems[2] = "archives_2003_05.html+UTI Venture to boost funding in IT, Biotech+Economic Times | February 04, 2003";
newsitems[3] = "archives_2003_04.html+Knowledge Systems Pvt Ltd acquires 'Questech India Ltd'+Express Computer | July 29, 2003";
newsitems[4] = "archives_2003_03.html+UTI arm, TDA Cap pick stake in BPO firm+Business Standard | September 03, 2003";
newsitems[5] = "archives_2003_02.html+Four Soft raises Rs 8 crore from UTI, APIDC+Economic Times | November 04, 2003";
newsitems[6] = "archives_2003_01.html+B2K acquires Talisma contact centre business+Economic Times | November 08, 2003";



// add latest Newsitems above this comment separating pagename,description,published date by symbol + as above . 
var subitem; // this array contains splitted items of each newsitem as subitem[0]=pagename, subitem[1]=description, subitem[2]=symbol.
var content = new Array(); // this array contains all the description of the newsitems.
var pagename = new Array(); // this array contains all the pagenames of the newsitems

for(x=newsitems.length-1;x>=0;x--)
{
subitem =(newsitems[x].split('+'));
for(i=0;i<subitem.length;i++)
pagename[x] = subitem[0];
content[x] = subitem[2];
}


var connect ="<span class= 'news_head'>"+"<a href =\"";

<!-- to read the URL path and get the file name i have used the below block -->
var url = unescape(window.location.pathname);
var suburl = url.split('/');  //splitting the url with symbol '/' to find the pagename loaded.
var fname = suburl[suburl.length-1];

for(x=newsitems.length-1;x>=0;x--)
{
subitem =(newsitems[x].split('+'));
for(i=0;i<subitem.length;i++)
var contents = '<p>'
	if(fname==pagename[x])
	{
	
contents = contents+(connect+subitem[0]+"\""+" class='news_head_selected'>"+subitem[1]+"</a></span>");     
	}
else
 	{
contents = contents+(connect+subitem[0]+"\""+" class= 'news_head'>"+subitem[1]+"</a></span>");
	}
contents = contents+('<br>'+"<span class=\"bodytext_press11\">"+content[x]+'</span></p>');
document.write(contents);
}

}





