document.write(‘ n
input#timer { font-size:1em; font-weight:bold; border:0 none; } n
h2 { font-size:1.5em; font-family:Verdana, sans-serif; padding-left:0; } n
.articlePositionFooter { text-align:left; } n
.articlePositionFooter h3 { margin-bottom:0; } n
.articleBody br { display:none; } n
‘);
Colorado has banned 2,745 license plates and 261 phrases (such as “POO”) from being in license plates. What can you slip past the filter?
Note: Because of the limitations of our license-plate quiz technology, only 7-letter plate names will be considered. Type them in below, and they will be automatically evaluated.
Not-Banned Plate Ideas:
None
Banned Plate Ideas:
None
window.onload = init;
var count=0;
var correct = new Array();
var banned = new Array();
var banpartkey = new Array();
var bankey = new Array();
var answertimes = new Array();
var answercount;
var mins;
var secs;
function init()
{
banpartkey = $(‘banpartkey’).value.split(‘,’);
bankey = $(‘bankey’).value.split(‘,’);
answercount = banpartkey.length;
timecount();
document.getElementById(‘answer’).focus();
}
function timecount()
{
mins = 1 * minCount($(‘time_limit’).value);
secs = 0 + secCount(“:01”);
counter();
}
function minCount(input)
{
// Pull out the minutes part of a time string, as in the “1” part of, say, “1:30”
var len = input.length;
for( var i = 0; i < len; i++ ) if( input.substring(i, i + 1) == ":" ) break;
return( input.substring(0, i) );
}
function secCount(input)
{
// Pull out the seconds part of a time string, as in the "30" part of, say, "1:30"
var len = input.length;
for( var i = 0; i < len; i++ ) if( input.substring(i, i + 1) == ":" ) break;
return( input.substring(i + 1, input.length) );
}
function displayTime(mins,secs)
{
var display;
if( mins <= 9 ) display = " 0";
else display = " ";
display += mins + ":";
if( secs <= 9 ) display += "0" + secs;
else display += secs;
return( display );
}
function counter()
{
//if( count == answerkey.length ) return;
secs–;
if( secs == -1 )
{
secs = 59;
mins–;
}
document.timecount.timer.value = displayTime(mins,secs);
if( ( mins == 0 ) && ( secs == 0 ) )
{
window.alert("Time up.");
showAnswers();
}
else
{
cd = setTimeout("counter()",1000);
}
}
function checkAnswer(input)
{
if( input.value.length == 7 )
{
for( var i = 0; i < bankey.length; i++ )
{
// See if it's on the list of plates already banned
if( input.value.toLowerCase() == bankey[i].toLowerCase() )
{
banned[banned.length] = bankey[i];
banned.sort();
input.value = "";
count++;
var msg = "";
var len_banned = banned.length;
for( var x=0; x < len_banned; x++ ) msg += banned[x]+", ";
document.getElementById("banned").innerHTML = msg;
return
}
else if( i < banpartkey.length && input.value.toLowerCase().indexOf(banpartkey[i].toLowerCase()) !=-1 ) //See if it contains a banned chunk
{
banned[banned.length] = input.value;
banned.sort();
input.value = "";
count++;
var msg = "";
var len_banned = banned.length;
for( var x=0; x < len_banned; x++ ) msg += banned[x]+", ";
document.getElementById("banned").innerHTML = msg;
return
}
}
// If we made it through the loop without a flagged item then it must be okay.
correct[correct.length] = input.value;
correct.sort();
input.value = "";
count++;
var msg = "";
var len_correct = correct.length;
for( var x=0; x < len_correct; x++ ) msg += correct[x]+", ";
document.getElementById("correct").innerHTML = msg;
return
}
else
{
if( input.value == " " ) input.value = "";
}
}
function showAnswers()
{
/*
var len = answerkey.length;
var msg = '
Not Banned:
‘;
for( var x=0; x < len; x++ ) msg += answerkey[x]+", ";
msg += '
‘;
document.getElementById(“missed”).innerHTML = msg;
document.getElementById(“missed”).style.display = ‘block’;
document.getElementById(“aj”).src = ‘http://neighbors.denverpost.com/xs.php?’ + answertimes + ‘|’ + len + ‘|’ + article_id;
*/
}



