
// * note about ROLLOVERS 
//		Because of Netscape 4...must be included within each HTML file.  
//		Cannot be used in a SRC file because NS4 errors out.


// ** RANDOM CONTENT - Pop Quiz and 'High Score' footer graphics

function makeArray( len ) {
    for (var i = 0; i < len; i++) this[i] = null;
	this.length = len;
}

popQuiz = new makeArray(5);
	popQuiz[0] = '<b>Can You Guess?</b><br>What game was the first to include an intermission?';
	popQuiz[1] = '<b>Can You Guess?</b><br>Who says "@!#?@!" every time he is hit by something? ';
	popQuiz[2] = '<b>Can You Guess?</b><br>Which member of the Rat Pack appeared in a 1970s commercial for a game system? ';
	popQuiz[3] = '<b>Can You Guess?</b><br>In the <i>Mario Brothers</i> game, what was Mario\'s profession before he became a plumber?';
	popQuiz[4] = '<b>Can You Guess?</b><br>In Atari\'s <i>Missile Command</i>, what is the name of the planet under attack?';

highScores = new makeArray(5);
	highScores[0] = '<img src="/kcts/videogamerevolution/_images/high_scores/high_scores_asteroid.gif" width="518" height="41" alt="" border="0">';
	highScores[1] = '<img src="/kcts/videogamerevolution/_images/high_scores/high_scores_burst.gif" width="518" height="41" alt="" border="0">';
	highScores[2] = '<img src="/kcts/videogamerevolution/_images/high_scores/high_scores_centipede.gif" width="518" height="41" alt="" border="0">';
	highScores[3] = '<img src="/kcts/videogamerevolution/_images/high_scores/high_scores_mushroom.gif" width="518" height="41" alt="" border="0">';
	highScores[4] = '<img src="/kcts/videogamerevolution/_images/high_scores/high_scores_screw.gif" width="518" height="41" alt="" border="0">';


// randomizer.
function rand(n) {
	seed = (0x015a4e35 * seed) % 0x7fffffff;
	return (seed >> 18) % n;
}        
var now = new Date()
var seed = now.getTime() % 0xffffffff

// END RANDOM CONTENT



// popup window used by /inside/stories.html
function popWindow(url, name, intWidth, intHeight) {
		winParameters = "width=" + intWidth + ",height=" + intHeight + ",scrollbars=no";
		popupWin = window.open(url, name, winParameters);
		popupWin.focus();
}



// ** POP UP
// usage: popuplink(['js-only url',] this[, w[, h[, scroll[, extras]]]])
// basic usage: <a href="popup.html" target="_blank" onclick="return(popuplink(this));">new pop</a>
// advanced usage: <a href="popup_nojs.html" target="_blank" onclick="return(popuplink('popup_yesjs.html', this, 200, 100, false));">new pop</a>
// site-wide defaults:
POPUP_W = 700;
POPUP_H = 550;
POPUP_SCROLL = true;
POPUP_EXTRAS = 'location=0,statusbar=0,menubar=0,resize=yes';
//	POPUP_FANCY = 'location=yes,toolbar=yes,menubar=yes,directories=yes,status=yes,resize=yes';
function popuplink() {
	var undef, i=0, args=popuplink.arguments;
	var url = (typeof(args[i])=='string') ? args[i++] : args[i].getAttribute('href');
	var target = args[i++].getAttribute('target') || '_blank';
	var w = args[i++];
	var h = args[i++];
	var s = (args[i]===undef) ? POPUP_SCROLL : args[i++];
	var features = 'width=' + (w || POPUP_W)
				 + ',height=' + (h || POPUP_H)
				 + ',scrollbars=' + (s ? 'yes,' : 'no,')
				 + (args[i] || POPUP_EXTRAS);
	var win = window.open(url, target, features);
	win.focus();
	return false;
}
// END POP UP
