//This script has been placed in the index files of the following directories:
// man/
// man/dod-101/sys/ac/
// man/dod-101/sys/dumb/
// man/dod-101/sys/land/
// man/dod-101/sys/ship/
// man/dod-101/sys/smart/
// nuke/

var hmsg = new Array();

hmsg[0] = new helpmsg("240", "400", "FAS was a pioneer on the World Wide Web","<p align='center'><font size='5'>This resource exists for people like you.</font></p><p align='center'><font size='5'><strong>It can only exist with the support of people like you. </strong></font></p><p align='center'><a href='http://www.fas.org/static/join.jsp'target='_blank'><font color='#0000FF' size='5'>Please click here to donate</font></a></p><p><center><form method='post'><input type='button' value='Close Window' onclick='window.close()'></form></center>");

hmsg[1] = new helpmsg("240", "450", "Did you find what you needed?","<p align='center'><font size='6'><strong>Did you find what you needed?</strong></font></p><p><strong>FAS currently recieves no funding to host this site. If you have found this site helpful, please give us a <a href='http://www.fas.org/static/join.jsp'target='_blank'>donation</a> to help us keep this site available free of charge for all.</strong></font></p><p><center><form method='post'><input type='button' value='Close Window' onclick='window.close()'></form></center>");

hmsg[2] = new helpmsg("350", "400", "The FAS Website","<p align='center'><font size='6'><strong>The FAS Website</strong></font></p><ul><li type='disc'><font size='2'>Makes&nbsp; research, analysis, and hard-to-find archival data available without charge. </font></li><li type='disc'><font size='2'>Provides free access to all FAS publications, bulletins, and databases.</font></li><li type='disc'><font size='2'>Consolidates vast amounts of information, links from across the WWW and is updated daily in response to research and world events. </font></li></ul><strong><font size='4'>We need your support if we are to continue.&nbsp; If you have found our web content useful, please help us provide this resource by making a tax-deductible <a href='http://www.fas.org/static/join.jsp'target='_blank'>donation.</a>Thanks!</font></strong></p><p><center><form method='post'><input type='button' value='Close Window' onclick='window.close()'></form></center>");

hmsg[3] = new helpmsg("240", "400", "We Depend on You!","<p align='center'><font size='5'><strong>We Depend on You!</strong></font></p><p>FAS works on issues you care about, and we depend on your support. We need your help to keep on providing the resources that you use on this web site.</p><p align='center'><a href='http://www.fas.org/static/join.jsp'target='_blank'><font size='4'><strong>Please Donate</strong></font></a></p><p><center><form method='post'><input type='button' value='Close Window' onclick='window.close()'></form></center>");

var myPopup = new helpbox("myPopup", hmsg);

function helpmsg(height, width, header, message) {
	this.height = height;
	this.width = width;
	this.header = header;
	this.message = message;
}

new helpmsg();
helpmsg.prototype.show = show;
// background='/images/ivorypaper-light.gif'
function show() {
	var htmlpage = "<HTML>\n" +	"<HEAD>\n" + "<TITLE>\n" + this.header + "\n" + "</TITLE>\n" + "</HEAD>\n" + "<BODY><P>" + this.message + "</BODY></HTML>\n";
	return htmlpage;
}

function helpbox(name, hm) {
	this.name = name;
	this.helpmessage = hm;
	this.timerHandle = null;
	this.windowHandle = null;
	this.POPUPDELAY = 100;
	return this;
}
	
function startHelp(msgindex) {
	var cmdstr="top." + this.name + ".showHelp('" + msgindex + "')";
	this.timerHandle = setTimeout(cmdstr, this.POPUPDELAY);
}
	
function showHelp(msgindex) {
	if (!this.windowHandle || !this.windowHandle.name || this.windowHandle.name=="")
		this.windowHandle = window.open("","subWindow","toolbar=no," + "location=no," +	"directories=no," +	"status=no," + "menubar=no," + "scrollbars=no," + "resizable=no," + "width=" + this.helpmessage[msgindex].width + "," + "height=" + this.helpmessage[msgindex].height);
	else
		this.windowHandle.focus();
		this.windowHandle.document.open();
		var to_page = this.helpmessage[msgindex].show();
		this.windowHandle.document.write(to_page);
		this.windowHandle.document.close();
}

function clearHelp() {
	clearTimeout(this.timerHandle);
	if (this.windowHandle && this.windowHandle.name) {
		this.windowHandle.close();
		this.windowHandle=null;
   }
}
	
new helpbox();
helpbox.prototype.startHelp = startHelp;
helpbox.prototype.showHelp = showHelp;
helpbox.prototype.clearHelp = clearHelp;

//if (Math.floor(Math.random()*11) == 1)
	//{
		myPopup.startHelp((Math.floor(Math.random()*101))%hmsg.length);
	//}

