function help(whichfile) {
  var properties = "height=300,width=680,channelmode=0,dependent=0,";
  properties += "directories=0,fullscreen=0,location=0,menubar=0,";
  properties += "resizable=1,scrollbars=1,status=1,toolbar=1,";
  properties += "screenX=80,screenY=60,top=60,left=80";
  myRemote = launchNewRemote ('http://www.hexrod.net/Hexrod/hexrod-doc.html#'+whichfile,
   "myRemote",properties,"myWindow");
}   
function launchNewRemote(newURL, newName, newFeatures, orgName) {
  remote = open(newURL, newName, newFeatures);
  if (remote.opener == null) { remote.opener = window; }
  remote.opener.name = orgName;
  return remote;
}  
function get_cookie ( cookie_name )
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}

function set_library_cookie()
{

/* Set the cookie for the user's rod library but not for libraries
   Common or Rodmakers */

var name="hexrod_rodlib";
var expires=300;
var path="/";
var domain="hexrod.net";
var secure="";

var value=document.getlib.rodlibrary.value;
if (value != "Rodmakers" && value != "Commons") {
// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct
expires time, the current script below will set
it for x number of days, to make it for hours,
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}



}
function set_decimalsep_cookie()
{

/* Set the cookie for the user's rod library but not for libraries
   Common or Rodmakers */

var name="hexrod_decimalsep";
var expires=300;
var path="/";
var domain="hexrod.net";
var secure="";

var value=document.start_new_rod.decimalsep.value;

// set time, it's in milliseconds
var today = new Date();
today.setTime( today.getTime() );

/*
if the expires variable is set, make the correct
expires time, the current script below will set
it for x number of days, to make it for hours,
delete * 24, for minutes, delete * 60 * 24
*/
if ( expires )
{
expires = expires * 1000 * 60 * 60 * 24;
}
var expires_date = new Date( today.getTime() + (expires) );

document.cookie = name + "=" +escape( value ) +
( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
( ( path ) ? ";path=" + path : "" ) +
( ( domain ) ? ";domain=" + domain : "" ) +
( ( secure ) ? ";secure" : "" );
}


function default_rodlib ()
{
/* This function retrieves both rodlib and decimalsep cookies */

var rodlibrary_cookie = get_cookie ( "hexrod_rodlib" );
if (rodlibrary_cookie == undefined) {rodlibrary_cookie = "";}
document.getlib.rodlibrary.value = rodlibrary_cookie; 
var decsep_cookie = get_cookie ( "hexrod_decimalsep" );
if (decsep_cookie == "Comma") {
document.start_new_rod.decimalsep.selectedIndex=1;
}
else {
document.start_new_rod.decimalsep.selectedIndex=0;
}
document.compare.complibrary.value = rodlibrary_cookie;
}

function closeMe()
{
var win=window.open(”",”_self”);
win.close();
}
