var xmlHttp

function showwireless(theForm)
{ 
str='';



xmlHttp=GetXmlHttpObject();
if (xmlHttp==null)
  {
  alert ("Your browser does not support AJAX!");
  return;
  } 

 
	
 
  if (theForm=='hello')
  {
	var url="showwireless.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;
  	    //}
  	    //document.inputform.rd1.options[document.inputform.rd1.selectedIndex].value='--';
		
		document.inputform.rd1.selectedIndex=0  	    

  	     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;
  	    }
  	    for (counter = 0; counter < document.inputform.rd5.length; counter++) {
  	           document.inputform.rd5[counter].checked=false;
  	    }
  	     for (counter = 0; counter < document.inputform.rd6.length; counter++) {
  	           document.inputform.rd6[counter].checked=false;
  	    }
  	    document.inputform.chk1.checked=false;
        document.inputform.chk2.checked=false;
        document.inputform.chk3.checked=false;
        document.inputform.chk4.checked=false;
  	    var url="showwireless.asp?ClearAll=true";
  	    url=url+"&sid="+Math.random();
  	}
  	else
  	{
  	
          //alert(theForm.rd1.options[theForm.rd1.selectedIndex].value);
	        str=theForm.rd1.name + "=" + theForm.rd1.options[theForm.rd1.selectedIndex].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
  		        }
  	        }
          	
         			
  	        for (counter = 0; counter < theForm.rd5.length; counter++) {
  		        if (theForm.rd5[counter].checked){
  			        if (str.search("rd4") != -1){
  				        str += "&"
  			        }
  			        else {
          					
  					        if (str.search("rd3") != -1){
  						        str += "&"
  					        }
  					        else {
  							        if (str.search("rd2") != -1){
  								        str += "&"
  							        }
  							        else
  							        {
  								        if (str.search("rd1") != -1){
  								        str += "&"
  								        }
  							        }
          					
  					        }
          						
  			        }
          				
          			
  			        str += theForm.rd5[counter].name + "=" + theForm.rd5[counter].value
  		        }
  	        }
          	
          	
          	
  	        for (counter = 0; counter < theForm.rd6.length; counter++) {
  		        if (theForm.rd6[counter].checked){
  			        if (str.search("rd5") != -1){
  						        str += "&"
  					        }
  			        else
  			        {		
          				
  					        if (str.search("rd4") != -1){
  						        str += "&"
  					        }
  					        else {
        		  					
  							        if (str.search("rd3") != -1){
  								        str += "&"
  							        }
  							        else {
  									        if (str.search("rd2") != -1){
  										        str += "&"
  									        }
  									        else
  									        {
  										        if (str.search("rd1") != -1){
  										        str += "&"
  										        }
  									        }
        		  					
  							        }
        		  						
  					        }
        		  				
		  		        }	
  					        str += theForm.rd6[counter].name + "=" + theForm.rd6[counter].value
  		        }
  	        }
          	
  	        if (theForm.chk1.checked){
  		        if (str.search("rd6") != -1){
  				        str += "&"
  			        }
  			        else
  			        {
  				        if (str.search("rd5") != -1){
  				            str += "&"
  				        }
  				        else
  				        { 
  				            if (str.search("rd4") != -1){
  				                str += "&"
  				            }
  				            else
  				            { 
  				                if (str.search("rd3") != -1){
  				                    str += "&"
  				                }
  				                else
  				                { 
  				                    if (str.search("rd2") != -1){
  				                        str += "&"
  				                    }
  				                    else
  				                    { 
  				                        if (str.search("rd1") != -1){
  				                            str += "&"
  				                        }
  				                    }
  				                }
  				            }
  				        }
  			        }
          		
          			
  		        str += theForm.chk1.name + "=" + theForm.chk1.value
  	        }
  	        if (theForm.chk2.checked){
  		        if (str.search("chk1") != -1){
  				        str += "&"
  		        }
  		        else
  		        {
  			        if (str.search("rd6") != -1){
  				        str += "&"
  			        }
  			        else
  			        {
  				        if (str.search("rd5") != -1){
  				            str += "&"
  				        }
  				        else
  				        { 
  				            if (str.search("rd4") != -1){
  				                str += "&"
  				            }
  				            else
  				            { 
  				                if (str.search("rd3") != -1){
  				                    str += "&"
  				                }
  				                else
  				                { 
  				                    if (str.search("rd2") != -1){
  				                        str += "&"
  				                    }
  				                    else
  				                    { 
  				                        if (str.search("rd1") != -1){
  				                            str += "&"
  				                        }
  				                    }
  				                }
  				            }
  				        }
  			        }
          		
  		        }
  		        str += theForm.chk2.name + "=" + theForm.chk2.value
  	        }
  	        if (theForm.chk3.checked){
  		        if (str.search("chk2") != -1){
  				        str += "&"
  		        }
  		        else
  		        {
  				        if (str.search("chk1") != -1){
  				        str += "&"
  		        }
  		        else
  		        {
  			        if (str.search("rd6") != -1){
  				        str += "&"
  			        }
  			        else
  			        {
  				        if (str.search("rd5") != -1){
  				            str += "&"
  				        }
  				        else
  				        { 
  				            if (str.search("rd4") != -1){
  				                str += "&"
  				            }
  				            else
  				            { 
  				                if (str.search("rd3") != -1){
  				                    str += "&"
  				                }
  				                else
  				                { 
  				                    if (str.search("rd2") != -1){
  				                        str += "&"
  				                    }
  				                    else
  				                    { 
  				                        if (str.search("rd1") != -1){
  				                            str += "&"
  				                        }
  				                    }
  				                }
  				            }
  				        }
  			        }
          		
  		        }
          		
  		        }
  		        str += theForm.chk3.name + "=" + theForm.chk3.value
  	        }
  	        if (theForm.chk4.checked){
  		        if (str.search("chk3") != -1){
  				        str += "&"
  		        }
  		        else
  		        {
  				        if (str.search("chk2") != -1){
  				        str += "&"
  		        }
  		        else
  		        {
  				        if (str.search("chk1") != -1){
  				        str += "&"
  		        }
  		        else
  		        {
  			        if (str.search("rd6") != -1){
  				        str += "&"
  			        }
  			        else
  			        {
  				        if (str.search("rd5") != -1){
  				            str += "&"
  				        }
  				        else
  				        { 
  				            if (str.search("rd4") != -1){
  				                str += "&"
  				            }
  				            else
  				            { 
  				                if (str.search("rd3") != -1){
  				                    str += "&"
  				                }
  				                else
  				                { 
  				                    if (str.search("rd2") != -1){
  				                        str += "&"
  				                    }
  				                    else
  				                    { 
  				                        if (str.search("rd1") != -1){
  				                            str += "&"
  				                        }
  				                    }
  				                }
  				            }
  				        }
  			        }
          		
  		        }
          		
  		        }
          		
  		        }
  		        str += theForm.chk4.name + "=" + theForm.chk4.value
  	        }
          	

        var url="showwireless.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("showwireless").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;
}