// VISISTAT SNIPPET ///
var DID=41512;
document.write('<scri' + 'pt src="http://sniff.visistat.com/sniff.' + 'js" type="text/ja' + 'vascri' + 'pt"></script>');
// VISISTAT SNIPPET ///


function netnav() {

document.write('<div id="netnavDiv">');
document.write('<table id="netnav"><tr><td id="fb1"><a target="_blank" href="http://www.facebook.com/home.php#!/pages/Odyssey-Interactive/186491351381508"><img border="0" src="images/facebook-icon.gif" ');
document.write('width="16" height="16" title="Odyssey Interactive on Facebook"></a></td><td id="fb2"><iframe ');
document.write('src="http://www.facebook.com/plugins/like.php?href=www.odysseyinteractive.com&layout=button_count&show_faces=false&width=100&action=like&font=arial&colorscheme=light&height=21" ');
document.write('scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:80px; height:21px;" allowtransparency="true"></iframe></td><td id="twit1"><a target="_blank" href="http://twitter.com/MyYbkBuilder"><img ');
document.write('border="0" src="images/twitter-icon.gif" width="16" height="16" title="Odyssey Interactive on Twitter"></a></td><td id="twit2"><a href="http://twitter.com/share" ');
document.write('class="twitter-share-button" data-count="none" data-via="MyYbkBuilder">Tweet</a><scr'+'ipt type="text/jav'+'ascr'+'ipt" src="http://platform.twitter.com/widgets.'+'js"></scr'+'ipt></td></tr><tr><td colspan="4" ');
document.write('id="share"><scr'+'ipt type="text/jav'+'ascr'+'ipt" ');
document.write('src="http://w.sharethis.com/widget/?tabs=web%2Cpost%2Cemail&charset=utf-8&style=default&publisher=6353f4c0-fbec-4929-8452-68946ced4976&embeds=true&offsetTop=0&offsetLeft=-300"></scr'+'ipt></td></tr></table></div>');

}


/// 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, "");
}

// this is for email spamming
function stripeHTMLTags(strText, strFormFieldName)
{
	var regEx = new RegExp("<|%3C|>|%22|%3E|%2F|%3c|%3e|%2f/|.com|www|http://|&|prescription|viagra|xanax|cialis|levitra","gi");
	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 Potential spamming words 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="yearbook_preview/images/' + quox + '.jpg" title="Yearbook Portrait Preview">');
}


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="yearbook_preview/student_life/' + quox + '.jpg" title="Yearbook Student Life Preview">');
}


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="yearbook_products.html" class="bn">PRODUCTS</a>  '); 
document.write(' <a href="yearbook_careers.html" class="bn">CAREERS</a>  ');
document.write(' <a href="yearbook_investors.html" class="bn">INVESTORS</a> '); 
document.write(' <a href="yearbook_media.html" class="bn">MEDIA</a>  ');
document.write(' <a href="yearbook_news.html" class="bn">NEWS</a>   ');
document.write(' <a href="http://myyearbookbuilder-digital-yearbooks.odysseyinteractive.com" target="_blank" class="bn">BLOG</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="yearbook_multimedia.html">Digital Multimedia</a></li>');
document.write(' <li id="fi"><a href="yearbook_personalization.html">Self-Expression & Personalization</a></li>');
document.write(' <li id="fi"><a href="yearbook_fundraising.html">School Fundraising</a></li>');
document.write(' <li id="fi"><a href="yearbook_turnaround.html">Digital Yearbook Turnaround</a></li>');
document.write(' <li id="fi"><a href="yearbook_replacement.html">Digital Yearbook Replacement</a></li>');
document.write(' <li id="fi"><a href="yearbook_environmentally_friendly.html">Environmentally Friendly</a></li>');
document.write(' <li id="fi"><a href="yearbook_classroom_ready.html">Classroom Ready</a></li>');
document.write(' <li id="fi"><a href="yearbook_mobile_device_compatible.html">Mobile Device Compatible</a></li>');
document.write(' </ul>');

document.write(' <BR style="line-height:10px">');
document.write(' <center><a href="build_your_free_digital_yearbook.html"><img border="0" src="images/b_build_your_free_digital_yearbook.gif" width="220" height="70" alt="Build Your Next Yearbook FREE!" ');
document.write(' title="Click Here to Learn More"></a><BR>');
document.write(' <BR style="line-height:10px">');
document.write(' <a target="_blank" href="http://www.MyYearbookBuilder.com" title="Digital Yearbook Publishing Company | MyYearbookBuilder.com"><img border="0" src="images/myyearbookbuilder_logo.gif" width="220" height="35" ');
document.write(' alt="Digital Yearbook Publishing Company | 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="yearbook_preview/yearbook_portrait.html" target="_blank">Portrait Preview</b><BR>');

rndPix1();

document.write(' </a></td><td width="50%" align="center">');
document.write(' <b><a href="yearbook_preview/yearbook_student_life.html" target="_blank"><nobr>Student Life Preview</nobr></b><br>');

rndPix2();

document.write(' </a></td></tr></table>');

document.write(' <div id="mybBox"><div class="bluButton"><a href="http://www.myyearbookbuilder.com/yearbook.php" title="Yearbook Demo" target="_blank">Yearbook Demo</a></div></div> ');

netnav();

}

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="yearbook_products.html">Products</a> . ');
document.write(' <a href="yearbook_careers.html">Careers</a> .');
document.write(' <a href="yearbook_investors.html">Investors</a> . ');
document.write(' <a href="yearbook_media.html">Media</a> . ');
document.write(' <a href="yearbook_news.html">News</a> . ');
document.write(' <a href="contact.html">Contact Us</a> . ');
document.write(' <a href="http://myyearbookbuilder-digital-yearbooks.odysseyinteractive.com" target="_new">Blog</a> . ');
document.write(' <a href="sitemap.html">Site Map</a><BR><BR>');
document.write(' &copy; 2009-2011 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>');

document.write('<scr'+'ipt type="text/javas'+'cript">');
document.write("   var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-11568313-2']); _gaq.push(['_trackPageview']); ");
document.write("   (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ");
document.write("     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ");
document.write("     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);  })(); ");
document.write('</scr'+'ipt>');

}

