document.domain="mlb.nb.ca";

function closeIt(href,name,h,w){
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='resizable=yes';
      
  if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 4){
        window.open(href,name,settings);       
  }else{ 
        if (readCookie("LOGGEDIN")){	
	    window.open(href,name,settings);
        }	
  }
}

function readCookie(name){
   var firstChar; 
   var theBigCookie = document.cookie;
   firstChar = theBigCookie.indexOf(name);
   if(firstChar != -1){
      return true;
   }else{
      return false;
   }
}

function noRefresh(keyCode){
   var key_f5 = 116; // 116 = F5		
   if (key_f5==keyCode)
   {
      event.keyCode=8;
      window.event.cancelBubble = true;
      window.event.returnValue = false;
      return false;
   }
   return true;
}

if (top.location != location) {top.location.href = document.location.href;}
