function show_image(){
	document.getElementById('hidepage').style.visibility = 'visible';
}
function hide_image(){
	document.getElementById('hidepage').style.visibility = 'hidden';
}
var xmlHttpped
var id ;
var count;


 function getSelected(opt) {
            var selected = new Array();
            var index = 0;
            for (var intLoop = 0; intLoop < opt.length; intLoop++) {
               if ((opt[intLoop].selected) ||
                   (opt[intLoop].checked)) {
                  index = selected.length;
                  selected[index] = new Object;
                  selected[index].value = opt[intLoop].value;
                  selected[index].index = intLoop;
               }
            }
            return selected;
         }

         function outputSelected(opt) {
            var sel = getSelected(opt);
            var strSel = "";
            for (var item in sel)       
               strSel += sel[item].value + "\n";
            alert("Selected Items:\n" + strSel);
         }



function show_details(str,docs_count,doc_type)
{
id = str;
count = docs_count;
type = doc_type;

xmlHttpped=GetXmlHttpObjected()
if (xmlHttpped==null)
  {
  alert ("Browser does not support HTTP Request")
  return
  } 
var url1="details.php";
url1=url1+"?id="+id+"&count="+count+"&type="+type ;
xmlHttpped.onreadystatechange=stateChangeded
xmlHttpped.open("POST",url1,true)
xmlHttpped.send(null)
} 
function stateChangeded() 
{ 
	if (xmlHttpped.readyState==4 || xmlHttpped.readyState=="complate"){
		document.getElementById('actif').value = 1;
		if(id==1 || id==1.1 || id==1.2 || id==2 || id==2.1 || id==2.2 || id==3 || id==3.1 || id==3.2 || id==4 || id==4.1 || id==4.2 || id==5 || id==5.1 || id==5.2){  
			 	document.getElementById('details').innerHTML =  xmlHttpped.responseText ;
				document.getElementById('details_personal').innerHTML =  '' ;
				document.getElementById('multiple_docs').innerHTML =  '' ;
				hide_image();
		}
		if(id==10 ||id==10.1 || id==10.2 || id==12 || id==12.1 || id==12.2 || id==14 || id==14.1 || id==14.2 || id==16 || id==16.1 || id==16.2 || id==18 || id==18.1 || id==18.2){    
				document.getElementById('details').innerHTML =  xmlHttpped.responseText ;
				document.getElementById('details_personal').innerHTML =  '' ;
				document.getElementById('multiple_docs').innerHTML =  '' ;
				hide_image();
		}
		if(id==6 || id==6.1 || id==6.2 || id==7 || id==7.1 || id==7.2 || id==8 || id==8.1 || id==8.2 || id==9 || id==66 || id==666 || id==77 || id==777 || id==88 || id==888 || id==99 || id==999){    
				document.getElementById('details').innerHTML =  xmlHttpped.responseText ;
				document.getElementById('details_personal').innerHTML =  '' ;
				document.getElementById('multiple_docs').innerHTML =  '' ;
				hide_image();
		}
		
		if(id==11 || id==13 || id==15 || id==17 || id==19){    
				document.getElementById('details').innerHTML =  xmlHttpped.responseText ;
				document.getElementById('details_personal').innerHTML =  '' ;
				document.getElementById('multiple_docs').innerHTML =  '' ;
				hide_image();
		}
	} 
else{
	show_image();	
}
}
function GetXmlHttpObjected()
{
var xmlHttpped=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttpped=new XMLHttpRequest();
 }
catch (e)
 {
 // Internet Explorer
 try
  {
  xmlHttpped=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttpped=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttpped;
}

