var xmlHttp

function bylatest(str, start, end)
{
view=0;
var arrows = document.getElementById("arrows");
arrows.style.visibility='visible';
var news = document.getElementById("news");
news.style.color='#FFF000';
var latesttitle = document.getElementById("latesttitle");
latesttitle.style.color='#FFF000';
var clicked = document.getElementById("clicked");
clicked.style.color='#FFFFFF';
var grouped = document.getElementById("grouped");
grouped.style.color='#FFFFFF';
var justnews = document.getElementById("justnews");
justnews.style.color='#FFFFFF';
var opinion = document.getElementById("opinion");
opinion.style.color='#FFFFFF';
var headlines = document.getElementById('headlines');
var loading = document.getElementById("loading");
width=headlines.offsetWidth+'px';
loading.style.width=width;
height=headlines.offsetHeight+'px';
loading.style.height=height;
if (document.all) {
width=document.body.clientWidth;
left=((document.body.clientWidth-750)/2);
left=left+((document.body.clientWidth/100)*2)
loading.style.left=left;
}

showpop('loading')
if (str.length==0)
{ 
document.getElementById("view").innerHTML=""
var obj = document.getElementById("view");
obj.style.visibility = 'visible';
return
}


xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
window.location = "./index.php"
return
} 
var url="./bylatest.php"
url=url+"?start="+start
url=url+"&end="+end
xmlHttp.onreadystatechange=bylatestChanged 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)


} 

function bylatestChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
var obj = document.getElementById("view");
obj.style.visibility = 'visible';
document.getElementById("view").innerHTML=xmlHttp.responseText 
hidepop('loading')

} 
} 

function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
} 
