<!-- ;
var newwindow;
var wheight = 0, wwidth = 0;
function popitup5(url, title, iwidth, iheight, colour, caption) {
var pwidth, pheight;
var NewCaption = caption;

NewCaption = NewCaption.replace(/#APOSTROPHE#/,"'");
NewCaption = NewCaption.replace(/#APOSTROPHE#/,"'");
NewCaption = NewCaption.replace(/#QUOTE#/,"&quot;");
NewCaption = NewCaption.replace(/#QUOTE#/,"&quot;");

if ( !newwindow || newwindow.closed ) {
pwidth=iwidth+30;
pheight=iheight+50;
newwindow=window.open('','htmlname','width=' + pwidth +',height=' +pheight + ',resizable=0,top=50,left=10');
wheight=iheight;
wwidth=iwidth;
}

if (wheight!=iheight || wwidth!=iwidth ) {
pwidth=iwidth+30;
pheight=iheight+80;
newwindow.resizeTo(pwidth, pheight);
wheight=iheight;
wwidth=iwidth;
}

newwindow.document.clear();
newwindow.focus();
newwindow.document.writeln('<html> <head> <title>' + title + '<\/title> <\/head> <body bgcolor= \"' + colour + '\"> <center>');
newwindow.document.writeln('<table width="100%" >');
newwindow.document.writeln('<tr><td align="center">');
newwindow.document.writeln('<img border="1" bordercolour="#333333" src=' + url + '>');
newwindow.document.writeln('</td></tr><tr><td>');
newwindow.document.writeln('<p align="center"><b><font face="arial" size="2">' + NewCaption + '</font></b></p>');
newwindow.document.writeln('</td></tr></table><\/center> <\/body> <\/html>');
newwindow.document.close();
newwindow.focus();
}


// Routines to tidy up popup windows when page is left
// Call with an onUnload="tidy5()" in body tag

function tidy5() {
if (newwindow && !newwindow.closed) { newwindow.close(); }
}

function ConfirmChoice(Question,Target) 
  { 
  answer = confirm(Question)
  if (answer !=0) 
    {   
    window.location = Target
    } 
  }
  
function InputText(Question,Target,Default) 
  { 
  answer = prompt(Question,Default)
  if (answer != null) 
    {   
    window.location = Target + escape(answer)
    } 
  }
  
function winopen(PageURL){
  window.open(PageURL, 'NewWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width=420,height=300')
}

function winopenBattleShipsStandings(PageURL){
  window.open(PageURL, 'NewWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=420,height=300')
}

function winopenBattleShipsAttackLog(PageURL){
  window.open(PageURL, 'NewWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=640,height=300')
}

function OpenWhatsNewPopUp(){
	window.open('whats_new.asp', 'NewWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=640,height=480')
}

function hide(){document.getElementById('NewsLayer').style.visibility="hidden";}
	
function jah(url,target) {
//alert(url);
// native XMLHttpRequest object
// document.getElementById(target).innerHTML = 'sending...';
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = function() {jahDone(url, target);};
        req.open("GET", url, true);
        req.send(null);
    // IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = function() {jahDone(url, target);};
            req.open("GET", url, true);
            req.send();
        }
    }
} 
function jahDone(url, target) {
	// only if req is "loaded"
	if (req.readyState == 4) {
	// only if "OK"
	if (req.status == 200) {
		results = req.responseText;
		document.getElementById(target).innerHTML = results;
	} else {
		document.getElementById(target).innerHTML="jah error:\n" + req.statusText + ' (' + url + ')';
	}
	}
}

function getSel() {
  var txt = '';
  
  if (window.getSelection) {
    txt = window.getSelection();
    }
  else if (document.getSelection) {
    txt = document.getSelection();
    }
  else if (document.selection) {
    txt = document.selection.createRange().text;
    }
  else return;
  
  alert(txt);
}

function ModerateForumPost(PostID, PrevPage) {
  var txt = '';
  
  if (window.getSelection) {
    txt = window.getSelection();
    }
  else if (document.getSelection) {
    txt = document.getSelection();
    }
  else if (document.selection) {
    txt = document.selection.createRange().text;
    }
  else return;
  
  window.location = 'forum_moderate.asp?postid=' + PostID + '&PrevPage=' + escape(PrevPage) + '&text=' + escape(txt);
}

function MarkAsSpam(PostID, PrevPage) {
  window.location = 'forum_mark_reply_as_spam.asp?postid=' + PostID + '&PrevPage=' + escape(PrevPage);
}

function ModerateForumTopic(TopicID, PrevPage) {
  var txt = '';
  
  if (window.getSelection) {
    txt = window.getSelection();
    }
  else if (document.getSelection) {
    txt = document.getSelection();
    }
  else if (document.selection) {
    txt = document.selection.createRange().text;
    }
  else return;
  
  window.location = 'forum_moderate_thread.asp?TopicID=' + TopicID + '&PrevPage=' + escape(PrevPage) + '&text=' + escape(txt);
}

<!--

// Browser sniffer. Written by PerlScriptsJavaScripts.com

v3 = 0; op = 0; ie4  = 0; ie5 = 0; nn4 = 0; nn6 = 0; 
isMac = 0; aol = 0;

if(document.images){
    if(navigator.userAgent.indexOf("Opera") != -1){
        op = 1;
    } else {
        if(navigator.userAgent.indexOf("AOL") != -1){
            aol = 1;
        } else {
            ie4 = (document.all && !document.getElementById);
            nn4 = (document.layers);
            ie5 = (document.all && document.getElementById);
            nn6 = (document.addEventListener);
        }
    }
} else {
    v3 = 1;	
}

if(navigator.userAgent.indexOf("Mac") != -1){
    isMac = 1;
}

// -->


// Startup variables
var theSelection = false;

// Check for Browser & Platform for PC & IE specific bits
// More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html
var clientPC = navigator.userAgent.toLowerCase(); // Get client info
var clientVer = parseInt(navigator.appVersion); // Get browser version

var is_ie  = ((clientPC.indexOf("msie") != -1)       && (clientPC.indexOf("opera") == -1));
var is_nav = ((clientPC.indexOf('mozilla')!=-1)      && (clientPC.indexOf('spoofer')==-1)
          && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
          && (clientPC.indexOf('webtv')==-1)        && (clientPC.indexOf('hotjava')==-1));
var is_moz = 0;

var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
var is_mac = (clientPC.indexOf("mac")!=-1);

function addlink()
{
 var txtarea = document.addComment.addMessage;

 txtarea.focus();

 if ((clientVer >= 4) && is_ie && is_win)
 {
  theSelection = document.selection.createRange().text; // Get text selection
  if (theSelection)
  {
   // Add tags around selection
   var linkurl = prompt('Enter the complete link for the webpage', 'http://');
   if(linkurl == null) return;
   document.selection.createRange().text = '<a href="' + linkurl + '">' + theSelection + '</a>';
   txtarea.focus();
   theSelection = '';
   return;
  }
 }
 else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
 {
  var linkurl = prompt('Enter the complete link for the webpage', 'http://');
  if(linkurl == null) return;
  start_tag = '<a href="' + linkurl + '">';
  end_tag   = '</a>';
  mozWrap(txtarea, start_tag, end_tag);
  return;
 }
  var linkurl   = prompt('Enter the complete link for the webpage', 'http://');
 if(linkurl == null) return;
 var linktitle = prompt('Enter the title of the webpage', '');
 if(linktitle == null) return;
 txtarea.value += '<a href="' + linkurl + '">' + linktitle + '</a>';
 txtarea.focus();
 return;
}

function addtag(input_tag, TargetFieldId)
{
 var txtarea = document.getElementById(TargetFieldId);

 txtarea.focus();
 theSelection = false;
 start_tag = '[' + input_tag + ']';
 end_tag   = '[/' + input_tag + ']';

 if ((clientVer >= 4) && is_ie && is_win)
 {
  theSelection = document.selection.createRange().text; // Get text selection
  if (theSelection)
  {
   // Add tags around selection
   document.selection.createRange().text = start_tag + theSelection + end_tag;
   txtarea.focus();
   theSelection = '';
   return;
  }
 }
 else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
 {
  mozWrap(txtarea, start_tag, end_tag);
  return;
 }
 txtarea.value += start_tag + end_tag;
 txtarea.focus();
 return;
}

// From http://www.massless.org/mozedit/
function mozWrap(txtarea, open, close)
{
 var selLength = txtarea.textLength;
 var selStart = txtarea.selectionStart;
 var selEnd = txtarea.selectionEnd;
 if (selEnd == 1 || selEnd == 2) selEnd = selLength;
 var s1 = (txtarea.value).substring(0,selStart);
 var s2 = (txtarea.value).substring(selStart, selEnd)
 var s3 = (txtarea.value).substring(selEnd, selLength);
 txtarea.value = s1 + open + s2 + close + s3;
 return;
}

function ShowNews()
	{
	document.getElementById('SecondaryMenu').style.height='20px';
	document.getElementById('divNews').style.display='block';
	document.getElementById('divForums').style.display='none';
	document.getElementById('divMiniGames').style.display='none';
	}
function ShowForums()
	{
	document.getElementById('SecondaryMenu').style.height='20px';
	document.getElementById('divNews').style.display='none';
	document.getElementById('divForums').style.display='block';
	document.getElementById('divMiniGames').style.display='none';
	}
function ShowMiniGames()
	{
	document.getElementById('SecondaryMenu').style.height='20px';
	document.getElementById('divNews').style.display='none';
	document.getElementById('divForums').style.display='none';
	document.getElementById('divMiniGames').style.display='block';
	}
function HideAll()
	{
	document.getElementById('divNews').style.display='none';
	document.getElementById('divForums').style.display='none';
	document.getElementById('divMiniGames').style.display='none';
	document.getElementById('SecondaryMenu').style.height='0px';
	}
function GoToPage(TargetPage)
	{
	window.location=TargetPage;
	}

function dark()
	{
	if(document.getElementById('opticlayer')!=null)
		{document.getElementById('opticlayer').style.display = 'none';}
	//document.getElementById('loginform').style.display = 'none';
	}
