function GetHeightWidth(height, width)
{
	var xposition=0, yposition=0, text;
	
	if((parseInt(navigator.appVersion) >= 4))
	{
		xposition = (screen.width - width) / 2;
		yposition = (screen.height - height) / 2;
	}
	
	text = "height=" + height + ",width=" + width + ",screenx=" + xposition + ",screeny=" + yposition 
		+ ",left=" + xposition + ",top=" + yposition;
	return(text);
}

count=0;
function OpenWin(name, height, width, sb)
{
	count++;
	remote = window.open(name, "EOwin"+count, GetHeightWidth(height, width) 
		 + ', location=0,menubar=0,resizable=0,scrollbars='+ sb +',status=0,titlebar=0,toolbar=0,hotkeys=0');
}

function EmbedSWF(doc, URL, height, width)
{
  doc.write('<embed name="game" src="'+URL+'" height="'+height+'" width="'+width+'" base="/games/flash/" content-type="application/x-shockwave-flash" wmode="window">')
}


function getHTTPObject()
{
  if(window.XMLHttpRequest) return new XMLHttpRequest();
  else if(window.ActiveXObject) return new ActiveXObject("Microsoft.XMLHTTP");
  else {
    alert("Posting comments requires browser with AJAX compatible JavaScript.");
    return null;
  }
} 