var xmlHttp

function showsecurity(theForm)
{ 
str='';



xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 


 if (theForm=='hello')
  {
	var url="showsecurity.asp?firsttimer=true";

	
	url=url+"&sid="+Math.random();
	
  }
  else
  { 
   
  	if (theForm=='ClearAll') {
  	    
  	   
        for (counter = 0; counter < document.inputform.rd1.length; counter++) {
               document.inputform.rd1[counter].checked=false;
        }
         for (counter = 0; counter < document.inputform.rd2.length; counter++) {
               document.inputform.rd2[counter].checked=false;
        }
         for (counter = 0; counter < document.inputform.rd3.length; counter++) {
               document.inputform.rd3[counter].checked=false;
        }
         for (counter = 0; counter < document.inputform.rd4.length; counter++) {
               document.inputform.rd4[counter].checked=false;
        }
        
        
               
        
        var url="showsecurity.asp?ClearAll=true";
        url=url+"&sid="+Math.random();
    }
  else
  { 

		
  	   for (counter = 0; counter < theForm.rd1.length; counter++) {
  		    if (theForm.rd1[counter].checked){
  			    str = theForm.rd1[counter].name + "=" + theForm.rd1[counter].value
  		    }
  	    }
      	
      	
  	    for (counter = 0; counter < theForm.rd2.length; counter++) {
  		    if (theForm.rd2[counter].checked){
  			    if (str.search("rd1") != -1){
  				    str += "&"
  			    }
      			
  			    str += theForm.rd2[counter].name + "=" + theForm.rd2[counter].value
  		    }
  	    }
      	
      	 for (counter = 0; counter < theForm.rd3.length; counter++) {
  		    if (theForm.rd3[counter].checked){
  			    if (str.search("rd2") != -1){
  				    str += "&"
  			    }
  			    else
  			    {
  				    if (str.search("rd1") != -1){
  				    str += "&"
  				    }
  			    }
  			    str += theForm.rd3[counter].name + "=" + theForm.rd3[counter].value
  		    }
  	    }
  	  
      	 for (counter = 0; counter < theForm.rd4.length; counter++) {
  		    if (theForm.rd4[counter].checked){
  			    if (str.search("rd3") != -1){
  				    str += "&"
  			    }
  			    else {
  					    if (str.search("rd2") != -1){
  						    str += "&"
  					    }
  					    else
  					    {
  						    if (str.search("rd1") != -1){
  						    str += "&"
  						    }
  					    }	
  			    }
      				
      			
  			    str += theForm.rd4[counter].name + "=" + theForm.rd4[counter].value
  		    }
  	    }
      	
      
  	 
 		
var url="showsecurity.asp";

url=url+"?"+str;
url=url+"&sid="+Math.random();

}

xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("GET",url,true);
xmlHttp.send(null);
}
}



function stateChanged() 
{ 
if (xmlHttp.readyState==4)
{ 
document.getElementById("showsecurity").innerHTML=xmlHttp.responseText;
}
}


function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}