		var failedAttemptCount = 0;
	function checkbday() {
		
		if (!doSubmit()){
			failedAttemptCount += 1;
			if(failedAttemptCount == 2){
			window.location="AgeGateFailedAttempt.aspx";
			}
			return false;
		 }
	}
	function windowPopUp(URL){
		window.open(URL,"WH","status=yes,scrollbars=yes,width=500,height=650");
	}
	function submitenter(myfield,e)
	{
		var keycode;
		if(window.event) {
			keycode = window.event.keyCode;
		} else if(e) {
			keycode = e.which;
		} else {
			return true;
		}
		if(keycode == 13) {
			return true;
		} else return true;
	}
	function launchTheSite()
	{
		window.location = "index.html" + location.search;
	}
	/* To jump to the next field */
	function autojump_list(listName, nextField){
	var myList=document.forms[document.forms.length - 1].elements[listName];
	var myNextField=document.forms[document.forms.length - 1].elements[nextField];
		if(myList.selectedIndex != 0){
			myNextField.focus();
		}
	}
	var downStrokeField;
	function autojump(fieldName,nextFieldName,fakeMaxLength)
	{
		var myForm=document.forms[document.forms.length - 1];
		var myField=myForm.elements[fieldName];
		myField.nextField=myForm.elements[nextFieldName];
	
		if (myField.maxLength == null)
			myField.maxLength=fakeMaxLength;
			myField.onkeydown=autojump_keyDown;
			myField.onkeyup=autojump_keyUp;
	}
	
	function createPopupWindow (url,name,props) {
		var newWin = window.open(url,name,props);
	}
	
	function autojump_keyDown()
		{
		this.beforeLength=this.value.length;
		downStrokeField=this;
	}
	function autojump_keyUp()
	{
		if (
		(this == downStrokeField) &&
		(this.value.length > this.beforeLength) &&
		(this.value.length >= this.maxLength)
		)
		this.nextField.focus();
		downStrokeField=null;
	}

