	
	
    function check_All_detail()
    {
    	var group = document.getElementsByName("C1111");
    	if(group[0].checked==true)
    	{
    		var group1=document.getElementsByName("C22");
    		for (var i=0; i<group1.length; i++) 
			{
				group1[i].checked=true;
       			
       		}
		}
		else
		{
			var group1=document.getElementsByName("C22");
    		for (var i=0; i<group1.length; i++) 
			{
				group1[i].checked=false;
       			
       		}
		}
    	
    }
    function reload_test_question_detail()
    {
    	var url="index.php?do=test_detail&action=list_detail_test";
    	//$('list_question_id').innerHTML='&#272;ang l&#7845;y d&#7919; li&#7879;u....';
			  		//alert(url);
			  		ShowDivGeneral(url,"","list_question_id");
			  		/*try
					{
						
						new Ajax.Request(url, {
				    	method: 'Post',
				    	onSuccess: function(transport) {
						if (200 == transport.status)
						{
							
							var x = transport.responseText;
							$('list_question_id').innerHTML=x;
							
						}
						
				    }
					} );
					}catch(e)
					{
						
					}*/
    }
	function delete_detail_question()
	{
		if(!$('C22'))
		{
			alert('Chưa có dữ liệu');	  
			return;
		}
		
		var group = document.getElementsByName("C22");
  		var num = group.length;
  		
   		
   		var j=0;
  		var array1=new Array();
  		
		for (var i=0; i<group.length; i++) 
		{
			if (group[i].checked==true)
       		{
       			array1[j]=group[i].value;
       			
       			j=j+1;
       		}
		}
  		if(array1.length>0)
  		{
  			if(confirm('Bạn chắc chắn sẽ xóa?\nĐiều này sẽ xóa hết những thông tin có sử dụng đến dữ liệu này.'))
			{
  		
				var id='0/';
				for(var i=0;i<array1.length;i++)
				{
				
						 id=id+array1[i]+'/';
						
						
				}
	  			id=id+0;
	  			var url="index.php?do=test_detail&action=delete&id="+id;
	  			ShowDivGeneral(url,"","list_question_id");
			}
  		}
		else
		{
			if(group.checked)
			{
				if(confirm('Bạn chắc chắn sẽ xóa?\nĐiều này sẽ xóa hết những thông tin có sử dụng đến dữ liệu này.'))
				{
					var id='0/';
					
					 id=id+group.value+'/';
					 
					id=id+0;
					var url="index.php?do=test_detail&action=delete&id="+id;
					ShowDivGeneral(url,"","list_question_id");
				}
					
			}
			else
			{			
				alert('Xin hãy chọn từ danh sách');	
			}

		}
		
	}
   function list_detail_question()
   {
   		//YAHOO.util.Event.addListener(window, "load", init_yahoo);
   		//YAHOO.util.Event.addListener(window, "load", init);
   		//alert($('url_paging').value+"   "+$('div_paging').value);
   		$('index_paging').value="0";
   		$('url_paging').value="index.php?do=test_detail&action=list_question";
   		$('div_paging').value="list_question";
   		$('list_question').innerHTML='&#272;ang l&#7845;y d&#7919; li&#7879;u....';
   		
   	
   		var url="index.php?do=test_detail&action=list_question&index_paging=1";
	  	ShowDivGeneral(url,"","list_question");
	  	/*try
			{
				
				new Ajax.Request(url, {
		    	method: 'Post',
		    	onSuccess: function(transport) {
				if (200 == transport.status)
				{
					
					var x = transport.responseText;
					$('list_question').innerHTML=x;
					
				}
				
		    }
			} );
			}catch(e)
			{
				
			}*/
			
			YAHOO.example.aqua.panel.show();

		
   }
   function close_test_question()
   {
   	   YAHOO.example.aqua.panel.hide();
   	   $('url_paging').value="index.php?do=test_detail&action=list_detail_test";
   	   $('div_paging').value="list_question_id";
   }
   function add_test_question()
   {
   		
   		
   		
  		var group = document.getElementsByName("C2");
  		var num = group.length;
  		
   		
   		//alert(num);
   		var j=0;
  		var array1=new Array();
  
  		//alert(group.length);
		for (var i=0; i<group.length; i++) 
		{
			if (group[i].checked==true)
       		{
       			array1[j]=group[i].value;
       			
       			j=j+1;
       		}
		}
		//alert(array1.length);
  		if(array1.length>0)
  		{
  		
  			var id="0/";
	  		for(var i=0;i<array1.length;i++)
	  		{
	  		
			  		var id=id+array1[i]+"/";
	  				
	  		}
	  		var id=id+"0";
	  		var url="index.php?do=test_detail&action=insert&id="+id;
			$('list_question_id').innerHTML='&#272;ang l&#7845;y d&#7919; li&#7879;u....';  		//alert(url);
	  		ShowDivGeneral(url,"","list_question_id");
	  		/*try
			{
				
				new Ajax.Request(url, {
		    	method: 'Post',
		    	onSuccess: function(transport) {
				if (200 == transport.status)
				{
					
					var x = transport.responseText;
					$('list_question_id').innerHTML=x;
					
				}
				
		    }
			} );
			}catch(e)
			{
				
			}*/
	  	//reload_test_question_detail()
	  		 
  		}
  		
   }