function openPodcastArchive(){var left = 100;var top = 100;var width = 640;var height = 480;window.open('/Apps/PodcastArchive/podcastPlayer.htm','podcast_player','left='+left+',top='+top+',width='+width+',height='+height+',menubar=no,location=no,resizable=no,scrollbars=no,status=no,tollbar=no,dialog=no,titlebar=no');}

function OpenFlash(flashfile, width, height, flashVars) {document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='" + width + "' height='" + height + "'><param name='flashVars' value='"+flashVars+"' /><param name='allowScriptAccess' value='sameDomain' /><param name='allowFullScreen' value='false' /><param name='movie' value='" + flashfile + "' /><param name='loop' value='false' /><param name='quality' value='high' /><param name='wmode' value='transparent' /><param name='bgcolor' value='#ffffff' /><embed src='" + flashfile + "' flashVars='"+flashVars+"' loop='false' quality='high' wmode='transparent' bgcolor='#ffffff' width='" + width + "' height='" + height + "' name='Test' allowScriptAccess='sameDomain' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object>"); }

function OpenTodaysMediaFlash(flashfile, width, height, id) {document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' id='"+id+"' width='" + width + "' height='" + height + "'><param name='allowScriptAccess' value='Always' /><param name='allowFullScreen' value='false' /><param name='movie' value='" + flashfile + "' /><param name='loop' value='false' /><param name='quality' value='high' /><param name='wmode' value='transparent' /><param name='bgcolor' value='#ffffff' /><embed src='" + flashfile + "' loop='false' quality='high' wmode='transparent' bgcolor='#ffffff' width='" + width + "' height='" + height + "' name='"+id+"' allowScriptAccess='Always' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed></object>"); }

function OpenOmnitureFlash(VideoID,PlayerID,Width,Height,AdServer,AutoStart) {	document.write("<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='" + Width + "' height='" + Height + "' id='omniturePlayer' align='middle'><param name='allowScriptAccess' value='always' /><param name='movie' value='http://www.slate.com/video/omniturePlayer.swf?actionSourcePath=http://www.slate.com/video/&adServerURL=" + AdServer + "&videoId=" + VideoID + "&videoRef=null&lineupId=null&playerTag=null&autoStart=" + AutoStart + "&pwidth=" + Width + "&pheight=" + Height + "&playerId=" + PlayerID + "&flashId=omniturePlayer' /><param name='quality' value='high' /><param name='bgcolor' value='#FFFFFF' /><embed src='http://www.slate.com/video/omniturePlayer.swf?actionSourcePath=http://www.slate.com/video/&adServerURL=" + AdServer + "&videoId=" + VideoID + "&videoRef=null&lineupId=null&playerTag=null&autoStart=" + AutoStart + "&pwidth=" + Width + "&pheight=" + Height + "&playerId=" + PlayerID + "&flashId=omniturePlayer' quality='high' bgcolor='#FFFFFF' width='" + Width + "' height='" + Height + "' name='omniturePlayer' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object>"); }

function insertAudioPlayer(soundfile, extFile) { document.write('<object width="244" height="46" align="middle" id="audioplayer" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param value="sameDomain" name="allowScriptAccess"></param><param value="http://www.slate.com/apps/audioplayer.swf?soundfile='+soundfile+'&externalFile='+extFile+'" name="movie"></param><param value="high" name="quality"></param><param value="#ffffff" name="bgcolor"></param><embed width="244" height="46" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowscriptaccess="sameDomain" name="audioplayer" bgcolor="#ffffff" quality="high" src="http://www.slate.com/apps/audioplayer.swf?soundfile='+soundfile+'&externalFile='+extFile+'"></embed></object>') }

function OpenSurroundVideo(file, width, height, filepath){if (width == null || width == "")width="320"; if (height==null || height =="")height="240";  myvideo = "<object classid='clsid:928626A3-6B98-11CF-90B4-00AA00A4011F' type='application/x-oleobject' id='Surround1'" + " codebase='" + filepath+ "apps/svj/MSSurVid.cab#Version=1,2,0,20' width='" +width + "' height='" + height + "'>" + "<param name='SurroundRect' value='0,0,320,240' /><param name='Image' value='"+file+"'></param></object>";  document.write(myvideo); }
function OpenWindowsMedia(file){document.write("<embed type='application/x-mplayer2' name='MediaPlayer' autostart='true'  src='" + file + "'></embed>"); }
function OpenQuickTime(file, width, height){document.write("<embed PLUGINSPAGE='http:/" + "/www.apple.com/quicktime/download/' src='"+ file +"' width='"+width+"' height='"+height+"'></embed>"); }
// Above are functions for activex components

function SlatePopup(div) {
	var win = window.open("","win","directories=no,height=400,width=550,menubar=no,resizeable=no,scrollbars=no,status=no,toolbar=no");
	win.document.write("<html><head><title>Slate Popup</title><link rel=\"stylesheet\" type=\"text/css\" href=\"/css/popups.css\" /></head><body></body></html>");
	win.document.body.innerHTML = div.innerHTML;
	win.document.close();
	win.focus();
	return;
	}

function toolAction(action, id, tocid) {var title; var windowParam; if (id==''){var url = window.location.href; var idPos = url.indexOf("id="); if (idPos != -1){var ampPos = url.indexOf("&"); if (ampPos != -1)id = url.substring(idPos+3,ampPos); else id = url.substr(idPos+3); }}var URLParam = "?action="+action+"&id="+id; if (id=='toc')URLParam += "&tocid="+tocid; switch (action) {case 'print':title=''; windowParam = 'toolbar=no,location=no,directories=no,menubar=yes,status=no,resizable=yes,scrollbars=yes,width=640,height=480,'; window.open("/toolbar.aspx"+URLParam, title, windowParam); break; case 'email':title='Email'; windowParam = 'toolbar=no,location=no,directories=no,menubar=no,status=no,resizable=yes,scrollbars=no,width=490,height=470'; window.open("/toolbar.aspx"+URLParam, title, windowParam); break; }}/*End Toolbar Navigation *//* MSN Shell functions */

function showHideSidebar(){if(document.all)var iWidth = document.body.clientWidth; document.all.sidebarshell.style.display = (iWidth > 913 ? '' : 'none'); document.all.sidebarshell.style.height = document.body.scrollHeight - 1; }/* End MSN Shell functions *//* This function will resize the iframe so that there are no scrollbars */

function LoadIframe(el){var n = el.name; var h = document.frames(n).document.body.scrollHeight; el.height = h; window.focus(); }var MenuDelay = 50; var timerShowMenu; 

function IsLessThanIE55(){var version = window.navigator.appVersion; var pos = version.indexOf("MSIE"); if (pos != -1){var numberVersion = Number(version.substr(pos+5,3)); if (numberVersion < 5.5)return true; else return false; } else return false; }

// Used for most read, e-mailed
function clearAllTabs() {	for(k=1;k<=2;k++) 	{		document.getElementById('link'+k).className='normal';		document.getElementById('tab'+k).style.display='none';	} }
function selectTab(id) {	clearAllTabs();	document.getElementById('link'+id).className='current';	document.getElementById('tab'+id).style.display='inline'; }

// Image preload script
var myimages=new Array(); function preloadimages() {  for (i=0;i<preloadimages.arguments.length;i++)  {    myimages[i]=new Image();    myimages[i].src=preloadimages.arguments[i];  } } preloadimages("http://img.slate.com/images/redesign/nav_arrow_over.gif","http://img.slate.com/images/toolbox_images/enve_roll.gif","http://img.slate.com/images/toolbox_images/findiscuss_roll.gif","http://img.slate.com/images/toolbox_images/folder_roll.gif","http://img.slate.com/images/toolbox_images/papers_roll.gif","http://img.slate.com/images/toolbox_images/podcasting_roll.gif","http://img.slate.com/images/toolbox_images/print_roll.gif","http://img.slate.com/images/toolbox_images/rec_roll.gif","http://img.slate.com/images/redesign/bread_crumbing/bc_arrow_roll.gif", "http://img.slate.com/images/redesign/seo_roll.gif", "http://img.slate.com/images/redesign/flyout_rule.gif");

// Flyout menus
var ActiveMenu = null;
var closeMenu;
var recIsOpen = false;

function showMenu(menuNum) {	clearTimeout(closeMenu);	var whichMenu = parseInt(menuNum);	if (ActiveMenu != null) {	if (ActiveMenu == 1) { document.getElementById("menuF" + ActiveMenu).style.backgroundColor="#FF0"; document.getElementById("menuF" + ActiveMenu).style.color="#603"; } else { document.getElementById("menuF" + ActiveMenu).style.backgroundColor="#603"; document.getElementById("menuF" + ActiveMenu).style.color="#FFF";	}	}	if (readCookie("slateflyout") != "off") { document.getElementById("flyout_container").innerHTML = flyoutArray[whichMenu - 1]; } 	var highlightLink = document.getElementById("menuF" + whichMenu);	highlightLink.style.backgroundColor="#FFF";	highlightLink.style.color="#000";	ActiveMenu = whichMenu; }
function hideMenu() {
	document.getElementById("flyout_container").innerHTML = "";	var highlightLink = document.getElementById("menuF" + ActiveMenu);	highlightLink.style.backgroundColor="#603";	highlightLink.style.color="#FFF";	ActiveMenu = null;}
function hideMenuYellow() {
	document.getElementById("flyout_container").innerHTML = "";	var highlightLink = document.getElementById("menuF" + ActiveMenu);	highlightLink.style.backgroundColor="#FF0";	highlightLink.style.color="#603";	ActiveMenu = null;}

// Turn off flyouts
function flyoutTurnoff() { var date = new Date(); date.setTime(date.getTime()+(10000*24*60*60*1000)); document.cookie = "slateflyout=off; expires=" + date.toGMTString() + "; path=/"; window.location.reload(); }
function flyoutTurnon() { var date = new Date(); date.setTime(date.getTime()+(-1*24*60*60*1000)); document.cookie = "slateflyout=off; expires=" + date.toGMTString() + "; path=/"; window.location.reload(); }
function flyoutSwitch() { if (readCookie("slateflyout") != "off") { document.write("<div class='flyout_toggler'><a class='flyout_switch' href='javascript:flyoutTurnoff()'>Disable Flyout</a><a href='http://www.slate.com/id/2147826/'><img src='http://www.slate.com/images/redesign/disableflyout_infocircle.gif' width='13' height='13' alt='What does disabling the flyout do?' /></a></div>"); } else { document.write("<div class='flyout_toggler'><a class='flyout_switch' href='javascript:flyoutTurnon()'>Enable Flyout</a><a href='http://www.slate.com/id/2147826/'><img src='http://www.slate.com/images/redesign/disableflyout_infocircle.gif' width='13' height='13' alt='What does disabling the flyout do?' /></a></div>"); } }
function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; }

// Open "recommend" link
function ToolbarRecommend(whichRec) {
	if (recIsOpen == false) {		document.getElementById(whichRec).style.display="block";		recIsOpen = true;	} else {		document.getElementById(whichRec).style.display="none";		recIsOpen = false;	}
}
function closeRec(whichRec) {
	document.getElementById(whichRec).style.display="none";	recIsOpen = false;
}

// Toolbar mouseover
function ToolbarMouseOver(whichMenu, rootpath) {
	var navImage = whichMenu + "_icon";	var navAnchor = whichMenu + "_link";	document.images[navImage].src = (rootpath + "images/toolbox_images/" + whichMenu + "_roll.gif");	document.getElementById(navAnchor).style.color = "#FF0";}
function ToolbarMouseOut(whichMenu, rootpath) {
	var navImage = whichMenu + "_icon";	var navAnchor = whichMenu + "_link";	document.images[navImage].src = (rootpath + "images/toolbox_images/" + whichMenu + ".gif");
	document.getElementById(navAnchor).style.color = "#FFF";}
	
// Multipart navigation functions
var MultipartHeadlines = new Array();	var CurrentEntry = null;
function PopulateMultipartArray(ArrayIndex, Headline, FromByline, ToByline, PubDate, thisHeadline) {	var whichElement = parseInt(ArrayIndex);		MultipartHeadlines[whichElement] = [Headline,FromByline,ToByline,PubDate];	if (thisHeadline == '1')		CurrentEntry = whichElement;} function MultipartMouseOver(whichSwap, TopBottomSwitch) {	whichElement = parseInt(whichSwap);	TopOrBottom = "multipart" + TopBottomSwitch;	if (MultipartHeadlines[whichElement][2] == 'null') {	document.getElementById(TopOrBottom).innerHTML = ("<span class='to_from_author'>" + MultipartHeadlines[whichElement][1] + "</span><h2>" + MultipartHeadlines[whichElement][0] + "</h2><span class='multipart_date'>Posted " + MultipartHeadlines[whichElement][3] + "</span>");	} else {		document.getElementById(TopOrBottom).innerHTML = ("<span class='to_from_author'>" + MultipartHeadlines[whichElement][1] + "<br />" + MultipartHeadlines[whichElement][2] + "</span><h2>" + MultipartHeadlines[whichElement][0] + "</h2><span class='multipart_date'>Posted " + MultipartHeadlines[whichElement][3] + "</span>");	}}
function MultipartMouseOut(TopBottomSwitch) {	TopOrBottom = "multipart" + TopBottomSwitch;	if (MultipartHeadlines[CurrentEntry][2] == 'null') {	document.getElementById(TopOrBottom).innerHTML = ("<span class='to_from_author'>" + MultipartHeadlines[CurrentEntry][1] + "</span><h2>" + MultipartHeadlines[CurrentEntry][0] + "</h2><span class='multipart_date'>Posted " + MultipartHeadlines[CurrentEntry][3] + "</span>");	} else {		document.getElementById(TopOrBottom).innerHTML = ("<span class='to_from_author'>" + MultipartHeadlines[CurrentEntry][1] + "<br />" + MultipartHeadlines[CurrentEntry][2] + "</span><h2>" + MultipartHeadlines[CurrentEntry][0] + "</h2><span class='multipart_date'>Posted " + MultipartHeadlines[CurrentEntry][3] + "</span>");	} }
