/*
 *   Coding Domain scripting functions: Bring to top frameset
 *
 *   Copyright (c) 2001 Diederik van der Boor - All Rights Reserved
 *   http://www.codingdomain.com
 *   webmaster@codingdomain.com
 */


// ----------------------------------------------------------------------
// Redirect to frameset

var THIS_SITE = GetSiteLocation();

if (self != top)
{
  var Popup = window.open(THIS_SITE + "index.html", "")
  window.location.replace(THIS_SITE + 'errordocs/blank.html');
  alert("The frameset page was accessed from an other website, which could cause unexpected errors.\nTo avoid those problems, the page has been opened in a new window!");
  Popup.focus();
}



// ----------------------------------------------------------------------
// Path and status bar path functions

function GetDirPath(URL)
{
  return unescape(URL.substring(0, URL.lastIndexOf("/") + 1));
}

function GetSiteLocation()
{
  var PROT = (window.location.protocol || "http:");
  var SITE = PROT + "\/\/" + (window.location.host || ((window.location.hostname || "") + ":" + (window.location.port || "80"))) + "/";
  if (SITE == PROT + "\/\/:80\/") { SITE = GetDirPath(window.location.href); }
  return SITE
}
