var oldTimer = true;

if (parseInt(navigator.appVersion) >= 4) {
  oldTimer = false;
  var browserVar = navigator.platform;
  var isWin = browserVar.indexOf("Win") != -1;
  var isMac = browserVar.indexOf("Mac") != -1;
  if (document.layers) {
    var n4 = true;
  } else if (document.getElementById && !(document.all)) {
    var ns = true;
  } else if (document.getElementById && document.all) {
    var ie = true;
  } else if(document.all) {
    var i4 = true;
  }
}

is = new BrowserCheck();
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;

function BrowserCheck() {
	var b = navigator.appName
	if (b=="Netscape") this.b = "ns"
	else if (b=="Microsoft Internet Explorer") this.b = "ie"
	else this.b = b
	this.v = parseInt(navigator.appVersion)
	this.ns = (this.b=="ns" && this.v>=4)
}

function getAttr(height,width){
if (is.ns) {
         // Center on the main window.
         dialogleft = window.screenX + ((window.outerWidth - width) / 2);
         dialogtop = window.screenY + ((window.outerHeight - height) / 2);
         var attr = "screenX=" + dialogleft + ",screenY=" + dialogtop + ",width=" + width + ",height=" + height;
      } else if (isIE){
         // The best we can do is center in screen.
         dialogleft = (screen.width - width) / 2;
         dialogtop = (screen.height - height) / 2;
         var attr = "left=" + dialogleft + ",top=" + dialogtop + ",width=" + width + ",height=" + height;
      } else {
      	 var attr = "width=" + width + ",height=" + height;
      }
      return (attr);
}

function OpenCopyright(){
	attr = getAttr(575,620);
	dialog = window.open('../legal/copyright.html','copyright','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,' + attr);
	dialog.opener = this;
}

function OpenCredits(){
	attr = getAttr(150,260);
	dialog = window.open('../legal/credits.html','credits','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,' + attr);
	dialog.opener = this;
}

