////////////////////////////////////////////////////////////////////////////
// Popup Window functions

function lwindow(callerurl) // Open a login window
{
	loginpage='/Half-Life/bin/login.php3';
	if (typeof callerurl == "string") 
		loginpage=loginpage+'?refreshcaller='+callerurl;
	lw=window.open(loginpage, 'lwin', 'width=450,height=375,resizable'); 
	lw.focus(); 
	return lw;
}
function rwindow(callerurl) // Open a registration window
{
	regpage='/Half-Life/bin/register.php3';
	if (typeof callerurl == "string") 
		regpage=regpage+'?refreshcaller='+callerurl;
	rw=window.open(regpage, 'rwin', 
		'width=675,height=725,screenY=0,top=0,resizable,scrollbars'); 
	rw.focus(); 
	return rw;
}
// End of popup window functions
////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////
// Misc. Utilities
//
// NNselect conditionally puts out one thing if the browser is NN4,
// another thing for all other browsers.
function NNselect( NNvariant, Normlvariant )
{
  with (navigator) {
	  if ((appName=="Netscape")&&(parseInt(appVersion)==4))
		  document.write( NNvariant );
		else
		  document.write( Normlvariant );
	}
}

// CSSSelect puts out links to separate CSS files, depending on the 
// browser and platform.
function CSSSelect(csspath)
{
  defaultCSS = "sitestyle.css";
  NNWinCSS = "sitestyleNNWin.css";
  NNMacCSS = "sitestyleNNMac.css";
  CSS = defaultCSS;
	with (navigator) {
		if (appName=="Netscape") {
			if (platform.indexOf("Win")==0)
				CSS = NNWinCSS;
      else if (platform.indexOf("Mac")==0)
        CSS = NNMacCSS;
			else // Probably Unix
			  CSS = NNMacCSS;  // Font settings for the Mac are the largest.
    }
		document.write('<link rel="stylesheet" href="', csspath, CSS, '" type="text/css">');
	}
} // CSSSelect

// MM_reloadPage is MacroMedia's workaround for NN4's crummy page resize handling
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
// *** uncomment this line to turn it on. ***
// MM_reloadPage(true);

// end  

