
var dacookie=new yg_cookie();var pagecookie="YNEWSVIEW";var localcookie="YNEWSLOCALMETRO";var expirestime=new Date()
expirestime.setTime(expirestime.getTime()+60*60*24*365*10000);if(dacookie.get(pagecookie)){var cookie2=dacookie.get(pagecookie);if(cookie2){if(cookie2==0||cookie2==1)showhidesumm();}}
function switchinit(){if(document.getElementById('switcheroo')){var switcheroo=document.getElementById('switcheroo');if(switcheroo){var menuopts=switcheroo.getElementsByTagName('A');for(var c=0;c<menuopts.length;c++){menuopts[c].onclick=showhidesumm;menuopts[c].value=c;}}}}
function showhidesumm(){var hide='headlines';var show='headlines addsumm';var plusimg='headlines addsumm addimg';var dalink;if(this.value>-1){dalink=this.value;}else{dalink=cookie2;}
if(dacookie.get(pagecookie))dacookie.remove(pagecookie);if(dalink==1){divclass=show;dacookie.set(pagecookie,1,expirestime,"/");}else if(dalink==2){divclass=plusimg;dacookie.set(pagecookie,2,expirestime,"/");}else{divclass=hide;dacookie.set(pagecookie,0,expirestime,"/");}
var objcont=document.getElementById('indexstories');var child1=objcont.firstChild;while(child1){if(child1.className=='subsection'||child1.className=='subsection first'){var child2=child1.firstChild;while(child2){if(child2.className==hide||child2.className==show||child2.className==plusimg||child2.nodeName=='OL'){child2.className=divclass;}
child2=child2.nextSibling;}}
child1=child1.nextSibling;}
var switcheroo=document.getElementById('switcheroo');if(switcheroo){var menuopts=switcheroo.getElementsByTagName('A');for(var c=0;c<menuopts.length;c++){if(c==dalink){menuopts[c].className="on";}else{menuopts[c].className="";}}}
return false;}
function setmetro(value){value=value.replace("/l/","");if(dacookie.get(localcookie))dacookie.remove(localcookie);dacookie.set(localcookie,value,expirestime,"/","news.yahoo.com");}
