	function animateGo(obj){
		if (obj.css('height')=='30px'){ return; }
		// alert(obj.attr('id'));
		if (obj.html() == '<font color="#006E2E">Thanks for registering! Please check your email for instructions on how to access the webinar.</font>'){
			obj.animate({'height':'30px'},700);
			obj.delay(5000).animate({'height':'0px'},700);
		} else {
			obj.animate({'height':'30px'},700);
		}
	}
	function doSubmit(passedForm){
		/* check to make sure not a bot */
		if(passedForm.find("#country2").val() == ""){
			/* split name field */
			var names = passedForm.find("#firstname").val().split(' ');
			passedForm.find("#firstname").val(names[0]);
			passedForm.find("#lastname").val(names[1]);
		
			/* send email with event link to client 
			$.post("/events/ev_sub_new.php", {email:passedForm.find("#email").val(), title:passedForm.find("#eventTitle").val(), room:passedForm.find("#room").val(), date:passedForm.find("#eventDate").val() } ); */
		
			/* IE NOTE! IE CAN ONLY USE POST METHOD FOR ITEMS ON SAME SERVER */
		
			/* send record to Events DB */
			$.post("/events/ev_sub_new.jsp", {email:passedForm.find("#email").val(),  eventID:passedForm.find("#eventID").val(), date:passedForm.find("#eventDate").val(), title:passedForm.find("#eventTitle").val(), room:passedForm.find("#room").val() } );
		 
		 	/* post to onContact */ /* try using oncontact notes field in formprocessinglib to check? */
			$.ajax({
   type: "POST",
   url: "/special_offers/processFormElite.jsp",
   data: passedForm.serialize()
 });   
		
		}
	}
	function animateClose(obj){
		obj.animate({opacity:0},0);
		obj.delay(150).html('<font color="#006E2E">Thanks for registering! Please check your email for instructions on how to access the webinar.</font>');
		obj.animate({opacity:1},350);
		obj.delay(6000).animate({'height':'0px'},700);
	}
	function checkSubmit(passedForm,e,obj){
		var key;
		
		if (window.event) {
			key = window.event.keyCode;
		} else if (e) {
			key = e.which;
		} 

		if (key == 13){
			if (validateForm(passedForm.attr('id'), null)) {
				doSubmit(passedForm);
				animateClose(obj);
			}
		} 
		
	}

