function submitForm(B,A){B.method.value=A;B.submit()}function joinedCampus(A,B){hideComponent("joinCampusLayer");alert(B.message);mb._refresh()}function messageSent(){}function callShowHide(B,A){document.getElementById("joincampuslinkdiv").style.display="none";document.joinCampusForm.campusWebsiteId.value=A;return showComponent(B,"joinCampusLayer")}function resignCallback(B,C){alert(C.message);if(C.status=="success"){document.getElementById("resignDiv").style.display="none";document.getElementById("inviteDiv").style.display="none";var A=C.results[0];if(A!=0){var D=A[0].value;document.getElementById("countDiv").innerHTML=D}}}function makeModCallback(B,A){if(A.status=="success"){var C=document.getElementById(B);if(C){C.innerHTML="<span style='color:red'>Done ...</span>";setTimeout(function(){C.innerHTML="Now a Mod"},2000)}}else{alert(A.message)}}function removeModCallback(B,A){if(A.status=="success"){var C=document.getElementById(B);if(C){C.innerHTML="<span style='color:red'>Done ...</span>";setTimeout(function(){C.innerHTML="Not a Mod"},2000)}}else{alert(A.message)}}TextSlideshow=function(B,A,C){this.oLabel=document.getElementById(B);this.oValue=document.getElementById(A);this.labels=new Array();this.values=new Array();this.inc=-1;this.ir=255;this.ig=255;this.ib=255;this.r=this.ir;this.g=this.ig;this.b=this.ib;this.cid=0;this.ii=100;this.delta=C?C:5};TextSlideshow.prototype.add=function(B,A){this.labels[this.labels.length]=B;this.values[this.values.length]=A};TextSlideshow.prototype.fade=function(){if(this.r>0||this.g>0||this.b>0){if(this.r>=this.delta){this.r-=this.delta}else{this.r=0}if(this.g>=this.delta){this.g-=this.delta}else{this.g=0}if(this.b>=this.delta){this.b-=this.delta}else{this.b=0}this.oLabel.style.color="rgb("+this.r+","+this.g+","+this.b+")";this.oValue.style.color="rgb("+this.r+","+this.g+","+this.b+")"}};TextSlideshow.prototype.change=function(){if(!document.getElementById){return }var A=255/this.delta;A=A<20?20:A;if(this.ii>=A){this.ii=0;this.r=this.ir;this.g=this.ig;this.b=this.ib;this.inc++;if(this.inc>=this.labels.length){this.inc=0}this.oLabel.innerHTML=this.labels[this.inc];this.oValue.innerHTML=this.values[this.inc]}this.ii++;this.fade()};TextSlideshow.prototype.start=function(C,B,D){if(C){this.ir=C}if(B){this.ig=B}if(D){this.ib=D}if(this.labels.length==0){return }this.r=this.ir;this.g=this.ig;this.b=this.ib;this.change();var A=this;this.cid=window.setInterval(function(){A.change()},100)};function showGroupReplyDiv(B,A,C){oCommentDiv=document.getElementById("groupreplyDiv");owebsiteCommentForm=document.getElementById("GroupReplyForm");owebsiteCommentForm.websiteId.value=A;owebsiteCommentForm.topicId.value=C;return showComponent(B,"groupreplyDiv")}function hideGroupReplyDiv(){oCommentDiv=document.getElementById("groupreplyDiv");owebsiteCommentForm=document.getElementById("GroupReplyForm");owebsiteCommentForm.content.value="";oCommentDiv.style.visibility="hidden"}function GroupReplyDivCallback(B,C){hideGroupReplyDiv();alert(C.message);var A=window.location.href;if(A.indexOf("#")>-1){A=A.substr(0,A.indexOf("#"))}window.location.replace(A)}function revokeMembershipConfirmation(){alert("revoking membership")}function revokeMembershipCallback(B,A){if(A.status=="success"){var C=document.getElementById(B);if(C){C.innerHTML="<span style='color:red'>Done ...</span>";setTimeout(function(){C.innerHTML="Membership removed"},2000)}}else{alert(A.message)}}function hideJoinCampusComponent(A){document.getElementById("joincampuslinkdiv").style.display="block";hideComponent(A)}function fetchAnswers(A,B){Minglebox.Request.process(null,null,fetchAnswersCallback,null,addContextPath("/campus/answers.do?ajax=true&websiteId="+A+"&qNo="+B),null,null)}function fetchAnswersCallback(B,F){if(document.getElementById("choices").innerHTML){document.getElementById("choices").innerHTML=""}var I=F.results[0];if(I){var C=document.createElement("select");C.name="secretAnswer";var G=document.createElement("label");G.innerHTML="<b>Select Answer</b>";var E=document.createElement("option");E.innerHTML="Select";E.value="";C.appendChild(E);for(var D=0;D<I.length;D++){var A=document.createElement("option");A.innerHTML=I[D].value.trim();A.value=I[D].value.trim();C.appendChild(A)}var H=document.getElementById("choices");H.appendChild(G);H.appendChild(C)}}function setGradYear(){if(dur!=0){var B=document.getElementById("joiningYear").value;var C=parseInt(B)+parseInt(dur);var A=document.getElementById("graduationYear");A.value=C}}function showBithdayWishBox(B,A){birthdayForm=document.getElementById("ajaxmsg");birthdayForm.websiteId.value=A;return showComponent(B,"birthDiv")}function hideBirthdayWishDiv(){oBirthdayForm=document.getElementById("ajaxmsg");oBirthdayForm.websiteId.value="";hideComponent("birthDiv")}function birthdayCallback(A,B){hideBirthdayWishDiv();alert(B.message);myBDay.remove(B.results[0][0].value)}UserAction=function(A,D,B,C){this.container=D;this.count=A;this.countDiv=B;this.reqDiv=C};UserAction.prototype.remove=function(A){var B=document.getElementById(A);B.style.display="none";--this.count;if(this.countDiv!=null){document.getElementById(this.countDiv).innerHTML=this.count}if(this.count<=0){this.removeContainer()}};UserAction.prototype.removeContainer=function(){document.getElementById(this.container).style.display="none";if(this.reqDiv!=null){document.getElementById(this.reqDiv).style.display="none"}};function getDepartments(B){var D=document.getElementById("degree");var A=document.getElementById("collegeNameCity");var C=A.value;Minglebox.Request.process(null,null,addDepartments,B,addContextPath("/campussearch.do?method=departments&campus="+C+"&degree="+D.value),null,null)}var dur=0;function getYears(){var D=document.getElementById("degree");var B=document.getElementById("department");var A=document.getElementById("collegeNameCity");var C=A.value;Minglebox.Request.process(null,null,setYears,null,addContextPath("/campussearch.do?method=years&campus="+C+"&degree="+D.value+"&department="+B.value),null,null)}function setYears(A,B){dur=B.results[0][0].value}function removeAll(B){for(var A=B.options.length-1;A>=0;A--){B.remove(A)}}function addAll(D,F,B,E){var A=D.options.length;D.options[A]=new Option(F,"");for(var C=0;C<B.length;C++){A=D.options.length;D.options[A]=new Option(B[C][0].value,B[C][0].value)}if(E){A=D.options.length;D.options[A]=new Option("Other","-1")}}function addDepartments(B,C){var A=document.getElementById("department");if(C.results.length>0){removeAll(A);addAll(A,"Find your department",C.results,B)}};