// *******************************************************************************
// This is the script for the game's windows.
// *******************************************************************************

function openAbout() {
msg1=window.open("","msg1","height=200,width=250,left=200,top=200");
msg1.document.write("<html><title>About Minesweeper</title>");
msg1.document.write("<body bgcolor='white' onblur=window.close()>");
msg1.document.write("<center><img src='wmicon.gif'>");
msg1.document.write("<p><font face='Arial' size=2><b>Minesweeper</b>");
msg1.document.write("<p></font><font face='Arial' size=-1>");
msg1.document.write("by P. Occil<br>JavaScript Version 3.11 (c) 2000 by P. ");
msg1.document.write("Occil<p><form>");
msg1.document.write("<input type='button' width=50 value='OK'");
msg1.document.write(" onclick='window.close();'>");
msg1.document.write("</form></font></center>");
msg1.document.write("</body></html>");

}

function openHelp() {
msg2=window.open("","msg2","height=600,width=450,left=0,top=0");
msg2.document.write("<html><title>Minesweeper Help</title>");
msg2.document.write("<body bgcolor='white' onblur=window.close()>");
msg2.document.write("<center><img src='wmicon.gif'>");
msg2.document.write("<p><font face='Arial' size=2><b>Minesweeper Help");
msg2.document.write("</b><p></font><font face='Arial' size=-1>");
msg2.document.write('</center>');
msg2.document.write("<p><p><b>The object of Minesweeper</"
 +"b><p>The object of Minesweeper is to find all "
 +"the mines as quickly as possible without uncoverin"
 +"g any of them.<p><p><b>To play Minesweeper</b> "
 +"<ol> <li> On the <b>Game</b> menu, click <b>New<"
 +"/b>.</li> <li> To start the timer, click any squ"
 +"are on the playing field.</li> </ol><i>Notes</i>"
 +"<ul> <li>The game area consists of the playing"
 +" field, a mine counter, and a timer.<li>You can "
 +"uncover a square by clicking it. If you uncover a "
 +"mine, you lose the game. <li>If a number appears "
 +"on a square, it indicates how many mines are in th"
 +"e eight squares that surround the numbered one. <"
 +"li>To mark a square you suspect contains a mine, h"
 +"old CTRL and click on it.</ul> <p><p> <b>Strateg"
 +"ies and tips</b> <ul> <li>If you are uncertain a"
 +"bout a square, hold CTRL and click on it twice to "
 +"mark it with a question mark (?). Later, you can e"
 +"ither mark the square as a mine or uncover it by "
 +"holding CTRL and clicking on it again once or twice. <li>Look for c"
 +"ommon patterns in numbers, which often indicate a "
 +"corresponding pattern of mines. For example, the p"
 +"attern 2-3-2 at the edge of a group of uncovered s"
 +"quares indicates a row of three mines next to the "
 +"three numbers.</ul></body></html>");
}

function openCustom() {

msg3=window.open("","msg2","height=200,width=250,left=200,top=200");
msg3.document.write('<HTML><title>Custom Field</title>');
msg3.document.write('<script language="JavaScript" src="confirm.js"></script>');
msg3.document.write('<body><table border=0><form name="cus"> <tr><td><small><'
 +'b>Height:</b></td><td> <input name="gridx" type=text '
 +'value="8"> </td></tr><td><b>Width:</b></td><td> <input '
 +'name="gridy" type=text value="8"> </td></tr><td><b>M'
 +'ines:</b></td><td> <input name="maxmines" type=text v'
 +'alue="10"> </td></tr></table> <input type=bu'
 +'tton value="OK" onclick="'
 +'trans();"> <input type=button value="Cancel" onclick="wi'
 +'ndow.close();"> </form> </HTML>');

}

