/* break out of framesets */
if (window != top) top.location.href = 
window.location.href;

/* collapse/expand */
function expandcollapse (postid) { 
   whichpost = document.getElementById(postid); 
   if (whichpost.className=="postshown") { 
      whichpost.className="posthidden"; 
   } 
   else { 
      whichpost.className="postshown"; 
   } 
} 

/* popup */
/* Usage -- <a href="javascript:winpop('page.html',252,21,0,0,0);">blah</a> */
function winpop (url,w,h,scroll,resize,center) {
if (center) {
var winPos = ',top='+((screen.height - h) / 2)+',left='+((screen.width - w) / 2);
}
var scrollArg = (scroll == false) ? '' : ',scrollbars=1';
var resizeArg = (resize == false) ? '' : ',resizable=1';
flyout = window.open (url,"newin"+scroll+resize+center,"width=" + w + ",height=" + h + scrollArg + resizeArg + winPos);
flyout.resizeTo(w,h);
flyout.focus();
}

/* all other external links */
function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;