$(function(){$('#menu ul.sm').css({display:"none",left:"0"});$('#menu ul.sm ul').css({display:"none",left:"100%"});$('#menu li').hover(function(){$(this).find('ul.sm').stop(true,true).slideDown('fast')},function(){$(this).find('ul.sm').stop(true,true).slideUp('fast')});$('ul.sm li').hover(function(){$(this).find('ul').stop(true,true).slideDown('fast')},function(){$(this).find('ul').stop(true,true).slideUp('fast')})});Shadowbox.init({overlayOpacity:0.8});function openShadowbox(content,player,title,width,height){Shadowbox.open({content:content,player:player,title:title,width:width,height:height})}function checkContact(){var errorString="";if(window.document.contactform.firstname.value==""){errorString+="- First Name.\n"}if(window.document.contactform.lastname.value==""){errorString+="- Last Name.\n"}if(window.document.contactform.company.value==""){errorString+="- Company.\n"}if(window.document.contactform.email.value==""){errorString+="- E-mail address.\n"}else{if((errorString=="")&&(!checkEmail(window.document.contactform.email.value))){alert("Sorry, your e-mail address is invalid!");return false}}if(window.document.contactform.phone.value==""){errorString+="- Phone number.\n"}if(window.document.contactform.math.value==""){errorString+="- Math field.\n"}if(errorString==""){return true}else{errorString="Please make sure you have completed all mandatory fields marked with an asterisk and try again.\n\n"+errorString;alert(errorString);return false}}function checkFormRequest(){var errorString="";if(window.document.industryRequest.company.value==""){errorString+="- Company.\n"}if(window.document.industryRequest.firstname.value==""){errorString+="- First Name.\n"}if(window.document.industryRequest.lastname.value==""){errorString+="- Last Name.\n"}if(window.document.industryRequest.email.value==""){errorString+="- E-mail address.\n"}else{if((errorString=="")&&(!checkEmail(window.document.industryRequest.email.value))){alert("Sorry, your e-mail address is invalid!");return false}}if(window.document.industryRequest.phone.value==""){errorString+="- Phone number.\n"}if(window.document.industryRequest.math.value==""){errorString+="- Math field.\n"}if(errorString==""){return true}else{errorString="Please make sure you have completed all mandatory fields marked with an asterisk and try again.\n\n"+errorString;alert(errorString);return false}}function checkEmail(email){var at=email.indexOf("@");var dot=email.indexOf(".");var space=email.indexOf(" ");if((at!=-1)&&(at!=0)&&(dot!=-1)&&(dot<email.length-1)&&(space==-1)){return true}else{return false}}
