function setvideo(oSel,str)
     {
      var id = oSel.options[oSel.selectedIndex].value;
      var returned = id;
      var obj = eval(returned);
      createXMLHttpRequest();
	  var strurl="getmore.php?id="+id+"&str="+str;
	  xmlHttp.open("GET",strurl,true);
	  xmlHttp.onreadystatechange=handleStateChangevideo;
	  xmlHttp.setRequestHeader("If-Modified-Since","0");  //清除缓存
	  xmlHttp.send(null);
     }

     function video2(oSel,str)
     {
      var id = oSel.options[oSel.selectedIndex].value;
      var returned = id;
      var obj = eval(returned);
      createXMLHttpRequest();
	  var strurl="final.php?id="+id+"&str="+str;
	  xmlHttp.open("GET",strurl,true);
	  xmlHttp.onreadystatechange=govideo;
	  xmlHttp.setRequestHeader("If-Modified-Since","0");  //清除缓存
	  xmlHttp.send(null);
     }

function createXMLHttpRequest()
{
	if(window.ActiveXObject)
	{
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if(window.XMLHttpRequest)
		{
			xmlHttp = new XMLHttpRequest();
		}
	}

	function handleStateChangevideo()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				showvideo();
			}
			else
				{
				  alert("服务端返回状态" + xmlHttp.statusText);
				}
		}
		 else
			{
			   window.document .getElementById ("m3").innerHTML ="数据加载中";
			}
	}

			function showvideo ()
			{
			  window.document.getElementById("m3").innerHTML =xmlHttp.responseText;
			}



     function govideo()
	{
		if(xmlHttp.readyState==4)
		{
			if(xmlHttp.status==200)
			{
				showfinalvideo();
			}
			else
				{
				  alert("服务端返回状态" + xmlHttp.statusText);
				}
		}
		 else
			{

			}
	}

			function showfinalvideo()
			{
                var returned = xmlHttp.responseText;
                var obj = eval(returned);
                var info = obj[0];
                var cat =info.cat;
				window.document.getElementById("video_a3").value = info.a3;
                window.document.getElementById("video_a5").value = info.a5;
                window.document.getElementById("video_a12").value = info.a12;
                window.document.getElementById("video_a13").value = info.a13;
                window.document.getElementById("video_total").value = info.a3 * 3.3 + info.a5 * 5 + info.a12 * 12 + info.a13 * 12;
			}



