function CreateXMLHTTPObject()
{
	var xObject = null;

	try 
	{
		xObject = new ActiveXObject("Msxml2.xmlhttp.4.0");
	}
	catch (e)
	{
		try
		{
			xObject = new XMLHttpRequest(); 
			if (xObject.overrideMimeType) {//设置MiME类别
				xObject.overrideMimeType('text/xml');
			}
		}
		catch (e)
		{
			try 
			{
				xObject = new ActiveXObject("Msxml2.xmlhttp");
			} 
			catch (e) 
			{
				try 
				{
					xObject = new ActiveXObject("Microsoft.xmlhttp");
				} 
				catch (e) 
				{
					alert("Error: Unable to create XML HTTP object!");
				}
			}
		}
	}

	return xObject;
}

function getReady()
{

	if(xmlhttp.readyState==4)
	{
		if(xmlhttp.status==200)
		{
			
			xmlhttp = null;
		}
	}
	
}

function changecon(obj,num,tatol,can1,can2)
{
	if(tatol == 1)
	{
		return ;
	}
	for (var i=1; i<=tatol; i++)
	{
		document.getElementById(can1+i).className="";
		document.getElementById(can2+i).style.display="none";
	}
	document.getElementById(can2+num).style.display="";
	obj.className="current";
}


function pagenews(nid,pid)
{
        r = Math.random();

		xmlhttp = CreateXMLHTTPObject();
		xmlhttp.onreadystatechange = getnewsformat2;
		xmlhttp.open("GET","/new_list.php?weblan=g&page="+nid+"&r="+r, true);
		xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
		xmlhttp.send("nowid=1");
}

function getnewsformat2()
{
	
	if(xmlhttp.readyState==4)
	{  
		if(xmlhttp.status==200)
		{
			document.getElementById("con_right").innerHTML=xmlhttp.responseText;
			xmlhttp = null;
		}
	}
}
