// JavaScript Document
			var langWin=null;
			var changeLink_req=null;
			var lang_sel="";
			var lang_id="";
			function getDocElement(id)
			{	try
				{	if(document.getElementById(id)!=null) return document.getElementById(id);
				}catch(e){alert("problem in accessing "+id);}
			}
			function changeNews(changeLocation)
			{
				sendData_req=null;
				//alert("changeLocation= "+changeLocation);
				getUpdatedNews(changeLocation); 
			}
			function change_news_links()
			{
				var lang_id1=getDocElement("lang_selection");
				lang_id=lang_id1.options[lang_id1.selectedIndex].value;
				lang_sel=lang_id1.options[lang_id1.selectedIndex].innerText;
				var url = "/GeezeMail/ClientNewsUpdater?changeLinks=yes&lang_id="+lang_id +"&time="+ new Date().getTime();
				var meth="GET";
				
				if(window.XMLHttpRequest) 
				{					
					try
					{
						changeLink_req = new XMLHttpRequest();					
						
					}
					catch(e)
					{
						changeLink_req=null;
						alert("problem in creating changeLink_req obj");
					}
					
					if(changeLink_req!=null)
					{
						try
						{
							changeLink_req.open(meth, url, true);				//opens a POST connection with specified url asynchronously
							changeLink_req.onreadystatechange = ChangeLinks;				// function to call when ready state changes.
							changeLink_req.send(null);			// Send the request with data.
							//alert("Requesting page");
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
				else if(window.ActiveXObject) 
				{ 
					try
					{
						changeLink_req = new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(e)
					{
						changeLink_req=null;
						alert("problem in creating changeLink_req obj");
					}
					
					if(changeLink_req!=null)
					{
						try
						{
							changeLink_req.open(meth, url, true);				//opens a POST connection with specified url asynchronously
							changeLink_req.onreadystatechange = ChangeLinks;				// function to call when ready state changes.
							changeLink_req.send(null);			// Send the request with data.
							//alert("Requesting page");
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
			}
			function ChangeLinks() 
			{
				if(changeLink_req.readyState == 4)												// compaire with current ready state value.
				{ 
					if(changeLink_req.status == 200)											// status=200 represents sucessful signal
					{
						
						data="<"+lang_id+"`"+lang_sel+">"+changeLink_req.responseText;
						//alert("In ChangeLinks="+data);
						updateLinks(data);
					}
					else
					{
						alert("Problem:changeLink_req response " + changeLink_req.statusText);
					}
				}
			}
			function updateLinks(data)
			{
					try{
					var returnFunc = window.dialogArguments;	// Getting the middle arguments from the mail window (compose page)
					window.close();
					returnFunc(data);			// pname: Button Name, pid: Button Id
					}catch(e){alert("problem in updateLinks");}
			}
			
			//***********************************************************************//
			
	var news_full=null;
	var brief = null;
	var f_div = null;
	var read_ch = null;
	var short_news = null;
	var read_style = null;
	
	
	function showfull_new(full_news,news_div,r_more,brief_news, font_ass, read_m)
	{
		document.getElementById("news_status").value=""+"full_nes";
		document.getElementById("brief_news").value=""+brief_news;
		document.getElementById("full_news").value=""+full_news;
		document.getElementById("news_div").value=""+news_div;
		document.getElementById("r_more").value=""+r_more;
		document.getElementById("font_ass").value=""+font_ass;
		document.getElementById("read_m").value=""+read_m;
	try
	{
	if(brief != null)
	{
		
		var news_desc2 = getDOCElement(f_div).innerHTML;
		
		var chname2=getDOCElement(f_div);
		var newDiv2 = document.createElement("div");
		chname2.innerHTML="";
		newDiv2.innerHTML= brief;
		if(chname2!=null)
		chname2.appendChild(newDiv2);
		
	var minim_value2 = getDOCElement(read_ch).innerHTML;		
	var minim2 = getDOCElement(read_ch);
	var newDiv3 = document.createElement("div");
	minim2.innerHTML="";
	newDiv3.innerHTML= "<a id='read_more' class='"+font_ass+"' href='javascript://' onClick=\"showfull_new(\'"+news_full+"\',\'"+f_div+"\',\'"+read_ch+"\',\'"+short_news+"\',\'"+font_ass+"\',\'"+read_style+"\')\">"+read_style+"<strong>+</strong></a>";
	if(minim2!=null)
	minim2.appendChild(newDiv3); 	
	read_ch = null;
	f_div = null;
	brief = null;
	short_news = null;
	read_style = null;
	}
	
	
	var news_desc = getDOCElement(news_div).innerHTML;
		
	var chname=getDOCElement(news_div);
	var newDiv = document.createElement("div");
	chname.innerHTML="";
	
	var news_full_dis=unescape(full_news);
	
	newDiv.innerHTML= news_full_dis;
		if(chname!=null)
			chname.appendChild(newDiv);
			
	var minim_value = getDOCElement(r_more).innerHTML;		
	var minim = getDOCElement(r_more);
	var newDiv1 = document.createElement("div");
	minim.innerHTML="";
	newDiv1.innerHTML= "<a id='read_more' class='"+font_ass+"' href='javascript://' onClick=\"showbrief_news(\'"+brief_news+"\',\'"+full_news+"\',\'"+news_div+"\',\'"+r_more+"\',\'"+font_ass+"\',\'"+read_m+"\')\">"+read_m+"<strong>-</strong></a>";
		if(minim!=null)
			minim.appendChild(newDiv1); 	
	var foc = news_div.split("news");
	window.location.hash = foc[1]; 
	read_ch = r_more;
	f_div = news_div;
	brief = news_desc;
	news_full = full_news;
	short_news = brief_news;
	read_style = read_m;
	}
	catch(e)
	{}
}

	function showbrief_news(news_brief,full_news,news_div,r_more,font_ass,read_m)
	{
		document.getElementById("news_status").value=" ";
	try
	{
	var news_desc = getDOCElement(news_div).innerHTML;
	
	var chname=getDOCElement(news_div);
	var newDiv = document.createElement("div");
	chname.innerHTML="";
	
	var news_brief_dis=unescape(news_brief);
	
	newDiv.innerHTML= news_brief_dis;
		if(chname!=null)
			chname.appendChild(newDiv);
			
	var minim_value = getDOCElement(r_more).innerHTML;		
	var minim = getDOCElement(r_more);
	var newDiv1 = document.createElement("div");
	minim.innerHTML="";
	newDiv1.innerHTML= "<a id='read_more' class='"+font_ass+"' href='javascript://' onClick=\"showfull_new(\'"+full_news+"\',\'"+news_div+"\',\'"+r_more+"\',\'"+news_brief+"\',\'"+font_ass+"\',\'"+read_m+"\')\">"+read_m+"<strong>+</strong></a>";
		if(minim!=null)
			minim.appendChild(newDiv1); 	
			
			var foc = news_div.split("news");
		    window.location.hash = foc[1]; 
	}
	catch(e)
	{}
}
			
			//***********************************************************************//
			
			var sendData_req=null;
			var actualloc = null;
			function getUpdatedNews(changeLocation) 
			{
				//alert("updating news for="+changeLocation);
				actualloc=changeLocation;
				var total = getDocElement("display_value").value;
				var display_value = getDocElement("display_value").value;
				var url = "/GeezeMail/ClientNewsUpdater?news_location="+changeLocation +"&total="+total+"&display_value="+display_value+"&news_update=yes&time="+ new Date().getTime();
				var meth="GET";
				if(window.XMLHttpRequest) 
				{					
					try
					{
						sendData_req = new XMLHttpRequest();					
						
					}
					catch(e)
					{
						sendData_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(sendData_req!=null)
					{
						try
						{
							sendData_req.open(meth, url, true);				//opens a POST connection with specified url asynchronously
							sendData_req.onreadystatechange = loadPage;				// function to call when ready state changes.
							sendData_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
				else if(window.ActiveXObject) 
				{
					try
					{
						sendData_req = new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(e)
					{
						sendData_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(sendData_req!=null)
					{
						try
						{
							sendData_req.open(meth, url, true);				//opens a POST connection with specified url asynchronously
							sendData_req.onreadystatechange = loadPage;				// function to call when ready state changes.
							sendData_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
			}
			function loadPage() 
			{
				if(sendData_req.readyState == 4)												// compaire with current ready state value.
				{ 
					if(sendData_req.status == 200)											// status=200 represents sucessful signal
					{
						
						try{
						var topstories   =getDocElement("TopStories");
						var topstory   =getDocElement("TopStor_head");
						var politics	 =getDocElement("Politics");
						var business     =getDocElement("Business");
						var international=getDocElement("International");
						var	development  =getDocElement("Developement");
						var sports		 =getDocElement("Sports");
						var advertise    =getDocElement("Advertise");
						var catagories = null;
						var catagory_link = null;
						
						var update=sendData_req.responseText;
						update=update.split("'A.KFetchHeading'");
						if(update[1] != undefined)
						{
							
						catagories=update[1].split('`');
						catagory_link=update[1].split('~');
						
							for(var i=1; i<8; i++)
							{
								
								var temp_val = catagory_link[i].split('*');
								if(temp_val[0] != "undefined")
								{
									getDocElement(temp_val[0]+"_value").value = ""+temp_val[1];
								}
							}
							
						//**** Set Headings*******************************************
						try{
							
						var news_div = topstory;
						var newdiv=document.createElement("headdiv");
						var head = unescape(update[0]);
						var head_date = head.split("'current_date_news'");
						var set_date_value = head_date[1].split("new_current_date_set'");
						set_date_value = set_date_value[1].split("'setlocationinnewsjsp'");
						document.getElementById("current_date").value=""+set_date_value[0];
						document.getElementById("set_news_location").value=""+set_date_value[1];
						var date_dis = head_date[1].split(">");
						date_dis = date_dis[1].split("<");
						if(set_date_value[1] != "null")
						{
							if(set_date_value[0] != 0)
							{
							newdiv.innerHTML=""+"<div class='main_headlines_style' style='font-size:10pt;'><div class='news_head_date'><div class='heading_style'><font class='head_heading'>Todays News Headlines</font>  <font class='head_date'>Date: "+date_dis[0]+"</font></div></div><div class='news_sechead_style'>"+head_date[0]+"<div class='nextheadlines'> <a href='javascript://' onClick=\"getNextHeadlines()\">next &#9658;</a></div></div></div>";
							}
							else
							{
							newdiv.innerHTML=""+"<div class='main_headlines_style' style='font-size:10pt;'><div class='news_head_date'><div class='heading_style'><font class='head_heading'>Todays News Headlines</font>  <font class='head_date'>Date: "+date_dis[0]+"</font></div></div><div class='news_sechead_style'>"+head_date[0]+"<div class='nextheadlines'> </div></div></div>";
						}
						}
						
						news_div.innerHTML="";
						news_div.appendChild(newdiv);
						}
						catch(e)
						{alert("Exception in show heading = "+e);
							}
						}
						else
						{
							
						var update=sendData_req.responseText;
						catagories=update.split('`');
						catagory_link=update.split('~');
						}
						//***********************************************
						var one = catagory_link[1].split('*');
						append_news_data(topstories,catagories[0],one[0]);
						var two = catagory_link[2].split('*');
						append_news_data(politics,catagories[1],two[0]);
						var three = catagory_link[3].split('*');
						append_news_data(business,catagories[2],three[0]);
						var four = catagory_link[4].split('*');
						append_news_data(development,catagories[3],four[0]);
						var five = catagory_link[5].split('*');
						append_news_data(international,catagories[4],five[0]);
						var six = catagory_link[6].split('*');
						append_news_data(sports,catagories[5],six[0]);
						var seven = catagory_link[7].split('*');
						append_news_data(advertise,catagories[6],seven[0]);
						
						
						}catch(e){alert("No news available");}
						
					}
					else
					{
						alert("Problem:sendData_req response " + sendData_req.statusText);
					}
				}
			}
			
			
			var search_req=null;
			function searchDisplay()
			{
				var tf=getDocElement("tf").value;
				var url = "/GeezeMail/ClientNewsUpdater?tf="+tf+"&time="+ new Date().getTime();
				var meth="GET";
				if(window.XMLHttpRequest) 
				{					
					try
					{
						search_req = new XMLHttpRequest();					
						
					}
					catch(e)
					{
						search_req=null;
						alert("problem in creating search_req obj");
					}
					
					if(search_req!=null)
					{
						try
						{
							search_req.open(meth, url, true);				
							search_req.onreadystatechange = appendResults;				// function to call when ready state changes.
							search_req.send(null);			// Send the request with data.
							//alert("Requesting page");
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
				else if(window.ActiveXObject) 
				{
					// For IE browser
					try
					{
						search_req = new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(e)
					{
						search_req=null;
						alert("problem in creating search_req obj");
					}
					
					if(search_req!=null)
					{
						try
						{
							search_req.open(meth, url, true);				
							search_req.onreadystatechange = appendResults;				// function to call when ready state changes.
							search_req.send(null);			// Send the request with data.
							//alert("Requesting page");
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
			}
			function appendResults()
			{
					if(search_req.readyState == 4)												// compaire with current ready state value.
					{ 
						if(search_req.status == 200)											// status=200 represents sucessful signal
						{
							var mydiv=getDocElement("new_modules");
							mydiv.innerHTML="";
							try
							{
								mydiv.innerHTML=search_req.responseText;
							}
							catch(e)
							{alert("problem in appending......"+e);}
						}
						else{alert("Problem:"+search_req.status);}
					}
			}
			function append_news_data(news_div,catag_no,cate_link)
			{
				try{
					var next_link = "<div  class='nextbutton'><a href='javascript://' onClick=\"javascript:getNextNews('"+actualloc+"','"+cate_link+"','"+news_div+"')\"> next &#9658;</a></div>";
					var newdiv=document.createElement("div");
					document.getElementById("Particular_news").innerHTML="";
					document.getElementById("Particular_news").style.display="none";
					
					if(news_div != null && news_div.innerHTML != "")
					{
						news_div.innerHTML = "";
					}
					
					if(cate_link != "undefined")
					{
						newdiv.innerHTML=""+catag_no+next_link;
					}
					else
					{
						newdiv.innerHTML=""+catag_no;	
					}
					//news_div.innerHTML="";
					news_div.appendChild(newdiv);

					
					}catch(e){("Problem in processing news")};
			}

// *****************************************************************

var next_news_req=null
var actuallocnext = null;
var category_div=null;
var cata_div_id = null;

			function getNextNews(changeLocation, news_div, tab_lab) 
			{
				
			news_full=null;
			brief = null;
			f_div = null;
			read_ch = null;
			short_news = null;
			read_style = null;
			document.getElementById("news_status").value=" ";
			
				category_div = tab_lab;
				actuallocnext=changeLocation;
				cata_div_id = news_div;
				var total = getDocElement("display_value").value;
				var display_value = getDocElement(news_div+"_value").value;
				
				var url = "/GeezeMail/ClientNewsUpdater?news_location="+changeLocation +"&news_div="+news_div+"&total="+total+"&display_value="+display_value+"&next_news_update=yes&time="+ new Date().getTime();
				var meth="GET";
				
				if(window.XMLHttpRequest) 
				{					
					try
					{
						next_news_req = new XMLHttpRequest();					
						
					}
					catch(e)
					{
						next_news_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(next_news_req!=null)
					{
						try
						{
							next_news_req.open(meth, url, true);				//opens a POST connection with specified url asynchronously
							next_news_req.onreadystatechange = getNextNewsRes;				// function to call when ready state changes.
							next_news_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
				else if(window.ActiveXObject) 
				{
					try
					{
						next_news_req = new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(e)
					{
						next_news_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(next_news_req!=null)
					{
						try
						{
							next_news_req.open(meth, url, true);				//opens a POST connection with specified url asynchronously
							next_news_req.onreadystatechange = getNextNewsRes;				// function to call when ready state changes.
							next_news_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
			}
			function getNextNewsRes() 
			{
				if(next_news_req.readyState == 4)												// compaire with current ready state value.
				{ 
					if(next_news_req.status == 200)											// status=200 represents sucessful signal
					{
						try{
						document.getElementById("Particular_news").innerHTML="";
						document.getElementById("Particular_news").style.display="none";
						var update=next_news_req.responseText;
						var catagory_link=update.split('~');
						
						var temp_val = catagory_link[1].split('*');
						var next = update.split('|');
						var next = next[1].split('/');
												
						if(temp_val[0] != "undefined" && temp_val[0] != "")
								{
									getDocElement(temp_val[0]+"_value").value = ""+temp_val[1];
								}
						
						var one = catagory_link[1].split('*');
						append_newsnext(cata_div_id,catagory_link[0],one[0],next[1]);
						
						}catch(e){alert("problem in updating news in catagories");}
						
					}
					else
					{
						alert("Problem:sendData_req response " + sendData_req.statusText);
					}
				}
			}

//*************************************************************************************************//


// *****************************************************************

var prev_news_req=null
var prev_actuallocnext = null;
var prev_category_div=null;
var prev_cata_div_id = null;

			function getPrevNews(changeLocation, news_div, tab_lab) 
			{
				
			news_full=null;
			brief = null;
			f_div = null;
			read_ch = null;
			short_news = null;
			read_style = null; 
			document.getElementById("news_status").value=" ";
			
				prev_category_div = tab_lab;
				prev_actuallocnext=changeLocation;
				prev_cata_div_id = news_div;
				var total = getDocElement("display_value").value;
				var display_value = getDocElement(news_div+"_value").value;
				
				var url = "/GeezeMail/ClientNewsUpdater?news_location="+changeLocation +"&news_div="+news_div+"&total="+total+"&display_value="+display_value+"&prev_news_update=yes&time="+ new Date().getTime();
				var meth="GET";
				
				if(window.XMLHttpRequest) 
				{					
					try
					{
						prev_news_req = new XMLHttpRequest();					
						
					}
					catch(e)
					{
						prev_news_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(prev_news_req!=null)
					{
						try
						{
							prev_news_req.open(meth, url, true);				//opens a POST connection with specified url asynchronously
							prev_news_req.onreadystatechange = getPrevNewsRes;				// function to call when ready state changes.
							prev_news_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
				else if(window.ActiveXObject) 
				{
					try
					{
						prev_news_req = new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(e)
					{
						prev_news_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(prev_news_req!=null)
					{
						try
						{
							prev_news_req.open(meth, url, true);				//opens a POST connection with specified url asynchronously
							prev_news_req.onreadystatechange = getPrevNewsRes;				// function to call when ready state changes.
							prev_news_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
			}
			function getPrevNewsRes() 
			{
				if(prev_news_req.readyState == 4)												// compaire with current ready state value.
				{ 
					if(prev_news_req.status == 200)											// status=200 represents sucessful signal
					{
						try{
						document.getElementById("Particular_news").innerHTML="";
						document.getElementById("Particular_news").style.display="none";
						var update=prev_news_req.responseText;
						var catagory_link=update.split('~');
						
						var temp_val = catagory_link[1].split('*');
						var next = update.split('|');
						var next = next[1].split('/');
												
						if(temp_val[0] != "undefined" && temp_val[0] != "")
								{
									getDocElement(temp_val[0]+"_value").value = ""+temp_val[1];
								}
						
						var one = catagory_link[1].split('*');
						append_newsnext(prev_cata_div_id,catagory_link[0],one[0],next[1]);
						
						}catch(e){alert("problem in updating news in catagories");}
						
					}
					else
					{
						alert("Problem:sendData_req response " + sendData_req.statusText);
					}
				}
			}



//*************************************************************************************************//

function append_newsnext(news_div,catag_no,cate_link,next_status)
			{
				
				var topstories=null;
				try{
					if(news_div == "topstories")
					{
					topstories = getDocElement("TopStories");
					}
					if(news_div == "politics")
					{
					topstories = getDocElement("Politics");
					}
					if(news_div == "business")
					{
					topstories = getDocElement("Business");
					}
					if(news_div == "development")
					{
					topstories = getDocElement("Developement");
					}
					if(news_div == "international")
					{
					topstories = getDocElement("International");
					}
					if(news_div == "sports")
					{
					topstories = getDocElement("Sports");
					}
					if(news_div == "advertise")
					{
					topstories = getDocElement("Advertise");
					}
					
					var next_link = null;
					if(next_status == "next")
					{
						next_link = "<div class='nextpreviousboth'><a href='javascript://'  onClick=\"javascript:getPrevNews('"+actuallocnext+"','"+cate_link+"','"+news_div+"')\">&#9668; previous </a></div>  <div class='nextbutton'><a href='javascript://' onClick=\"javascript:getNextNews('"+actuallocnext+"','"+cate_link+"','"+news_div+"')\"> next &#9658;</a></div>  ";
					}
					if(next_status == "no-next")
					{
						next_link = "<div class='nextpreviousboth'><a href='javascript://'  onClick=\"javascript:getPrevNews('"+actuallocnext+"','"+cate_link+"','"+news_div+"')\">&#9668; previous</a></div>";
					}
					if(next_status == "prev")
					{
						next_link = "<div class='nextpreviousboth'><a href='javascript://'  onClick=\"javascript:getPrevNews('"+actuallocnext+"','"+cate_link+"','"+news_div+"')\">&#9668; previous </a></div>  <div class='nextbutton'><a href='javascript://' onClick=\"javascript:getNextNews('"+actuallocnext+"','"+cate_link+"','"+news_div+"')\"> next &#9658;</a></div>";
					}
					if(next_status == "no-prev")
					{
						next_link = "<div class='nextprevious'><a href='javascript://' class='nextprevious' onClick=\"javascript:getNextNews('"+actuallocnext+"','"+cate_link+"','"+news_div+"')\">next &#9658;</a></div>";
					}
					
					//var next_link = "<a href='javascript://' onClick=\"javascript:getNextNews('"+actuallocnext+"','"+cate_link+"','"+news_div+"')\">< next</a>  <a href='#' onClick=\"javascript:getPrevNews('"+actuallocnext+"','"+cate_link+"','"+news_div+"')\">previous ></a>";
					
					var newdiv = document.createElement("div");
					
					if(cate_link != "undefined" && cate_link != "~" && cate_link != "^" && cate_link != "")
					{
						newdiv.innerHTML=""+catag_no+next_link;
					}
					else
					{
					newdiv.innerHTML=""+catag_no;	
					}
					topstories.innerHTML="";
					topstories.appendChild(newdiv);

					
					}catch(e){("Problem in processing news")};
			}

//****************************************************//

var ostat = false;
function scrollstop() {
news_mar.scrollAmount = 0;
ostat = true;
}
function scrollplay() {
news_mar.scrollAmount = 3;
ostat = false;
}
//***************************************************//

function convertTobrief()
{
	
		var news_status = document.getElementById("news_status").value;
		if(news_status == "full_nes")
		{
			var nbrief_n = document.getElementById("brief_news").value;
			var nfull_n = document.getElementById("full_news").value;
			var ndiv_n = document.getElementById("news_div").value;
			var nread_n = document.getElementById("r_more").value;
			var nfontass_n = document.getElementById("font_ass").value;
			var nread_m = document.getElementById("read_m").value;
			showbrief_news(nbrief_n,nfull_n,ndiv_n,nread_n,nfontass_n,nread_m);
		}
}

//**************************************************************************************//

var getNextHeadlines_req = null;

			function getNextHeadlines() 
			{
				
			news_full=null;
			brief = null;
			f_div = null;
			read_ch = null;
			short_news = null;
			read_style = null;
			var loc = document.getElementById("set_news_location").value;
			var current_date = document.getElementById("current_date").value;
			
			
				var url = "/GeezeMail/ClientNewsUpdater?next_headlines=yes&current_date="+current_date+"&loc="+loc+"&time="+ new Date().getTime();
							
				if(window.XMLHttpRequest) 
				{					
					try
					{
						getNextHeadlines_req = new XMLHttpRequest();					
						
					}
					catch(e)
					{
						getNextHeadlines_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(getNextHeadlines_req!=null)
					{
						try
						{
							getNextHeadlines_req.open("GET", url, true);				//opens a POST connection with specified url asynchronously
							getNextHeadlines_req.onreadystatechange = getNextHeadlinesRes;				// function to call when ready state changes.
							getNextHeadlines_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
				else if(window.ActiveXObject) 
				{
					try
					{
						getNextHeadlines_req = new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(e)
					{
						getNextHeadlines_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(getNextHeadlines_req!=null)
					{
						try
						{
							getNextHeadlines_req.open("GET", url, true);				//opens a POST connection with specified url asynchronously
							getNextHeadlines_req.onreadystatechange = getNextHeadlinesRes;				// function to call when ready state changes.
							getNextHeadlines_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
			}
			function getNextHeadlinesRes() 
			{
				if(getNextHeadlines_req.readyState == 4)												// compaire with current ready state value.
				{ 
					if(getNextHeadlines_req.status == 200)											// status=200 represents sucessful signal
					{
						try{
						
						document.getElementById("Particular_news").innerHTML="";
 						document.getElementById("Particular_news").style.display="none";
						
						var update=getNextHeadlines_req.responseText;
						update=update.split("'A.KFetchHeading'");
						var news_div =getDocElement("TopStor_head");
						var newdiv=document.createElement("headdiv");
						var head = unescape(update[0]);
						var head_date = head.split("'current_date_news'");
						var set_date_value = head_date[1].split("new_current_date_set'");
						document.getElementById("current_date").value=""+set_date_value[1];
						var date_dis = head_date[1].split(">");
						date_dis = date_dis[1].split("<");
						if(set_date_value[1] != '1')
						{
						newdiv.innerHTML=""+"<div class='main_headlines_style' style='font-size:10pt;'><div class='heading_style'><font class='head_heading'>Todays News Headlines</font>  <font class='head_date'>Date: "+date_dis[0]+"</font></div><div class='news_sechead_style'>"+head_date[0]+"<div class='previousheadlines'><a href='javascript://' onClick='getPrevHeadlines()'>&#9668; previous</a></div> <div class='nextheadlines'><a href='javascript://' onClick='getNextHeadlines()'>next &#9658;</a></div></div></div><br>";
						}
						else
						{
							newdiv.innerHTML=""+"<div class='main_headlines_style' style='font-size:10pt;'><div class='heading_style'><font class='head_heading'>Todays News Headlines</font>  <font class='head_date'>Date: "+date_dis[0]+"</font></div><div class='news_sechead_style'>"+head_date[0]+"<div class='previousheadlines'><a href='javascript://' onClick='getPrevHeadlines()'>&#9668; previous</a></div></div></div><br>";
						}
						news_div.innerHTML="";
						news_div.appendChild(newdiv);
						
						}catch(e){alert("problem in feting next news head lines catagories");}
						
					}
					else
					{
						alert("Problem:getNextHeadlines_req response " + getNextHeadlines_req.statusText);
					}
				}
			}


//**************************************************************************************//

var getPrevHeadlines_req = null;

			function getPrevHeadlines() 
			{
			news_full=null;
			brief = null;
			f_div = null;
			read_ch = null;
			short_news = null;
			read_style = null;
			var loc = document.getElementById("set_news_location").value;
			var current_date = document.getElementById("current_date").value;
						
				var url = "/GeezeMail/ClientNewsUpdater?previous_headlines=yes&current_date="+current_date+"&loc="+loc+"&time="+ new Date().getTime();
							
				if(window.XMLHttpRequest) 
				{					
					try
					{
						getPrevHeadlines_req = new XMLHttpRequest();					
						
					}
					catch(e)
					{
						getPrevHeadlines_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(getPrevHeadlines_req!=null)
					{
						try
						{
							getPrevHeadlines_req.open("GET", url, true);				//opens a POST connection with specified url asynchronously
							getPrevHeadlines_req.onreadystatechange = getPrevHeadlinesRes;				// function to call when ready state changes.
							getPrevHeadlines_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
				else if(window.ActiveXObject) 
				{
					try
					{
						getPrevHeadlines_req = new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(e)
					{
						getPrevHeadlines_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(getPrevHeadlines_req!=null)
					{
						try
						{
							getPrevHeadlines_req.open("GET", url, true);				//opens a POST connection with specified url asynchronously
							getPrevHeadlines_req.onreadystatechange = getPrevHeadlinesRes;				// function to call when ready state changes.
							getPrevHeadlines_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
			}
			function getPrevHeadlinesRes() 
			{
				if(getPrevHeadlines_req.readyState == 4)												// compaire with current ready state value.
				{ 
					if(getPrevHeadlines_req.status == 200)											// status=200 represents sucessful signal
					{
						try{
						
						document.getElementById("Particular_news").innerHTML="";
						document.getElementById("Particular_news").style.display="none";
						
						var update=getPrevHeadlines_req.responseText;
						update=update.split("'A.KFetchHeading'");
						var news_div =getDocElement("TopStor_head");
						var newdiv=document.createElement("headdiv");
						var head = unescape(update[0]);
						var head_date = head.split("'current_date_news'");
						var set_date_value = head_date[1].split("new_current_date_set'");
						document.getElementById("current_date").value=""+set_date_value[1];
						var check_prev = set_date_value[0].split("noputprevious");
						var date_dis = head_date[1].split(">");
						date_dis = date_dis[1].split("<");
						
						if(check_prev[1] != "'")
						{
						newdiv.innerHTML=""+"<div class='main_headlines_style' style='font-size:10pt;'><div class='heading_style'><font class='head_heading'>Todays News Headlines</font>  <font class='head_date'>Date: "+date_dis[0]+"</font></div><div class='news_sechead_style'>"+head_date[0]+"<div class='previousheadlines'><a href='javascript://' onClick='getPrevHeadlines()'>&#9668; previous</a></div> <div class='nextheadlines'><a href='javascript://' onClick='getNextHeadlines()'>next &#9658;</a></div></div></div><br>";
						}
						else
						{
							newdiv.innerHTML=""+"<div class='main_headlines_style' style='font-size:10pt;'><div class='heading_style'><font class='head_heading'>Todays News Headlines</font>  <font class='head_date'>Date: "+date_dis[0]+"</font></div><div class='news_sechead_style'>"+head_date[0]+"<div class='nextheadlines'><a href='javascript://' onClick='getNextHeadlines()'>next &#9658;</a></div></div></div><br>";
						}
						news_div.innerHTML="";
						news_div.appendChild(newdiv);
						
						}catch(e){alert("problem in feting next news head lines catagories");}
						
					}
					else
					{
						alert("Problem:getPrevHeadlines_req response " + getPrevHeadlines_req.statusText);
					}
				}
			}

//******************************************************************//

var showparticularNews_req=null;
ddiv_iid = null;
function showparticularNews(news_id,div_id)
{
	
	 	news_full=null;
		brief = null;
		f_div = null;
		read_ch = null;
		short_news = null;
		read_style = null;
		ddiv_iid = div_id;
	var url = "/GeezeMail/ClientNewsUpdater?showParticular_news=yes&news_id="+news_id+"&time="+ new Date().getTime();
							
				if(window.XMLHttpRequest) 
				{					
					try
					{
						showparticularNews_req = new XMLHttpRequest();		
					}
					catch(e)
					{
						showparticularNews_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(showparticularNews_req!=null)
					{
						try
						{
							showparticularNews_req.open("GET", url, true);				//opens a POST connection with specified url asynchronously
							showparticularNews_req.onreadystatechange = showparticularNewsRes;				// function to call when ready state changes.
							showparticularNews_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
				else if(window.ActiveXObject) 
				{
					try
					{
						showparticularNews_req = new ActiveXObject("Microsoft.XMLHTTP");
					}
					catch(e)
					{
						showparticularNews_req=null;
						alert("problem in creating sendData_req obj");
					}
					
					if(showparticularNews_req!=null)
					{
						try
						{
							showparticularNews_req.open("GET", url, true);				//opens a POST connection with specified url asynchronously
							showparticularNews_req.onreadystatechange = showparticularNewsRes;				// function to call when ready state changes.
							showparticularNews_req.send(null);			// Send the request with data.
						}
						catch(e) 
						{
							alert("Server Communication Problem\n"+e);
						}
					}
				}
			}
			function showparticularNewsRes() 
			{
				if(showparticularNews_req.readyState == 4)												// compaire with current ready state value.
				{ 
					if(showparticularNews_req.status == 200)											// status=200 represents sucessful signal
					{
						try{
												
						var update=showparticularNews_req.responseText;
						var Par_newdiv=document.createElement("particulardivnews");
						var Par_news_div =document.getElementById("Particular_news");
						var wer = "readmore"+ddiv_iid;
						var wehave = document.getElementById("TopStories");
						var ch =wehave.childNodes;
						ch = ch[0].childNodes;
						var news_focus_id=null;
						var tran = null;
						for(var i=0; i<ch.length; i++)
						{
							news_focus_id = ch[i].id;
							if(news_focus_id == ddiv_iid)
							{
								tran = news_focus_id;
								break;
							}
						}
						for(var i=0; i<ch.length; i++)
						{
							var tt = ch[i].id;
							if(tt !=null && tt != "")
							document.getElementById(tt).style.background='';
						}
						
						if(tran != null)
						{
							Par_news_div.innerHTML="";
							Par_news_div.style.display="none";
							document.getElementById(news_focus_id).style.background='#DEEFF8';
							
						}
						else
						{
						
						Par_newdiv.innerHTML=""+update;
						Par_news_div.innerHTML="";
						Par_news_div.style.display="block";
						Par_news_div.appendChild(Par_newdiv);
						var ch_col = Par_news_div.childNodes;
						var ch_col = ch_col[0].childNodes;
						document.getElementById(ch_col[0].id).style.background='#DEEFF8';
						}
						 window.location.hash = ddiv_iid; 
						
						}catch(e){alert("problem in feting next news head lines catagories "+e);}
						
					}
					else
					{
						alert("Problem:showparticularNews_req response " + showparticularNews_req.statusText);
					}
				}
			}
