if (top.location != location) top.location.href = location.href;

function notice()
{
   menutext.style.left=document.body.scrollLeft+event.clientX;
   menutext.style.top=document.body.scrollTop+event.clientY;
   menutext.style.visibility = "visible";
   return false;
}

function hidenotice() { menutext.style.visibility = "hidden"; }
document.oncontextmenu = notice;


// COOKIE FUNCTIONS
// SET:
// function setIntroCookie() {
//   var expdate = new Date(); expdate.setTime (expdate.getTime() + 90*(24 * 60 * 60 * 1000)) // expires in 90 days
//   setCookie ('intro', 'true', expdate, '/');
// GET:
// if (acceptsCookies()) {
//   if ((!readCookie('intro')) || (readCookie('intro') == '')) { . . .

// does user accept cookies
function acceptsCookies()
{
  if (readCookie('acceptsCookies') == 'yes') { return true; }
  var answer;
  document.cookie = 'acceptsCookies=yes; path=/';
  if (document.cookie == '') answer = false; else answer = true;
  return answer;
}
// read cookies
function readCookie(name)
{
  if(document.cookie == '') return false;
  else return unescape(getCookieValue(name));
}
// get cookie values
function getCookieValue(name)
{
  var firstChar, lastChar, endOfName;
  var theBigCookie = document.cookie;
  firstChar = theBigCookie.indexOf(name);
  if((firstChar != -1) && (theBigCookie.charAt(firstChar + name.length) == '=')) {
    firstChar += name.length + 1;
    lastChar = theBigCookie.indexOf(';', firstChar);
    if(lastChar == -1) lastChar = theBigCookie.length;
    return theBigCookie.substring(firstChar, lastChar);
  } else {
    return false;
  }
}
// set cookies (if the user accepts them)
function setCookie (name, value)
{
 if (acceptsCookies()) {
  var argv = setCookie.arguments;
  var argc = setCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
 }
}
function deleteCookie(name)
{
  var exp = new Date();
  exp.setTime(exp.getTime() - 1);
  var cookieVal = getCookieValue(name);
  if (cookieVal != null) {
    setCookie(name, cookieVal, exp);
  }
  return;
}
// END OF COOKIE FUNCTIONS


// This checks if cookie is set to true (intro was viewed already)
/***********************************************************
if (acceptsCookies()) {
   if ((!readCookie('bdragonEclipse')) || (readCookie('bdragonEclipse') == '')) {
      var introfile = 'intro.html';
//      var thishost  = window.location.host;
//      var gointro   = "http://" + thishost + "/" + introfile;
      var gointro   = introfile;
      top.location  = gointro;
   }
}
*****************************************************/


