function openWin(URL,target,wFeatures) { var openURL = URL + "#" + target; var openWin = window.open(openURL,"openWin",wFeatures); openWin.focus(); }

function createFormId(formName) { var formsArray = document.forms;var noOfForms = formsArray.length;var i;var now = new Date();var found = false;var currentURL;var newURL;for (i = 0; i < noOfForms; i++) { if (document.forms[i].name == formName) { found = true;currentURL = document.forms[i].action;newURL = currentURL + "?id=" + now.getTime();document.forms[i].action = newURL;break;}} if (found == false) {alert("Cannot locate form " + formName);}}

function initialise() {	if (!document.getElementById) {alert("Sorry, the UAC ATAR and Limited ATAR system has detected a non W3C compliant version of your browser!" + "\n" + "You must upgrade your browser to the latest version of Microsoft Internet Explorer OR Mozilla Firefox." + "\n" +	"Important Note:" + "\n" + "Click OK and you will be redirected to an upgrade page.");window.location = "http://www.firefox.com"} else {var message="";function clickIE() {if (document.all) {(message);return false;}}function clickNS(e) {if(document.layers||(document.getElementById&&!document.all)) {if (e.which==2||e.which==3) {(message);return false;}}}if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}document.oncontextmenu=new Function("return false");}}

function validateLogin(f){if (f.student_number.value==""){alert("Please enter your UAC number");f.student_number.focus();return false;}if (f.pin.value==""){alert("Please enter your PIN");f.pin.focus();return false;}return true;}

function processLogin(){var f=document.login;if(validateLogin(f)){disableButton();createFormId("login");document.login.submit();}}

function disableButton(){if(document.all){document.all('divButton').innerHTML="<INPUT TYPE='button' NAME='helpa' VALUE=':: Processing... please wait ::' class='vbutton'>";}else if(document.layers){document.layers[0].document.write("<body><INPUT TYPE='button' NAME='helpa' VALUE=':: Processing... please wait ::' class='vbutton'>");document.layers[0].document.close();}else if(document.getElementById('divButton')){var o = document.getElementById('divButton');o.innerHTML="<INPUT TYPE='button' NAME='helpa' VALUE=':: Processing... please wait ::' class='vbutton'>";}}

