<!--

// Check for blank field
function isBlank(theField)  {
	if(theField.value.length == 0)
		return true;
	else
		return false;
}

function Close_onClick() {
	if (confirm("Are you sure you want to quit the application?")) {
		//top.window.close();
		window.location.href = "abort.asp"
	}
}
	
//Check for valid date entry short date formate inLen=8, long date format inLen=10
function isValidDate(theField) {
        var inStr = theField.value;
        var inLen = inStr.length;
	        
        // If this is Study Date is six digit number
        if(inLen == 8) {
                for(var i=0; i<inLen; i++) {
                        var ch = inStr.substring(i,i+1);
                        if (i==2 || i==5) {
                                if (ch!="/")
                                        return true;
                        }
                        else
                                if (ch < "0" || "9" < ch)
                                return true;
                }
                return false;
        }
      else
      return true;
}
	
function isVeryLong(theField, myLength)  {
	if(theField.value.length > myLength)
		return true;
	else
		return false;
}
	
	
function isRightLength(theField, myLength1, myLength2){
	if((theField.value.length >= myLength1) && (theField.value.length <= myLength2))
		return true;
	else
		return false;
}

function validEmail(theField) {
	var inStr = theField.value;
	var inLen = inStr.length;
	if((inLen != 0) && (inStr.indexOf('@',0) > 0) &&  (inStr.indexOf('.',0) > 0)) {
		return true;
	} else {
		return false;
	}
}
//-->