
$(function(){$('#autocomplete').keyup(function(){var input=$(this).val();if(input.length>=2){$.ajax({data:'value='+input+'&random='+Math.random(),url:'jax/autoCompJax.php',success:function(msg){$('#autocompleteChoices').html(msg);}});}});});function printer(passName,fName,currDate){var w;if(w&&!w.closed){w.close();}w=open('','articlePrint','menubar=1,locationbar=0,statusbar=0,resizable=1,scrollbars=0,width=500,height=500');var html='';html+='<html><body onload="window.print(); setTimeout(\'window.close()\', 3000);"><link rel="stylesheet" type="text/css" href="css/article.css" \/>';html+='<div id="overArticle"><img style="width:100%;" src="imgs/high5ArticleHead.gif" \/>';html+='<div id="articleBar"><span style="float:right;">'+currDate+'</span><span>Lincoln, NE</span></div>';html+='<div id=articleBody><center><h2>'+passName+' Receives High Five Award</h2></center>';html+='<div id="leftArticle">'+passName+' was awarded the prestigious Valentino\'s High Five Certificate for demonstrating outstanding effort in classroom and school activities. When a student shows a pattern of exemplary effort in any area, ranging from scholastics to even improving oneself as a person, they are given a</div>';html+='<div id="rightArticle">"High Five" by their teacher in the form of a special certificate honoring their accomplishment. Valentino\'s will honor this extraordinary feat of effort by displaying '+fName+'\'s name in their Lincoln buffet restaurant lobbies and on the High5Club.org website. Congratulations '+fName+'! Keep up the good work!</div>';html+='</div></div>';html+='<\/body><\/html>';w.document.open();w.document.write(html);w.document.close();}function validate(field,responseBox){var regEx;var validity=false;if(field=='date'){validity=($('#month')&&$('#year')&&$('#day'));}else{switch(field){case'fullName':regEx=/^[a-zA-Z]+ [a-zA-Z]+$/;break;case'studentName':regEx=/^[a-zA-Z]+ [a-zA-Z]+$/;break;case'email':regEx=/^[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*@[a-zA-Z0-9]+(\.[a-zA-Z0-9]+)*\.[a-zA-Z]{2,4}$/;break;case'phone':regEx=/^\(?[0-9]{3}\)?[\- \.]?[0-9]{3}[\- \.]?[0-9]{4}$/;break;}var value=$('#'+field).val();validity=value.match(regEx);}if(validity){$("#"+responseBox).html('Valid').css('color','green');}else{$("#"+responseBox).html('Invalid').css('color','red');}activateContact();}function activateContact(){var activate=true;$('.validBox:visible').each(function(){if($(this).html()!=="Valid"){activate=false;}});if(activate){$("#contactSub").attr('disabled','');}else{$("#contactSub").attr('disabled','disabled');}}function nameChangeToggle(){if($("#nameChangeCheck:checked").val()=="yes"){$("#nameChangeTable, .otherValids").css('display','');}else{$("#nameChangeTable, .otherValids").css('display','none');}activateContact();}function formReset(){$('#fullNameValid').attr('style',"color:black").html('Required');$('#phoneValid').attr('style',"color:black").html('Required');$('#emailValid').attr('style',"color:black").html('Required');$('#studentNameValid').attr('style',"color:black").html('Required');$('#dateValid').attr('style',"color:black").html('Required');document.contactForm.reset();nameChangeToggle();}function contactSubmit(){var serial=$("#contactForm").serialize();$.ajax({data:serial+'&random='+Math.random(),url:"jax/contactJax.php",success:function(msg){$('#contactAlert').html(msg);formReset();}});}