/* ****** collapsible section in page tools with + - images ********* */
function toggleMenu(objID,objParentID) {
if (!document.getElementById) return;
var ob = document.getElementById(objID).style;
var ctrlOb = document.getElementById(objParentID).style;
 //test Tech Insider
 if(ob.display == 'none'){
  ob.display = 'block';
  ctrlOb.backgroundImage = 'url(http://www.nextgov.com/css/icon_tools_share_minus.gif)';
 }else{
  ob.display = 'none';
  ctrlOb.backgroundImage = 'url(http://www.nextgov.com/css/icon_tools_share_plus.gif)';
 } 
}

function hideMenuOnLoad(objID){  // same objID that's passed to toggleMenu()
 /* ***
 * can't have display:none in CSS - JS might be disabled in browser, can do
 *	1. call this function from <body onload=()> to initially collapse the menu
 *	2. or set "display:block" for collapsible list inside <noscript> tag 
 *** */
 if (!document.getElementById) return;
 var ob = document.getElementById(objID).style;
 ob.display = 'none';
}



/* ****** page tools:share on facebook specific encode-url javascript ******* */
function fbs_click() {
// inside <a> javascript:void(window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent('http://www.washingtonpost.com/wp-dyn/content/article/2008/10/10/AR2008101000003.html?referrer=facebook')+'&t='+encodeURIComponent('Dispelling Illusions'),'sharer','toolbar=no,width=642,height=436'));
 u=location.href;
 t=document.title;
 window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolbar=0,status=0,width=626,height=436');
 return false;
} 


$(document).ready(function(){toggleMenu('page-tools-share-list','page-tools-share');});

