function openHelp()
{
    newin=window.open("help.dowebct?tool=entry&screenid=377", "HelpWin", "width=600,height=450,resizable=yes")
}

var alreadySubmitted_vistaInsEntryForm = 0
function submitLogon() {
if (alreadySubmitted_vistaInsEntryForm == 0) {
alreadySubmitted_vistaInsEntryForm = 1;
	document.vistaInsEntryForm.glcid.value = "URN:X-WEBCT-VISTA-V1:1ab7464a-7f00-0001-017f-b9e0f4e6d99a";
	document.vistaInsEntryForm.insId.value = "5122001";
	document.vistaInsEntryForm.insName.value = "Southern Utah University";
	var now = new Date();
	var tzo = now.getTimezoneOffset()/60;
	document.vistaInsEntryForm.timeZoneOffset.value = tzo;
	document.vistaInsEntryForm.action = "https://elearning.suu.edu/webct/authenticateUser.dowebct";
	document.vistaInsEntryForm.submit();
}return false;}
function submitLogonHelp() {
if (alreadySubmitted_vistaInsEntryForm == 0) {
alreadySubmitted_vistaInsEntryForm = 1;
	document.vistaInsEntryForm.glcid.value = "URN:X-WEBCT-VISTA-V1:1ab7464a-7f00-0001-017f-b9e0f4e6d99a";
	document.vistaInsEntryForm.insId.value = "5122001";
	document.vistaInsEntryForm.insName.value = "Southern Utah University";
	document.vistaInsEntryForm.action = "https://elearning.suu.edu/webct/logonHelp.dowebct?loginDisplay=true";
 document.vistaInsEntryForm.submit();
}return false;}
function submitBackEntryPage() {
if (alreadySubmitted_vistaInsEntryForm == 0) {
alreadySubmitted_vistaInsEntryForm = 1;
	document.vistaInsEntryForm.glcid.value = "URN:X-WEBCT-VISTA-V1:1ab7464a-7f00-0001-017f-b9e0f4e6d99a";
	document.vistaInsEntryForm.insId.value = "5122001";
	document.vistaInsEntryForm.insName.value = "Southern Utah University";
	document.vistaInsEntryForm.action = "https://elearning.suu.edu/webct/entryPage.dowebct";
 document.vistaInsEntryForm.submit();
}return false;}


function openBox(url, title, width, height) {
  var screenX=Math.floor((screen.width)/2)-Math.floor(width/2);
  var screenY=Math.floor((screen.height)/2)-Math.floor(height/2)-20;
  var top=screenY;
  var left=screenX;
  var features="'"+'toolbar=no,scrollbars=yes,status=yes,resizable=yes,top='+ top+',left='+ left+',screenX='+ screenX+',screenY='+ screenY+',width='+ width+',height='+ height+"'";
  newWindow=window.open(url,title,features);
  newWindow.focus();
}

function checkBrowser() {
  var cookies = navigator.cookieEnabled;
  var java = navigator.javaEnabled();
  var manualurl = 'https://elearning.suu.edu/webct/browserchecker.dowebct?checkType=manual&cookies=' + cookies + '&java=' + java;
  openBox(manualurl, 'BrowserChecker', 550, 380);
}

function entryCheck() {
function getJVMCheckerFrame() {
  var frame;
  var w = window;
  var count = 0;
  while (w != null && count<10){
    frame = w.document.getElementById('BROWSER_CHECKER_FRAME');
    if (frame)
      break;
    w = w.top.opener;
    count = count+1;
  }
  return frame;
}
function popupAutoBrowserCheck(cookies) {
  var autourl = 'https://elearning.suu.edu/webct/browserchecker.dowebct?checkType=auto&cookies=' + cookies + '&java=true&popups=true';
  openBox(autourl,'BrowserChecker',550,380);
}
function doBrowserCheck() {
  var popups = false;
  testWin = window.open('https://elearning.suu.edu/webct/browserchecker/PopupCheckExample.html', 'test12', 'height=100, width=100');
  if (testWin != null) {
    try{
      var testValue = testWin.name;
      popups = true;
      testWin.close();
    } catch(e) {
      popups = false;
    }
  }
  if (popups == false) {
    alert('Pop-up Blocker Check\n\nThe eLearning System sometimes uses small browser windows to deliver requested content.\nSome pop-up blockers incorrectly interpret these small windows as pop-ups and block them. If you have installed a pop-up blocker, turn it off while using the eLearning System.\n\nFor more information about how to turn off pop-up blockers, go to www.webct.com/tuneup.');
  }
  var cookies = false;
  document.cookie = 'testCookie=123';
  var cookie = document.cookie;
  if (cookie.indexOf('testCookie') > -1) {
    cookies = true;
    document.cookie = 'testCookie=123;expires=Fri, 31 Dec 1999 23:59:59 GMT';
  }
  var browser = true;
  if (!browser || !cookies) {
    popupAutoBrowserCheck(cookies);
    return;
  }
  var jvmcheckerFrame = getJVMCheckerFrame();
  if (jvmcheckerFrame) {
    jvmcheckerFrame.src = 'https://elearning.suu.edu/webct/jvmchecker.dowebct?cookies=' + cookies + '&browser=' + browser + '&popups=true';
    return;
  }
  var java = navigator.javaEnabled();
  if (!java) {
    popupAutoBrowserCheck(cookies);
  }
}
doBrowserCheck();
}