var ns4=document.layers;var op5=(navigator.userAgent.indexOf("Opera 5")!=-1)||(navigator.userAgent.indexOf("Opera/5")!=-1);var op6=(navigator.userAgent.indexOf("Opera 6")!=-1)||(navigator.userAgent.indexOf("Opera/6")!=-1);var agt=navigator.userAgent.toLowerCase();var mac=(agt.indexOf("mac")!=-1);var ie=(agt.indexOf("msie")!=-1);var mac_ie=mac&&ie;var cssdropdown={disappeardelay:250,dropmenuobj:null,ie:document.all,firefox:document.getElementById&&!document.all,showhide:function(obj,e,visible,hidden){if(this.ie||this.firefox){this.dropmenuobj.style.left=this.dropmenuobj.style.top='-500px';}
if(e.type=='click'&&obj.visibility==hidden||e.type=='mouseover'){obj.visibility=visible;}else if(e.type=='click'){obj.visibility=hidden;}},dropit:function(obj,e,dropmenuID){if(this.dropmenuobj !=null){this.dropmenuobj.style.visibility='hidden';}
this.clearhidemenu()
if(this.ie||this.firefox){obj.onmouseout=function(){cssdropdown.delayhidemenu();}
this.dropmenuobj=document.getElementById(dropmenuID);this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu();}
this.dropmenuobj.onmouseout=function(){cssdropdown.dynamichide(e);}
this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu();}
this.showhide(this.dropmenuobj.style,e,'visible','hidden');var objRect=getElementRect(obj);this.dropmenuobj.style.top=(objRect.bottom-3)+'px';this.dropmenuobj.style.left=(objRect.left-getElementRect(document.getElementById('navlist')).left+5)+'px';}},dynamichide:function(e){var evtobj=window.event?window.event:e;this.delayhidemenu()},delayhidemenu:function(){this.delayhide=setTimeout('cssdropdown.dropmenuobj.style.visibility="hidden"',this.disappeardelay);},clearhidemenu:function(){if(this.delayhide!='undefined'){clearTimeout(this.delayhide);}}}
var marketplacePromo={disappeardelay:250,persist:false,dropmenuobj:null,ie:document.all,firefox:document.getElementById&&!document.all,persist_random:function(){var vertical;switch(Math.round(3*Math.random())){case 0:vertical='jobs';break;case 1:vertical='homes';break;case 2:vertical='autos';break;case 3:vertical='merchandise';break;}
this.dropit(document.getElementById('marketplace_'+vertical+'_button'),{type:'mouseover'},'marketplace_'+vertical);this.persist=true;},showhide:function(obj,e,visible,hidden){if(this.ie||this.firefox){this.dropmenuobj.style.left=this.dropmenuobj.style.top='-500px';}
if(e.type=='click'&&obj.visibility==hidden||e.type=='mouseover'){obj.visibility=visible;}else if(e.type=='click'){obj.visibility=hidden;}},dropit:function(obj,e,dropmenuID){obj.src=obj.src.replace('_off','_on');if(this.dropmenuobj !=null){this.dropmenuobj.style.visibility='hidden';}
this.clearhidemenu()
if(this.ie||this.firefox){obj.onmouseout=function(){this.src=this.src.replace('_on','_off');marketplacePromo.delayhidemenu();}
this.dropmenuobj=document.getElementById(dropmenuID);this.dropmenuobj.onmouseover=function(){marketplacePromo.clearhidemenu();}
this.dropmenuobj.onmouseout=function(){marketplacePromo.dynamichide(e);}
this.dropmenuobj.onclick=function(){marketplacePromo.delayhidemenu();}
this.showhide(this.dropmenuobj.style,e,'visible','hidden');var objRect=getElementRect(document.getElementById('marketplace_button_container'));this.dropmenuobj.style.top=(objRect.top+33)+'px';this.dropmenuobj.style.left=(objRect.left-getElementRect(document.getElementById('navlist')).left)+'px';}},dynamichide:function(e){var evtobj=window.event?window.event:e;this.delayhidemenu()},delayhidemenu:function(){if(!this.persist){this.delayhide=setTimeout('marketplacePromo.dropmenuobj.style.visibility="hidden"',this.disappeardelay);}},clearhidemenu:function(){if(this.delayhide!='undefined'){clearTimeout(this.delayhide);}}}
function openwin(theURL,winName,features){window.open(theURL,winName,features);}
function removeChildNodes(ctrl){while(ctrl.childNodes[0]){ctrl.removeChild(ctrl.childNodes[0]);}}
function rect(){this.top=0;this.bottom=0;this.left=0;this.right=0;}
function getElementRect(obj){var rec=new rect();rec.top=getTopByRef(obj);rec.left=getLeftByRef(obj);rec.right=rec.left+getWidthByRef(obj);rec.bottom=rec.top+getHeightByRef(obj);return rec;}
function getTopByRef(obj){if(ns4){return obj.pageY;}else{yPos=obj.offsetTop;tempEl=obj.offsetParent;while(tempEl !=null){yPos+=tempEl.offsetTop;tempEl=tempEl.offsetParent;}
return yPos;}}
function getLeftByRef(obj){if(ns4){return obj.pageX;}else{xPos=obj.offsetLeft;tempEl=obj.offsetParent;while(tempEl !=null){xPos+=tempEl.offsetLeft;tempEl=tempEl.offsetParent;}
return xPos;}}
function getHeightByRef(obj){if(ns4){return obj.clip.height;}else{if(op5){xPos=obj.style.pixelHeight;}else{xPos=obj.offsetHeight;}
return xPos;}}
function getWidthByRef(obj){if(ns4){return obj.clip.width;}else{if(op5){xPos=obj.style.pixelWidth;}else{xPos=obj.offsetWidth;}
return xPos;}}
function createAnchor(href,text){eAnchor=document.createElement('a');eAnchor.setAttribute('href',href);eAnchor.appendChild(document.createTextNode(text));return eAnchor;}
function constructNav(){removeChildNodes(document.getElementById('dropmenu1'));document.getElementById('dropmenu1').appendChild(createAnchor('http://www.dailyherald.com/news/county/cook/','\u2022 Cook County'));document.getElementById('dropmenu1').appendChild(createAnchor('http://www.dailyherald.com/news/county/dupage/','\u2022 DuPage County'));document.getElementById('dropmenu1').appendChild(createAnchor('http://www.dailyherald.com/news/county/kane/','\u2022 Kane County'));document.getElementById('dropmenu1').appendChild(createAnchor('http://www.dailyherald.com/news/county/lake/','\u2022 Lake County'));document.getElementById('dropmenu1').appendChild(createAnchor('http://www.dailyherald.com/news/county/mchenry/','\u2022 McHenry County'));document.getElementById('dropmenu1').appendChild(createAnchor('http://www.dailyherald.com/news/illinois/','Illinois'));document.getElementById('dropmenu1').appendChild(createAnchor('http://www.dailyherald.com/news/chicago/','Chicago'));document.getElementById('dropmenu1').appendChild(createAnchor('http://www.dailyherald.com/news/nationworld/','Nation & World'));document.getElementById('dropmenu1').appendChild(createAnchor('http://www.dailyherald.com/obits/','Obituaries'));document.getElementById('dropmenu1').appendChild(createAnchor('http://www.dailyherald.com/news/politics/','Politics'));document.getElementById('dropmenu1').appendChild(createAnchor('http://www.dailyherald.com/special/','Special Reports'));removeChildNodes(document.getElementById('dropmenu2'));document.getElementById('dropmenu2').appendChild(createAnchor('http://www.dailyherald.com/opinion/','Editorials'));document.getElementById('dropmenu2').appendChild(createAnchor('http://www.dailyherald.com/opinion/#letters','Letters'));removeChildNodes(document.getElementById('dropmenu3'));document.getElementById('dropmenu3').appendChild(createAnchor('http://finance.dailyherald.com/dailyherald','Stocks / Market Info'));document.getElementById('dropmenu3').appendChild(createAnchor('http://www.dailyherald.com/classified/realestate/propertytransfers/','Property Transfers'));document.getElementById('dropmenu3').appendChild(createAnchor('http://chicago.dailyherald.il-foreclosure.com/','Foreclosures'));removeChildNodes(document.getElementById('dropmenu4'));document.getElementById('dropmenu4').appendChild(createAnchor('http://www.dailyherald.com/sports/prep/','Prep'));document.getElementById('dropmenu4').appendChild(createAnchor('http://www.dailyherald.com/sports/prep/basketball/boys/','\u2022 Boy\'s Basketball'));document.getElementById('dropmenu4').appendChild(createAnchor('http://www.dailyherald.com/sports/prep/basketball/girls/','\u2022 Girl\'s Basketball'));document.getElementById('dropmenu4').appendChild(createAnchor('http://www.dailyherald.com/sports/bears/','Bears'));document.getElementById('dropmenu4').appendChild(createAnchor('http://www.dailyherald.com/sports/cubs/','Cubs'));document.getElementById('dropmenu4').appendChild(createAnchor('http://www.dailyherald.com/sports/college/','College'));document.getElementById('dropmenu4').appendChild(createAnchor('http://www.dailyherald.com/sports/blackhawks/','Blackhawks'));document.getElementById('dropmenu4').appendChild(createAnchor('http://www.dailyherald.com/sports/bulls/','Bulls'));document.getElementById('dropmenu4').appendChild(createAnchor('http://www.dailyherald.com/sports/fire/','Fire'));document.getElementById('dropmenu4').appendChild(createAnchor('http://www.dailyherald.com/sports/whitesox/','White Sox'));document.getElementById('dropmenu4').appendChild(createAnchor('http://www.dailyherald.com/sports/wolves/','Wolves'));removeChildNodes(document.getElementById('dropmenu5'));document.getElementById('dropmenu5').appendChild(createAnchor('http://www.dailyherald.com/entertainment/movies/','Movies'));document.getElementById('dropmenu5').appendChild(createAnchor('http://www.dailyherald.com/entertainment/music/','Music'));document.getElementById('dropmenu5').appendChild(createAnchor('http://www.dailyherald.com/entertainment/','Time out!'));document.getElementById('dropmenu5').appendChild(createAnchor('http://www.dailyherald.com/entertainment/puzzles/','Puzzles'));document.getElementById('dropmenu5').appendChild(createAnchor('http://alliance.zap2it.com/zp_mt_front_page/?site_code=ilahhe','Movie Times'));document.getElementById('dropmenu5').appendChild(createAnchor('http://affiliate.zap2it.com/tvlistings/ZCGrid.do?aid=ilahhe','TV Listings'));removeChildNodes(document.getElementById('dropmenu6'));document.getElementById('dropmenu6').appendChild(createAnchor('http://www.dailyherald.com/lifestyle/food/','Food'));document.getElementById('dropmenu6').appendChild(createAnchor('http://www.dailyherald.com/lifestyle/health/','Health & Fitness'));document.getElementById('dropmenu6').appendChild(createAnchor('http://www.dailyherald.com/lifestyle/homegarden/','Home & Garden'));document.getElementById('dropmenu6').appendChild(createAnchor('http://www.dailyherald.com/lifestyle/travel/','Travel'));document.getElementById('dropmenu6').appendChild(createAnchor('http://www.dailyherald.com/lifestyle/realestate/','Real Estate'));document.getElementById('dropmenu6').appendChild(createAnchor('http://www.dailyherald.com/lifestyle/commitments/select.asp?wea=a','\u2022 Anniversaries'));document.getElementById('dropmenu6').appendChild(createAnchor('http://www.dailyherald.com/lifestyle/commitments/select.asp?wea=e','\u2022 Engagements'));document.getElementById('dropmenu6').appendChild(createAnchor('http://www.dailyherald.com/lifestyle/commitments/select.asp?wea=w','\u2022 Weddings'));removeChildNodes(document.getElementById('dropmenu7'));document.getElementById('dropmenu7').appendChild(createAnchor('http://adfare04.adfare.com/ads/dailyherald/giftguide/page.htm','Holiday Gift Guide'));document.getElementById('dropmenu7').appendChild(createAnchor('http://www.dailyherald.com/classified/ad_index.asp','Place an Ad'));document.getElementById('dropmenu7').appendChild(createAnchor('http://www.dailyherald.com/classified/autos.asp','Autos'));document.getElementById('dropmenu7').appendChild(createAnchor('http://homes.dailyherald.com','Homes for Sale'));document.getElementById('dropmenu7').appendChild(createAnchor('http://www.dailyherald.com/classified/browse.asp?c=6000','Rentals'));document.getElementById('dropmenu7').appendChild(createAnchor('http://www.dailyherald.com/jobs/','Jobs'));document.getElementById('dropmenu7').appendChild(createAnchor('http://www.dailyherald.com/classified/browse.asp?c=7000','Merchandise'));document.getElementById('dropmenu7').appendChild(createAnchor('http://www.dailyherald.com/classified/browse.asp?c=4000','Announcements'));document.getElementById('dropmenu7').appendChild(createAnchor('http://adsonline.dailyherald.com/AS/Home.aspx?advid=800021','Service Directory'));document.getElementById('dropmenu7').appendChild(createAnchor('http://www.dailyherald.com/garagesales/','Garage Sales'));document.getElementById('dropmenu7').appendChild(createAnchor('http://dailyherald.mycapture.com/mycapture/index.asp','Photo Reprints'));document.getElementById('dropmenu7').appendChild(createAnchor('http://beta.dailyherald.com/classified/','More Classifieds'));}
var dropDownCommunityList=Array('Addison','Algonquin','Antioch','Arlington Heights','Aurora','Bannockburn','Barrington','Barrington Hills','Bartlett','Batavia','Bensenville','Bloomingdale','Bolingbrook','Buffalo Grove','Campton Hills','Carol Stream','Carpentersville','Cary','Darien','Deer Park','Des Plaines','Diamond Lake','Downers Grove','East Dundee','Elburn','Elgin','Elk Grove Village','Elmhurst','Fox Lake','Fox River Grove','Gages Lake','Geneva','Gilberts','Glen Ellyn','Glencoe','Glendale Heights','Grandwood Park','Grayslake','Green Oaks','Gurnee','Hainesville','Hampshire','Hanover Park','Hawthorn Woods','Hinsdale','Hoffman Estates','Huntley','Island Lake','Inverness','Itasca','Kenneyville','Kildeer','Lake Barrington','Lake in the Hills','Lake Villa','Lake Zurich','Lakemoor','Libertyville','Lily Lake','Lilymoor','Lincolnshire','Lindenhurst','Lisle','Lombard','Long Grove','Maple Park','McHenry','Medinah','Mettawa','Mount Prospect','Mundelein','Naperville','North Aurora','North Barrington','Northbrook','Oak Brook','Oakbrook Terrace','Oswego','Palatine','Plainfield','Prospect Heights','Rolling Meadows','Roundout','Roselle','Rosemont','Round Lake','Round Lake Beach','Round Lake Heights','Round Lake Park','Schaumburg','Sleepy Hollow','South Barrington','South Elgin','St. Charles','Streamwood','Sugar Grove','Third Lake','Tower Lakes','Vernon Hills','Villa Park','Volo','Wadsworth','Warrenville','Wauconda','Waukegan','Wayne Township','West Chicago','West Dundee','Westmont','Wheaton','Wheeling','Winfield','Wood Dale','Woodridge','Woodstock')
function constructCommunityDropDown(target){if(target.options.length<=1){for(var i=0;i<dropDownCommunityList.length;i++){target.options[target.options.length]=new Option(dropDownCommunityList[i],'http://www.dailyherald.com/news/community/'+dropDownCommunityList[i].toLowerCase().replace(/[ ]/g,'_').replace(/[.]/g,''));}}}
function performSearch(which){if(document.getElementById(which+'_search_web').checked){document.location='http://search.dailyherald.com/results/web/?Query='+document.getElementById(which+'_search_box').value;}else{document.location='http://search.dailyherald.com/results/news/?Query='+document.getElementById(which+'_search_box').value;}}

