// VISISTAT SNIPPET ///
var DID=41512;
document.write('<scri' + 'pt src="http://sniff.visistat.com/sniff.' + 'js" type="text/ja' + 'vascri' + 'pt"></script>');
// VISISTAT SNIPPET ///


/// form text functions

function txtAreaCounter(txtArea,maxChars,spanName)
{
var strTemp = "";
	if (txtArea.value.length > maxChars)
	{
		alert("Oops!  Please shorten your answer.\r\nYour answer can contain up to " + maxChars + " characters, including letters, numbers and underscores.\r\nWatch the counter to tell how many characters you have remaining.");
		strTemp = txtArea.value.substring(0, maxChars);
		txtArea.value = strTemp;
	}
document.getElementById(spanName).innerHTML = maxChars - txtArea.value.length;
}

function stripHTMLTags(strText, strFormFieldName)
{
	var regEx = new RegExp("<|%3C|>|%22|%3E|%2F|%3c|%3e|%2f/","g");
	var m = regEx.exec(strText.value);
	if (m == null) 
	{
		//alert("No match"); do nothing
	} 
	else 
	{
		alert("\r\nPotentially dangerous characters were removed from the " + strFormFieldName + "\r\n Characters like {<>/} are not allowed\r\n");
	}
	strText.value = strText.value.replace(regEx, "");
}


function inputCounter(input,maxChars,spanName)
{
var strTemp = "";
	if (input.value.length > maxChars)
	{
		alert("Oops!  Please shorten your answer.\r\nYour answer can contain up to " + maxChars + " characters, including letters, numbers and underscores.\r\nWatch the counter to tell how many characters you have remaining.");
		strTemp = input.value.substring(0, maxChars);
		input.value = strTemp;
	}
document.getElementById(spanName).innerHTML = maxChars - input.value.length;
}

function rndnumber(totSeed){
var randscript = -1;
while (randscript < 0 || randscript > (totSeed-1) || isNaN(randscript)){
	randscript = parseInt(Math.random()*(totSeed+1));
}
return randscript;
}


function rndPix1() {
var howMany = 14;  // max number of items listed below
var test = new Array(howMany+1);

test[0]='t2';
test[1]='t4';
test[2]='t5';
test[3]='t6';
test[4]='t7';
test[5]='t8';
test[6]='t10';
test[7]='t11';
test[8]='t12';
test[9]='t13';
test[10]='t14';
test[11]='t15';
test[12]='t18';
test[13]='t19';

quo = rndnumber(howMany);
quox = test[quo];
document.write('<img border="0" src="preview/images/' + quox + '.jpg">');
}


function rndPix2() {
var howMany = 10;  // max number of items listed below
var test = new Array(howMany+1);

test[0]='t1';
test[1]='t3';
test[2]='t9';
test[3]='t10';
test[4]='t11';
test[5]='t12';
test[6]='t13';
test[7]='t14';
test[8]='t16';
test[9]='t17';

quo = rndnumber(howMany);
quox = test[quo];
document.write('<img border="0" src="preview/student_life/' + quox + '.jpg">');
}


function nav() {

document.write(' <a href="index.html" class="bn">HOME</a>   ');
document.write(' <a href="about.html" class="bn">ABOUT US</a>  ');
document.write(' <a href="products.html" class="bn">PRODUCTS</a>  '); 
document.write(' <a href="careers.html" class="bn">CAREERS</a>  ');
document.write(' <a href="investors.html" class="bn">INVESTORS</a> '); 
document.write(' <a href="media.html" class="bn">MEDIA</a>  ');
document.write(' <a href="news.html" class="bn">NEWS</a>   ');
document.write(' <a href="contact.html" class="bn">CONTACT US</a><br>');

}

function right() {

document.write(' <ul id="feature"><li id="fi"><a href="multimedia.html">Digital Multimedia</a></li>');
document.write(' <li id="fi"><a href="personalization.html">Self-Expression & Personalization</a></li>');
document.write(' <li id="fi"><a href="fundraising.html">School Fundraising</a></li>');
document.write(' <li id="fi"><a href="yearbook_turnaround.html">Yearbook Turnaround</a></li>');
document.write(' <li id="fi"><a href="yearbook_replacement.html">Yearbook Replacement</a></li>');
document.write(' <li id="fi"><a href="environmentally_friendly.html">Environmentally Friendly</a></li>');
document.write(' <li id="fi"><a href="classroom_ready.html">Classroom Ready</a></li>');
document.write(' </ul>');

document.write(' <BR style="line-height:10px">');
document.write(' <center><a target="_blank" href="http://www.MyYearbookBuilder.com" title="MyYearbookBuilder.com"><img border="0" src="images/myyearbookbuilder_logo.gif" width="220" height="35" ');
document.write(' alt="MyYearbookBuilder.com"></a><center>');
document.write(' <BR style="line-height:5px">');
document.write(' <table border="0" cellpadding="2" cellspacing="2" width="100%" id="AutoNumber1"><tr><td width="50%" align="center">');
document.write(' <b><a href="preview/portrait.html" target="_blank">Portrait Preview</b><BR>');

rndPix1();

document.write(' </a></td><td width="50%" align="center">');
document.write(' <b><a href="preview/student_life.html" target="_blank"><nobr>Student Life Preview</nobr></b><br>');

rndPix2();

document.write(' </a></td></tr></table>');
}

function footer() {

document.write(' <table id="footerTable"><tr><td id="footer" align="left">');
document.write(' <a href="index.html">Home</a> . ');
document.write(' <a href="about.html">About Us</a> .');
document.write(' <a href="products.html">Products</a> . ');
document.write(' <a href="careers.html">Careers</a> .');
document.write(' <a href="investors.html">Investors</a> . ');
document.write(' <a href="media.html">Media</a> . ');
document.write(' <a href="news.html">News</a> . ');
document.write(' <a href="contact.html">Contact Us</a><BR><BR>');
document.write(' &copy; 2004-2009 Odyssey Interactive. All Rights Reserved.</td>');
document.write(' <td id="footer" align="right"><b>Odyssey Interactive, L.L.C.</b><br>New Milford, CT 06776<br>');
document.write(' email: <a href="mailto:info&#64;odysseyinteractive.com">info&#64;odysseyinteractive.com</a></td></table>');

}