var head=document.getElementsByTagName("head")[0];function insertJavascript(srcN){var nScript=document.createElement("script");nScript.setAttribute("src",srcN);nScript.setAttribute("type","text/javascript");head.appendChild(nScript)}function insertStylesheet(hrefN,media){if(!media){media="screen"}var nStyle=document.createElement("link");nStyle.setAttribute("media",media);nStyle.setAttribute("rel","stylesheet");nStyle.setAttribute("href",hrefN);nStyle.setAttribute("type","text/css");head.appendChild(nStyle)}var search_default="Search the site ...";function makeactive(tab){jQuery("#tab1").removeClass();jQuery("#tab2").removeClass();jQuery("#tab3").removeClass();jQuery("#tab4").removeClass();jQuery("#tab5").removeClass();jQuery("#tab6").removeClass();jQuery("#tab7").removeClass();jQuery("#tab"+tab).addClass("current_search");var current_search=0;for(var i=1;i<=7;i++){if(jQuery("#tab"+i).hasClass("current_search")){current_search=i}}var headerSearch=jQuery("#cse-search-box");headerSearch.action='';headerSearch.method='get';switch(current_search){case 1:jQuery("#q").val("Search the site ...");break;case 2:jQuery("#q").val("Search JobsHQ ...");break;case 3:jQuery("#q").val("Search CarsHQ ...");break;case 4:jQuery("#q").val("Search ApartmentsHQ ...");break;case 5:jQuery("#q").val("Search HomesHQ ...");break;case 6:jQuery("#q").val("Search Marketplace ...");break;case 7:jQuery("#q").val("Search Google ...");break;default:jQuery("#q").val("Search the site ...");break}}function clearSearch(){jQuery("#q").val("")}function searchRedirect(){var current_search=0;var keywords=jQuery("#q").val();var site_zip=jQuery("#site_zip").val();if(keywords===''){return}for(var i=1;i<=7;i++){if(jQuery("#tab"+i).hasClass("current_search")){current_search=i}}var url='';switch(current_search){case 1:url='/event/search/order/date/keywords/'+keywords;break;case 2:url='http://www.jobshq.com/search/?keyword='+keywords;break;case 3:url='http://www.carshq.com/search/page/search_results/search_view/close/keywords/'+keywords+'/location/'+site_zip+'/radius/50/';break;case 4:url='http://www.apartmentshq.com/search/index.cfm?keywords='+keywords;break;case 5:url='http://www.homeshq.com/';break;case 6:url='/event/search_results/queryString/'+keywords;break;case 7:url='/?event=googleSearch&page=google_search&cx=partner-pub-9136693947306445%3Ambzeg1-lcnf&cof=FORID%3A10&ie=ISO-8859-1&sa=Search&q='+keywords;break;default:url='/event/search/order/date/keywords/'+keywords}window.location.href=url}var req;function GetURL(url,handler){if(handler===undefined){handler='processReqChange'}url=url+'&rand='+Math.random();if(window.XMLHttpRequest){req=new XMLHttpRequest();req.onreadystatechange=eval(handler);req.open("GET",url,true);req.send(null)}else if(window.ActiveXObject){req=new ActiveXObject("Microsoft.XMLHTTP");if(req){req.onreadystatechange=eval(handler);req.open("GET",url,true);req.send()}}}function LoadCounties(path){if(path===undefined){path=''}document.getElementById("county").options.length=0;GetURL('/?event=mobileCounties&state_id='+document.getElementById("state").options[document.getElementById("state").selectedIndex].value,'processReqChangeLoadCounties')}function processReqChangeLoadCounties(){if(req.readyState==4){if(req.status==200){var response=req.responseXML.documentElement;if(response.getElementsByTagName('errors')[0].firstChild.data==0){document.getElementById("county").options[0]=new Option('','');if(response.getElementsByTagName('id')){for(var i=0;i<response.getElementsByTagName('id').length;i++){document.getElementById("county").options[document.getElementById("county").options.length]=new Option(unescape(response.getElementsByTagName('county')[i].firstChild.data),response.getElementsByTagName('id')[i].firstChild.data)}}}else{alert(response.getElementsByTagName('errors')[0].firstChild.data)}}else{alert("200: There was a problem retrieving the XML data:\n"+req.statusText)}}}function alertChange(){var display='none';if(document.getElementById('alert').options[document.getElementById('alert').selectedIndex].value=='weather'){display='block'}document.getElementById('weather_form_div').style.display=display}function footerSearch(){var current_search=1;var keywords=jQuery("#fq").val();var url='';if(current_search==1){url='/event/search/order/date/keywords/'+keywords}window.location.href=url}function changeAction(){var headerSearch=jQuery("#cse-search-box");headerSearch.action='/?event=googleSearch&page=google_search&cx=partner-pub-9136693947306445%3Ambzeg1-lcnf&cof=FORID%3A10&ie=ISO-8859-1&sa=Search'}function showLink(whichlink){var externalHref=jQuery(whichlink).attr('href');window.open(externalHref,"_blank");return false}function externalLinks(){var anchors=jQuery('a');for(var i=0;i<anchors.length;i++){var anchor=anchors[i];if(jQuery(anchor).attr('href')&&jQuery(anchor).attr('rel')=='external'){jQuery(anchor).click(function(){return showLink(this)})}}}function showHideTab(index,count,content_elementID,tab_elementID){for(var i=1;i<=count;i++){var className='';var display='none';if(i==index){display='block';className='active'}jQuery('#'+content_elementID+i).css('display',display);if(className===''){jQuery('#'+tab_elementID+i).removeClass()}else{jQuery('#'+tab_elementID+i).addClass(className)}}}function hideTab(tab_elementID,tab_num){jQuery('#'+tab_elementID+tab_num).css('display','none')}function update(){windowHandle.document.open();windowHandle.document.write('<br />');windowHandle.document.close()}function popUp(URL,h,w){var day=new Date();var id=day.getTime();var windowHandle=window.open(URL,id,'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width='+w+',height='+h+',left=0,top=0');if(!windowHandle.opener){windowHandle.opener=self}setTimeout(function(){update()},1000)}jQuery(function(){jQuery.fn.aToButton=function(){return this.each(function(){var btn=document.createElement('button');jQuery(btn).html(jQuery(this).html()).attr('href',jQuery(this).attr('href')||'').attr('class',jQuery(this).attr('class')||'').attr('title',jQuery(this).attr('title')||'').bind('click',function(e){location.href=jQuery(this).attr('href');return false});jQuery(this).replaceWith(btn)})};externalLinks()});var MainNavTimeout;var hideSubNav=function(hoverTab,hoverNav,selectNav){hoverNav.unbind("hover");window.clearTimeout(MainNavTimeout);MainNavTimeout=window.setTimeout(function(){hoverTab.removeClass("hover");hoverNav.hide();selectNav.show();jQuery("#subnav").removeClass("hover");jQuery("#subnav").addClass("current")},1000)};var loadNav=function(){jQuery("#mainnav li a").each(function(){var currentTabTag=jQuery("#mainnav li a.current").attr("title");var selectNav=jQuery("#subNav_"+currentTabTag);var hoverNav=jQuery("#subNav_Empty");jQuery(this).hover(function(){var hoverTab=jQuery(this);var isSelected=hoverTab.hasClass("current");var tag=hoverTab.attr("title").replace(/\s/g,'');if(jQuery("#subNav_"+tag).length){hoverNav=jQuery("#subNav_"+tag)}window.clearTimeout(MainNavTimeout);hoverNav.unbind("hover");hoverTab.parent().siblings().children().removeClass("hover");hoverTab.addClass("hover");hoverNav.siblings("*:visible").hide();hoverNav.show(0);hoverNav.parent().hover(function(){window.clearTimeout(MainNavTimeout)},function(){hideSubNav(hoverTab,hoverNav,selectNav)});if(!isSelected){jQuery("#subnav").removeClass("current");jQuery("#subnav").addClass("hover")}else{jQuery("#subnav").removeClass("hover");jQuery("#subnav").addClass("current")}},function(){var hoverTab=jQuery(this);var tag=hoverTab.attr("title").replace(/\s/g,'');if(jQuery("#subNav_"+tag).length){hoverNav=jQuery("#subNav_"+tag)}hoverNav.unbind("hover");hideSubNav(hoverTab,hoverNav,selectNav);hoverNav.parent().hover(function(){window.clearTimeout(MainNavTimeout)},function(){hideSubNav(hoverTab,hoverNav,selectNav)})})})};function isArray(value){var s=typeof value;if(s==='object'){if(value){if(typeof value.length==='number'&&!(value.propertyIsEnumerable('length'))&&typeof value.splice==='function'){return true}}}return false}function ajAd(divName){if(isArray(aj_div)&&typeof(aj_content)!='undefined'&&aj_content!=null){for(i=0;i<aj_div.length;i++){if(aj_div[i]==divName){document.write(aj_content[i]);break}}}}function ajPostOpen(){if(ajwin){if(aj_popunder){ajwin.blur()}}}function standardPopup(){if(ajwin==null){ajwin=window.open(ajad,"_blank",ajwinparams);ajPostOpen()}}function clickPopup(){if(!aj_popup_onclick_wrnd){return}if(window.Event){document.captureEvents(Event.CLICK)}document.onclick=standardPopup}function iePopup(){if(!aj_popup_ie_wrnd){return}document.write('<object id="clicksor_xx"'+' classid="clsid:2D360201-FFF5-11d1-8D03-00A0C959BC0A"'+' style="width:1;height:1;top:0;left:0;position:absolute;"'+' align="middle"><param name="ActivateApplets" value="1"></object>');if(document.getElementById("clicksor_xx")){document.getElementById("clicksor_xx").style.width='1';document.getElementById("clicksor_xx").style.height='1';setTimeout('iePopupCallback();',1000)}}function iePopupCallback(){try{ajwin=document.getElementById("clicksor_xx").DOM.Script.open(ajad,"_blank",ajwinparams);ajPostOpen()}catch(e){}if(ajwin==null){clickPopup()}}function popup(tag){ajwinparams="top=0,left=0,width="+aj_popup_width+",height="+aj_popup_height;ajad=tag;ajwin=null;standardPopup();if(ajwin==null){if(/MSIE/.test(navigator.userAgent)){iePopup()}else{clickPopup()}}}function param(name,value){if(typeof(value)!='undefined'&&value!=""){return name+value}return""}function pos(){if(typeof(aj_pos)=='undefined'){aj_pos=1}else{aj_pos++}return"&pos="+aj_pos}function pv(aj_pv){if(typeof(aj_pv)!='undefined'&&aj_pv==true){if(typeof(aj_pv_rnd)=='undefined'){aj_pv_rnd=Math.round((Math.random()+"")*10000000000000000)+1}return"&pv="+aj_pv_rnd}return""}if(typeof(aj_server)!='undefined'&&typeof(aj_adspot)!='undefined'&&typeof(aj_page)!='undefined'&&typeof(aj_zone)!='undefined'){aj_tag=aj_server;if(typeof(aj_div)!='undefined'&&aj_div!=null){view='mvj'}else if(typeof(aj_popup_title)!='undefined'&&aj_popup_title!=""){view='vh'}else{view='vj'}aj_tag+=aj_adspot+"/"+aj_page+"/"+view+"?z="+aj_zone;aj_tag+=param("&ch=",aj_ch);aj_tag+=param("&dim=",aj_dim);aj_tag+=param("&ct=",aj_ct);aj_tag+=pos();aj_tag+=param("&kw=",aj_kw);aj_tag+=pv(aj_pv);aj_tag+=param("&nc=",Math.round((Math.random()+"")*100000000)+1);aj_tag+=param("&click=",aj_click);if(typeof(aj_popup_title)!='undefined'&&aj_popup_title!=""){popup(aj_tag)}else{document.write('<'+'scr'+'ipt type="text/javas'+'cript" src="'+aj_tag+'"></'+'scr'+'ipt>')}}