var MAJORS=0,reg;window.addEvent("keydown",function(a){if(a.key=="enter"){if(checkForm($("form_classist"))){$("form_classist").submit()}}});window.addEvent("startup",function(){if(window.ie){$$(".searchModifiers input").setStyle("margin",0);$$(".searchModifiers").setStyle("padding-top",0);$("categoryInput").setStyle("padding-top","3px")}shownews("");$("searchNow").addEvent("mousedown",function(){this.setStyle("background-position","0 -42px")}).addEvent("mouseup",function(){this.setStyle("background-position","0 0");this.blur()}).addEvent("mouseout",function(){this.setStyle("background-position","0 0");this.blur()}).addEvent("click",function(a){if(checkForm($("form_classist"))){$("form_classist").submit()}a.preventDefault()});if(!window.ie6){new Tips(".toolTip",{fixed:true})}subcatOptionsSlider=new Fx.Slide("switchieoptions",{mode:"horizontal"});subcatSlider=new Fx.Slide("subcatInput",{mode:"horizontal"});if($("catsel").value){initSubOpts()}$("catsel").addEvent("change",changeSubOpts);unClearBox();if($("keyadv").checked){advancedkeys()}checkcookies();init_mode();searchDrop.init();postload()});function refTest(){if(getcookie("noreftest")!=1&&navigator.appName!="Microsoft Internet Explorer"&&navigator.userAgent.indexOf("Firefox")==-1){frames.reftest.location.replace("./reftest1.php")}}function checkcookies(){var a=new Date();a.setTime(a.getTime());expires=60*1000;var b=new Date(a.getTime()+(expires));document.cookie="test="+1+";expires="+b.toGMTString();if(document.cookie.indexOf("test=1")==-1){document.getElementById("nocookies").style.display="block"}}function clearBox(b,a){if(b.value=="Enter Keywords to Search For..."||b.value=="Enter Keywords to Exclude..."){b.value=""}else{if(!a){b.select()}}}function unClearBox(){var a=document.getElementById("search_string");if(a&&a.value==""){a.value="Enter Keywords to Search For..."}a=document.getElementById("search_string_neg");if(a&&a.value==""){a.value="Enter Keywords to Exclude..."}}function checkForm(b){if(b.button=="reset"){return true}if(!checkForm_mode(b)){return false}var c=document.getElementById("majorsOnly"),a=document.getElementById("majorsPrc");if(c&&c.checked){if(!(a.value>0)||!(a.value<=100)){alert('Please enter a percentage between 0 and 100% under the "Major Cities" checkbox');return(false)}}clearBox(b.search_string,1);clearBox(b.search_string_neg,1);setCatName(b);if(getcookie("nocardialog")==1){setcookie60("nocardialog",1)}else{if($("catsel").value==8&&$("subcat8").value=="car"||$("subcat8").value=="cta"||$("subcat8").value=="cto"||$("subcat8").value=="ctd"){dialogBox.open("ajax","dialog/dialog_contents.php","fb",{boxTitle:"New Enhanced Vehicle Search!",submitFn:function(){carclick("goboth")},boxWidth:"400px",urlArgs:"dialog_page=carsearch.php&dialog_buttons=carsearch_buttons.php"});return(false)}}return(true)}function carclick(a){if($("carnotagain").checked){setcookie60("nocardialog",1)}if(a=="gohanks"){window.location="http://www.hankshelper.com?zip="+$("zip").value}else{if(a=="goresults"){$("form_classist").submit()}else{window.open("http://www.hankshelper.com");$("form_classist").submit()}}};