//CODE FOR HANDLING SENDING OF RESULTS var UserName = ''; var StartTime = (new Date()).toLocaleString(); var ResultForm = '
'; function GetUserName(){ UserName = prompt('[strNamePlease]',''); UserName += ''; if ((UserName.substring(0,4) == 'null')||(UserName.length < 1)){ UserName = prompt('[strNamePlease]',''); UserName += ''; if ((UserName.substring(0,4) == 'null')||(UserName.length < 1)){ history.back(); } } } function SendResults(Score){ var today = new Date; var NewName = '' + today.getTime(); var NewWin = window.open('', NewName, 'toolbar=no,location=no,directories=no,status=no, menubar=no,scrollbars=yes,resizable=no,,width=400,height=300'); //If user has prevented popups, no way to proceed -- exit if (NewWin == null){ return; } NewWin.document.clear(); NewWin.document.open(); NewWin.document.write(ResultForm); NewWin.document.close(); NewWin.document.Results.Score.value = Score + '%'; NewWin.document.Results.realname.value = UserName; NewWin.document.Results.End_Time.value = (new Date()).toLocaleString(); NewWin.document.Results.Start_Time.value = StartTime; NewWin.document.Results.submit(); }