function popTestPartWindow()
{
  //here we get location from address bar and split it out then use only first
  //array created to get hostname to use and pass into url.  I did it this way
  //because I was having trouble getting subString to work correctly.
  var urlHostname = window.location.toString();
  var hostnameValue=urlHostname.split("=");
  var popURL="https://core.readytalk.com/interface/participantTest.jsp?host=readytalk";
        var xWidth=screen.availWidth;
        var yHeight=screen.availHeight;
        getWindow=window.open(popURL,"test","resize=yes,resizable=yes,height=400,width=650,screenX=" + (xWidth/4) + ",screenY=" + (yHeight/4) + ",top=" + (xWidth/4) + ",left=" + (yHeight/4)+ "");
}

function validate(type)
{

  if(type == "chair") {
  var accessCode = document.chairEntry.ac.value;
  var passCode = document.chairEntry.pin.value;
    for (i=0; i < accessCode.length; i++) {
          if (isNaN(parseInt(accessCode.charAt(i)))) {
             alert("Please enter numeric characters only please.\n  The character: " + accessCode.charAt(i) + " is not valid.");
             return false;
          }
       }//end for

          if (accessCode.length != 7) {
             alert("Invalid Access Code");
             return false;
          }

    for (j=0; j < passCode.length; j++) {
          if (isNaN(parseInt(passCode.charAt(j)))) {
             alert("Passcode can only be numeric.  Please check entry and try again.");
	     return false;
          }
        }//end for

          if (passCode.length < 4 || passCode.length > 9) {
             alert("Invalid passcode.  Please try again.");
             return false;
          }

  }//end chair if



  if(type == "part") {
    var accessCode = document.partEntry.ac.value;
    for (i=0; i < accessCode.length; i++) {
          if (isNaN(parseInt(accessCode.charAt(i)))) {
             alert("Please enter numeric characters only please.\n  The character: " + accessCode.charAt(i) + " is not valid.");
             return false;
          }
       }//end for

          if (accessCode.length != 7) {
             alert("Invalid Access Code");
             return false;
          }
  }//end if

}//end function validate


