// JavaScript Document
function select_value(idd)
   {
		var retCode;
		var newretcode;
		var newsub='';
		var newsublen=0;
		
		infoBoard=document.getElementById("Info"); 
		
		document.getElementById("Infoclass_int").value=idd; 
		
		var url;
	    url=window.location.href;
        //alert(window.location.href);
        var point;
	    point=url.lastIndexOf('/')+1;
        var strstr= url.substring(0,point);
        //url 除过最后的文件------------------
	    //alert(str);
		
		
        infoBoard.innerText='查询中...'; 
        myurl=strstr+"select_value.php?ffid="+idd;
        //myurl="http://127.0.0.1:8080/check_correct_answer.asp?id="+get_id;
		//alert(myurl);
        retCode=openUrl(myurl); 
        //alert("ֵ"+retCode);
		//alert(retCode);
		//newretcode=retCode.substring(0,1);
		//alert(newretcode);
		
		//newsublen=strlen(retCode);
		//alert(newsublen);
		//newsub=retCode.substring(1,newsublen); 
		//alert(newsub);
		infoBoard.innerHTML=display_info1('您选择的分类名是:'+retCode);
	
       return; 
		
} 

function openUrl(url)
 
 { 
    var objxml=new ActiveXObject("Microsoft.XMLHttp") 
    objxml.open("GET",url,false); 
    objxml.send(); 
	
    retInfo=objxml.responseText; 
    //--------------------ոVisit W3School!") ==Visit%20W3School%21
	retInfo=unescape(retInfo);
    if (objxml.status=="200")
	{ 
      return retInfo; 
    } 
    else
	{ 
      return "-2"; 
     } 
} 


function strlen(str) 
{
    var len = 0;
    for (var i = 0; i<str.length;i++)
	{
      if (str.charCodeAt(i)>255) len+= 2; 
	  else 
	   len ++;
    }
    return len;
}




function display_info1(info)
{
	   
	            var   dis1;
				
		        dis1='<table width=98% border=0 cellspacing=0 cellpadding=0>';
                dis1=dis1+'  <tr>';
                dis1=dis1+' <td width=60% height=20 bgcolor=#ffffe3 class=newdis><font color=green>'+info+'</font></td>';
                dis1=dis1+' <td width=40% bgcolor=#FFFFFF>&nbsp;</td>';
                dis1=dis1+' </tr>';
                dis1=dis1+' </table>';
				
				return  dis1;
	
}

















