function updateFlagState(path,noticeId,checkbox){var url=path+"flagNotice.html?noticeId="+noticeId+"&flagged="+checkbox.checked;initRequest(url);req.send(null);setFlagTextState(noticeId);if(parent.document!=null){cascadeToOtherFlags(parent.document,noticeId,checkbox.checked);}}function cascadeToOtherFlags(document,noticeId,isChecked){var allFlags=document.getElementsByName("notice_"+noticeId);for(i=0;i<allFlags.length;i++){var elem=allFlags[i];elem.checked=isChecked;}}function setFlagTextState(noticeId){var flagText=document.getElementById("flag"+noticeId);if(flagText!=null){document.getElementById("notice_"+noticeId).checked==true?flagText.innerHTML="Flagged Contract":flagText.innerHTML="Unflagged Contract";}}function initRequest(url){if(window.XMLHttpRequest){req=new XMLHttpRequest();}else{if(window.ActiveXObject){req=new ActiveXObject("Microsoft.XMLHTTP");}}req.open("GET",url,true);}
