function uf_GetDate(){var b=new Date();var c;switch(b.getDay()){case 0:c="Sunday";break;case 1:c="Monday";break;case 2:c="Tuesday";break;case 3:c="Wednesday";break;case 4:c="Thursday";break;case 5:c="Friday";break;case 6:c="Saturday";break}var d=b.getDate();var a;switch(b.getMonth()){case 0:a="January";break;case 1:a="February";break;case 2:a="March";break;case 3:a="April";break;case 4:a="May";break;case 5:a="June";break;case 6:a="July";break;case 7:a="August";break;case 8:a="September";break;case 9:a="October";break;case 10:a="November";break;case 11:a="December";break}var e=b.getYear();if(e<1000){e=e+1900}document.write(c+" "+a+" "+d+", "+e)}function uf_ShowDetails(){document.getElementById("divDetails").style.display="block";document.getElementById("id_divGifLoading").style.display="none"}function uf_ValidateFields(){if((document.getElementById("txtUsername").value)==""){document.getElementById("lblMsg").innerHTML="User ID is required.";document.getElementById("txtUsername").focus();return false}else{if((document.getElementById("txtPassword").value)==""){document.getElementById("lblMsg").innerHTML="Password is required.";document.getElementById("txtPassword").focus();return false}else{if((document.getElementById("ddlInstitution").value)==""){document.getElementById("lblMsg").innerHTML="Institution is required.";document.getElementById("ddlInstitution").focus();return false}}}return true}function ufForgetPassword(){document.location.replace("apecs_forgetpassword.aspx");return false}function ufExpire(a){document.getElementById("hfExpire").value="";if(a=="0"){alert("Your password will expire today.  Redirecting you to change password screen.");document.getElementById("hfExpire").value="CHANGEPASSWORD"}else{if(confirm("Your password will expire in "+a+" days.  Do you wish to change it now?")){document.getElementById("hfExpire").value="CHANGEPASSWORD"}else{document.getElementById("hfExpire").value="MENU"}}document.forms[0].submit()}function uf_onLoad(){if(document.cookie.indexOf("timeout")!=-1){uf_Delete_Cookie("applicationOpen")}else{uf_DetectDuplicateSession()}uf_ShowDetails()}function uf_DetectDuplicateSession(){if(document.cookie.indexOf("applicationOpen")!=-1){alert("Application is already opened! Multiple instances of this application using IE7 tabs or using File > New Window (Ctrl + N) is not supported. Please open the application by clicking the browser icon from the Start menu or Taskbar.");window.opener="";window.open("","_self");window.close()}};