var xmlHttp

function showsecurity(theForm)
{ 
str='';



xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 

 
 	//alert(theForm);
 
  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
  			                switch (theForm.rd1[counter].value) 
  			                {
  				                case "<10":	
  					                theForm.rd3[0].disabled = false;
  					                theForm.rd3[1].disabled = true;
  					                theForm.rd3[1].checked = false;
  					                theForm.rd3[2].disabled = true;
  					                theForm.rd3[2].checked = false;
  					                theForm.rd3[3].disabled = true;
  					                theForm.rd3[3].checked = false;
  					                break;
  				                case "10 - 50":	
  					                theForm.rd3[0].disabled = false;
  					                theForm.rd3[1].disabled = false;
  					                theForm.rd3[2].disabled = true;
  					                theForm.rd3[2].checked = false;
  					                theForm.rd3[3].disabled = true;
  					                theForm.rd3[3].checked = false;
  					                break;
  				                case "50 - 100":	
  					                theForm.rd3[0].disabled = false;
  					                theForm.rd3[1].disabled = false;
  					                theForm.rd3[2].disabled = false;
  					                theForm.rd3[3].disabled = true;
  					                theForm.rd3[3].checked = false;
  					                break;
  				                case "100 - 250":	
  					                theForm.rd3[0].disabled = false;
  					                theForm.rd3[1].disabled = false;
  					                theForm.rd3[2].disabled = false;
  					                theForm.rd3[3].disabled = false;
  					                break;	
  				                case "> 250":	
  					                theForm.rd3[0].disabled = false;
  					                theForm.rd3[1].disabled = false;
  					                theForm.rd3[2].disabled = false;
  					                theForm.rd3[3].disabled = false;
  					                break;
                  				
                  				
  			                }
                  			
                  				
                  			
  		                }
  	                }
                  	
                  	
  	                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();

}
}


//alert(url);
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;
}