<!--

// Remember -- this page is cached!  If something goes on a lot of pages stuff it here so the
// user doesn't have to constantly reload it over and over again.

// If someone has framed us, break free
//
// This is not a procedure -- it runs when the page is loaded
//
if (window != window.top) {top.location.href = location.href;}

// Code to open small client window on request
//
// Usage startRemote(url) whre url = an actual URL
//
         var remote = null;
         var remoteUrl = null;
         var gt = unescape('%3e');

         function startRemote(url) {
//            if( !remote || remote.closed ){
              remote = window.open('', 'reviewclient', 'width=300,height=300,resizable=0,scrollbars=1,status=0');
//              remoteUrl = url;
//            }
//            else{
//               if( remoteUrl != url ) {
                  remote.location.href = url;
                  remoteUrl = url;
//               }
//            }
            remote.focus();
         }


// Sitemap Navigation
//
// If you add, change, or delete a page reference here don't forget to make the
// change to the sitemap.html page for those people who don't have or don't use
// javascript!!!!!
//
function sitemap() {
   document.writeln('<select name=siteselector onChange="var scratch=this.options[this.selectedIndex].value; this.selectedIndex=0;  document.location=scratch">');
   //the force change to site map before changing document location ensures document is reset if user presses the back button
   document.writeln('<option selected>Site Map');
   document.writeln('</select>');
   return true;
}

function setfocus() {
  if( document.f ){
    if( document.f.search ){
        document.f.search.focus();
    }
    else if( document.f.pubname ){
        document.f.pubname.focus();
    }
    else if( document.f.amount ){
        document.f.amount.focus();
    }
  }
}

function TimStatus(message)
{
  status=message;
}
function SetStatus(message)
{
  status=message;
  setTimeout('TimStatus("'+message+'")',1);
}
function selectAll(cbList,bSelect) {
 for (var i=0; i<cbList.length; i++) 
   cbList[i].selected = cbList[i].checked = bSelect
}

function reverseAll(cbList) {
  for (var i=0; i<cbList.length; i++) {
    cbList[i].checked = !(cbList[i].checked) 
    cbList[i].selected = !(cbList[i].selected)
  }
}

// functions for the story info popup
var inUse = 0;
function detail( text, event, color ){
        var x, y;
        if( event.x ){
                // IE
                x = event.x + document.body.scrollLeft;
        } else {
                // Mozilla
                x = event.pageX;
        }

        if( event.y ){
                // IE
                y = event.y + document.body.scrollTop;
        } else {
                // Mozilla
                y = event.pageY;
        }

        var tmp = document.getElementById( text ).innerHTML;

        tmp = tmp.replace( /^[\r\n\t ]*/g, "" );
        tmp = tmp.replace( /\n/g, "<br>" );

        document.getElementById( "detail" ).style.left = x + 15;
        document.getElementById( "detail" ).style.top = y + 15;
        document.getElementById( "detail" ).style.width = "45%";
        document.getElementById( "detail" ).style.wordWrap = "normal";
		document.getElementById( "detail" ).style.background = color;
        document.getElementById( "detail" ).style.visibility = "visible";
        document.getElementById( "detail" ).innerHTML = "<table border=0 cellspacing=0 cellpadding=4 " +
                ( color ? " style='background: " + color + ";'" : "" ) +
                "><tr><td class='left_small' style='text-align: left; word-wrap: normal;'>" + tmp + "</td></tr></table>";    
        // document.getElementById( "detail" ).innerHTML = "<p>" + tmp + "</p>";
        inUse = 1;
}

function closeDetail( delay ){
        inUse = 0;
        setTimeout( 'realCloseDetail()', delay );
}

function realCloseDetail(){
        if( inUse == 1 ) return;
        document.getElementById( "detail" ).style.visibility = "hidden";
}



//-->
