 var newWindow;
 var gameFile;
 var winAtts = "toolbar=0,menubar=0,scrollbars=0,resizable=0,width=300,height=380,top=3 left=400";
 
 function fileObj() {
     gameTxt="";
 }
 
 function displayGame(gameFile) {
   if (newWindow != null)
       newWindow.close();
  CHESSgame = new fileObj();
  CHESSgame.gameTxt = "Game0/" + gameFile + ".txt";
    newWindow = window.open("","newWindow",winAtts)
    newWindow.document.write("<center>");
    newWindow.document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' ");
    newWindow.document.write("codebase=http://active.macromedia.com/flash2/cabs/swflash.cab#version=6,0,0,0 ");
    newWindow.document.write("width='284' height='350'>");
    newWindow.document.write("<param name=movie value='cgenie1.swf?gameFile=");
    newWindow.document.write(CHESSgame.gameTxt);
    newWindow.document.write("'><param name=bgcolor value=#FFFFEE>");
    newWindow.document.write("<param name=quality value='high'>");
    newWindow.document.write("<PARAM NAME='play' VALUE='true'>");
    newWindow.document.write("<embed SRC='cgenie1.swf?gameFile=");
    newWindow.document.write(CHESSgame.gameTxt);
    newWindow.document.write("' quality=high ");
    newWindow.document.write("width='284' height='350' bgcolor='#FFFFEE' ");
    newWindow.document.write("type='application/x-shockwave-flash' ");
    newWindow.document.write("pluginspage='http://www.macromedia.com/go/getflashplayer'>");
    newWindow.document.write("</embed></object>");
    newWindow.document.write("</center>")
 }
 
 function closeWindow() {
    if (newWindow != null) 
        newWindow.close()
}
 