var count=0;function set_in_progress(){var b=document.getElementsByName("action");var a=document.getElementsByName("prompt_lb");a[0].innerText="Reconfiguring Wireless is in progress..";b[0].value="....wait....";if(count%2==0){a[0].innerText="Reconfiguring Wireless is in progress.."}else{a[0].innerText="Reconfiguring Wireless is still progressing .."}b[0].disabled=true;count++}var status_url=window.location.protocol+"//"+window.location.host+"/wlstatus.cgi";function wait_for_ready(a){$.ajax({type:"GET",url:status_url,data:{Req:"wlstatus"},async:true,success:function(b){console.log(b);if(b=="1"){document.location.href=a}else{set_in_progress();setTimeout(wait_for_ready,500,a)}}})};