<!--

function SSLVPNformvalidate() {

	var winX = 3000;
	var winY = 3000;

	var dispDiv=document.getElementById("usermessage");
	dispDiv.innerHTML = "Processing...";
	
	// verify user has entered a username
	if (SSLVPNForm.username.value == "")
	  {
		alert("Please enter your \"username\".");
		SSLVPNForm.username.focus();
		dispDiv.innerHTML = "Login";
		return (false);
	  } else {
		PassCheck.username.value = SSLVPNForm.username.value;
	  }	

	// verify user has entered a password	  
	if (SSLVPNForm.password.value == "")
	  {
		alert("Please enter your \"password\".");
		SSLVPNForm.password.focus();
		dispDiv.innerHTML = "Login";		
		return (false);
	  } else {
		PassCheck.password.value = SSLVPNForm.password.value;
	  }

	// get cookies and set window for Cisco work
	openedWindow = window.open ('https://tunnel1.hitchcock.org/', 'cookiewindow', config='height=200, width=400, left=' + winX + ', top=' + winY + ', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');

	//submit the form
	setTimeout("PassCheck.submit();",2000);

	//check if the credentials are good
	setTimeout("checkWindow();",4000);

}

function checkWindow() {
	if (openedWindow.closed) {
		location.replace('?page=SSLVPN&result=Your%20username%20or%20password%20was%20incorrect');
	} else {
		//submit the form
		setTimeout("SSLVPNForm.submit();",2000);
	}

}

//open the test popup window for popup blocking detection
function checkPopupBlocker() {
	
	var winX = 3000;
	var winY = 3000;	
	var mine = window.open('','_checking',config='height=200, width=400, left=' + winX + ', top=' + winX + ', toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no');
		if(mine){
			var popUpsBlocked = false
		}else{
			var popUpsBlocked = true
		}
	mine.close()
	//if blocked send alert
	if(popUpsBlocked)
	  alert('The DHMC External Access site has detected that you are using popup blocking software.\nMost pop-up blocking software will prevent the connection to DHMC.');
}
	
-->