var xmlhttp=false;
var pageResponse=null;
var rootdomain="http://"+window.location.hostname;
var displayName;
var response;

<!-- ############################################################################### -->

function GetXmlHttpObject()
{
   //Try to set up an IE XMLHTTP Request Object
   try {xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");} 
   catch (error) 
   {
      try {xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");} 
      catch (error) {xmlhttp = false;}
   }
   
   //Try to set up Mozilla and Safari XMLHTTP Request Object
   if (!xmlhttp && typeof XMLHttpRequest!='undefined') 
   {
      try {xmlhttp = new XMLHttpRequest();} 
      catch (error) {xmlhttp=false;}
   }
   
   //Try to set up IceBrowser XMLHTTP Request Object 
   if (!xmlhttp && window.createRequest) 
   {
      try {xmlhttp = window.createRequest();} 
      catch (error) {xmlhttp=false;}
   }
  
   return xmlhttp;
}

<!-- ############################################################################### -->

function getReturnInfo(theURL)
{
      xmlhttp=GetXmlHttpObject();
      if (xmlhttp==null) {alert ("Browser does not support HTTP Request"); return; }	
      xmlhttp.open('GET', rootdomain+theURL, false);
      xmlhttp.send(null);	

      return xmlhttp.responseText;
}

<!-- ############################################################################### -->

function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	var imageWidth2 = 700;	
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><head>'); 
	newWindow.document.write('<meta http-equiv="imagetoolbar" content="no">'); 
	newWindow.document.write('<title>'+alt+'</title>'); 
	newWindow.document.write('<script language="JavaScript">');
	newWindow.document.write('var message="Function Disabled!";');
	newWindow.document.write('function clickIE() {if (document.all) {alert(message);return false;}}');
	newWindow.document.write('function clickNS(e) {if ');
	newWindow.document.write('(document.layers||(document.getElementById&&!document.all)) {');
	newWindow.document.write('if (e.which==2||e.which==3) {alert(message);return false;}}}');
	newWindow.document.write('if (document.layers) ');
	newWindow.document.write('{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}');
	newWindow.document.write('else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}');
	newWindow.document.write('document.oncontextmenu=new Function("return false")');
	newWindow.document.write('</script>');
	newWindow.document.write('</head>'); 
	newWindow.document.write('<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	newWindow.document.write('<img src=\"'+imageName+'\" width='+imageWidth+' height='+imageHeight+' alt=\"'+alt+'\">');
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

<!-- ############################################################################### -->

/*var message="Function Disabled!";
///////////////////////////////////
function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {alert(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")*/

<!-- ############################################################################### -->

function textCounter(field, countfield, maxlimit) 
{
   if (field.value.length > maxlimit)
   {
      field.value = field.value.substring(0, maxlimit);
   }
   else 
   {
      countfield.value = maxlimit - field.value.length;
   }
}

<!-- ############################################################################### -->

var ajax = new Array();

function getPlayBookList(sel)
{
	var playBookCode = sel.options[sel.selectedIndex].value;
	document.getElementById('playbook').options.length = 0;	// Empty select box
	if(playBookCode.length>0){
		var index = ajax.length;
		ajax[index] = new sack();
		
		ajax[index].requestFile = 'http://www.playbookexchange.net/UploadForm/PBUpload.php?playBookCode='+playBookCode;	// Specifying which file to get
		ajax[index].onCompletion = function(){ createPlayBooks(index) };	// Specify function that will be executed after file has been found
		ajax[index].runAJAX();		// Execute AJAX function
	}
}

function createPlayBooks(index)
{
	var obj = document.getElementById('playbook');
	eval(ajax[index].response);	// Executing the response from Ajax as Javascript code	
}

<!-- ############################################################################### -->

var offense=new Array()
offense[1]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=1">Spread</a>'
offense[2]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=2">Option</a>'
offense[3]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=3">Wing T</a>'
offense[4]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=4">Pistol</a>'
offense[5]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=5">Flexbone</a>'
offense[6]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=6">Pro I</a>'
offense[7]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=7">Veer</a>'
offense[8]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=8">Multiple Sets</a>'
offense[9]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=9">Three Back</a>'
offense[10]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=10">Fly</a>'
offense[11]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=11">Fun N Gun</a>'
offense[12]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=12">Run N Shoot</a>'
offense[13]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=1&pbook=13">Other</a>'

var defense=new Array()
defense[1]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=2&pbook=14">3-3</a>'
defense[2]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=2&pbook=15">3-3-5</a>'
defense[3]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=2&pbook=16">3-5-3</a>'
defense[4]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=2&pbook=17">3-4</a>'
defense[5]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=2&pbook=18">4-2-5</a>'
defense[6]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=2&pbook=19">4-3</a>'
defense[7]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=2&pbook=20">4-4</a>'
defense[8]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=2&pbook=21">4-6</a>'
defense[9]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=2&pbook=22">5-2</a>'
defense[10]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=2&pbook=23">5-3</a>'
defense[11]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=2&pbook=24">Other</a>'
      
var special=new Array()
special[1]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=3&pbook=25">Kickoff</a>'
special[2]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=3&pbook=26">Kickoff Return</a>'
special[3]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=3&pbook=27">Onside Kickoff</a>'
special[4]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=3&pbook=28">Punt</a>'
special[5]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=3&pbook=29">Punt Return</a>'
special[6]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=3&pbook=30">Punt Block</a>'
special[7]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=3&pbook=31">Punt Fake</a>'
special[8]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=3&pbook=32">Field Goal</a>'
special[9]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=3&pbook=33">Field Goal Block</a>'
special[10]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=3&pbook=34">Field Goal Fake</a>'
special[11]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=3&pbook=35">All Special Teams</a>'

var drills=new Array()
drills[1]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=36">Quarterback</a>'
drills[2]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=37">Running Back</a>'
drills[3]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=38">Wide Receiver</a>'
drills[4]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=39">Tight Ends</a>'
drills[5]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=40">Offensive Line</a>'
drills[6]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=41">Defensive Tackles</a>'
drills[7]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=42">Defensive Ends</a>'
drills[8]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=43">Linebackers</a>'
drills[9]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=44">Cornerbacks</a>'
drills[10]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=45">Safeties</a>'
drills[11]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=46">Kickers/Punters</a>'
drills[12]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=47">Strength/Conditioning</a>'
drills[13]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=48">Speed Training</a>'
drills[14]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=4&pbook=49">Other</a>'

var organize=new Array()
organize[1]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=50">Practice</a>'
organize[2]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=51">Offense</a>'
organize[3]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=52">Defense</a>'
organize[4]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=53">Special Teams</a>'
organize[5]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=54">Players</a>'
organize[6]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=55">Game</a>'
organize[7]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=56">Off Season</a>'
organize[8]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=57">In Season</a>'
organize[9]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=58">Meetings</a>'
organize[10]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=59">Film Sessions</a>'
organize[11]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=60">Media</a>'
organize[12]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=61">Parents/Community</a>'
organize[13]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=5&pbook=62">Other</a>'

var motivate=new Array()
motivate[1]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=6&pbook=63">Speeches</a>'
motivate[2]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=6&pbook=64">Quotes</a>'
motivate[3]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=6&pbook=65">Situations</a>'
motivate[4]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=6&pbook=66">Comebacks</a>'
motivate[5]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=6&pbook=67">Tragedy</a>'
motivate[6]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=6&pbook=68">Stories</a>'
motivate[7]='<a href="http://www.playbookexchange.net/Playbooks.php?ptype=6&pbook=69">Other</a>'

var video=new Array()
video[1]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=1">Offense</a>'
video[2]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=2">Defense</a>'
video[3]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=3">Special Teams</a>'
video[4]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=4">Drills</a>'
video[5]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=5">Organize</a>'
video[6]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=6">Motivation</a>'
video[7]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=7">Practice</a>'
video[8]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=8">Highlights</a>'
video[9]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=9">Big Hits</a>'
video[10]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=10">Long Runs</a>'
video[11]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=11">Recruiting</a>'
video[12]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=12">Pro Football</a>'
video[13]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=13">College</a>'
video[14]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=14">High School</a>'
video[15]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=15">Strength Training</a>'
video[16]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=16">Speed Training</a>'
video[17]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=17">Cut Ups</a>'
video[18]='<a href="http://www.playbookexchange.net/Videos.php?vlink=null&vtype=18">Madden/NCAA</a>'
		
var menuwidth='165px' //default menu width
var menubgcolor='lightyellow'  //menu bgcolor
var disappeardelay=250  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?
var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

<!-- ############################################################################### -->
<!-- ############################################################################### -->
<!-- ############################################################################### -->
<!-- ############################################################################### -->
<!-- ############################################################################### -->

var otherfieldsgood=true;
var playbookgood=true;
var securitygood=true;
var invalidentry = "Required";
var errormessage = "Please Fix Error Indicated Above";
var invalidsecurity = "Invalid Security Code";
var invaliddoctype = "Document Types Do Not Match";

<!-- ############################################################################### -->

function checkVideoUploadFields()
{
   var app =  document.getElementById("uploadVideo");
   
   otherfieldsgood=true;
   
   if (app.title.value =="")        {otherfieldsgood=false; submitErrorMessage('titlem',invalidentry);} else {clearErrorMessage('titlem');}
   if (app.description.value =="")  {otherfieldsgood=false; submitErrorMessage('descriptionm',invalidentry);} else {clearErrorMessage('descriptionm');}
   if (app.videolink.value =="")    {otherfieldsgood=false; submitErrorMessage('videolinkm',invalidentry);}  else {clearErrorMessage('videolinkm');}

}

<!-- ############################################################################### -->

function clearErrorMessage(messageArea)
{
	document.getElementById(messageArea).innerHTML= "";

  if (otherfieldsgood)
  {
  	  document.getElementById('erroralert').innerHTML= ""; 
  }
}

<!-- ############################################################################### -->

function submitErrorMessage(messageArea,message)
{
     document.getElementById(messageArea).innerHTML= message;
     document.getElementById(messageArea).style.color="red";

     document.getElementById('erroralert').innerHTML= errormessage;
     document.getElementById('erroralert').style.color="red";
}

<!-- ############################################################################### -->

var goodSubmit;
function confirmSubmitVideo()
{
	goodSubmit=true;
  return goodSubmit;
}

<!-- ############################################################################### -->

var goodSubmit;
function confirmSubmitArticle()
{
   goodSubmit=true;

   return goodSubmit;
}
<!-- ############################################################################### -->

function getCheckedValue(radioObj) 
{
   if(!radioObj)  return "";
	 var radioLength = radioObj.length;
	 
	 if(radioLength == undefined)
	 {
	    if(radioObj.checked)
		  {
			   return radioObj.value;
		  }
		  else
			   return "";
	 }
	 
	 for(var i = 0; i < radioLength; i++) 
	 {
	    if(radioObj[i].checked) 
	    {
			   return radioObj[i].value;
		  }
	 }
	
	 return "";
}

<!-- ############################################################################### -->

function checkFileExtention()
{
    var fileExtForm =  document.getElementById("uploadBook");
    var playbookName = fileExtForm.fileupload.value;    
    var docType = fileExtForm.doctype;
    var docTypeValue = getCheckedValue(docType);    
    var docTypeWord;    
    var theURL  = "/PlaybookFiles/GetFileExtention.php?playbookName="+playbookName;
    var fileExt =  getReturnInfo(theURL);

    switch (docTypeValue)
    {
       case "1" : docTypeWord = "pdf"; break;
       case "2" : docTypeWord = "ppt"; break;
       case "3" : docTypeWord = "doc"; break;
    }
    
    if (fileExt.toLowerCase() == docTypeWord)
    {
    	 playbookgood=true;
       clearPlaybookErrorMessage('fileuploadm');
    }
    else
    {
    	 playbookgood=false;
       submitPlaybookErrorMessage('fileuploadm',invaliddoctype);
    }
}

<!-- ############################################################################### -->

function checkSecurity(s_code)
{
	    var security_code = s_code.value;
  	  var theURL = "/phpClasses/PlayBook_Security.php?security_code="+security_code;
      var security = getReturnInfo(theURL);
	    
      if (security == 1)
      {
         securitygood=true;
         clearPlaybookErrorMessage('securitym');
      }
      else
      {
         submitPlaybookErrorMessage('securitym',invalidsecurity);
         securitygood=false;
      }
      
      return(securitygood);
}
<!-- ############################################################################### -->

function clearPlaybookErrorMessage(messageArea)
{
	document.getElementById(messageArea).innerHTML= "";

//  if ((zipcodegood) && (birthdategood) && (webaddressgood) && (otherfieldsgood) && (emailgood) && (securitygood) && (displaynamegood)) 
//  {
  	  document.getElementById('erroralert').innerHTML= ""; 
//  }
}

<!-- ############################################################################### -->

function submitPlaybookErrorMessage(messageArea,message)
{
     document.getElementById(messageArea).innerHTML= message;
     document.getElementById(messageArea).style.color="red";

     document.getElementById('erroralert').innerHTML= errormessage;
     document.getElementById('erroralert').style.color="red";
}

<!-- ############################################################################### -->

function checkPlaybookOtherFields()
{
   var app =  document.getElementById("uploadBook");

   otherfieldsgood=true;

   if (app.playbooktype.value =="")       {otherfieldsgood=false; submitErrorMessage('playbooktypem',invalidentry);} else {clearErrorMessage('playbooktypem');}
   if (app.playbook.value =="")           {otherfieldsgood=false; submitErrorMessage('playbookm',invalidentry);}     else {clearErrorMessage('playbookm');}
   if (getCheckedValue(app.level) =="")   {otherfieldsgood=false; submitErrorMessage('levelm',invalidentry);}        else {clearErrorMessage('levelm');}
   if (app.title.value =="")              {otherfieldsgood=false; submitErrorMessage('titlem',invalidentry);}        else {clearErrorMessage('titlem');}
   if (app.description.value =="")        {otherfieldsgood=false; submitErrorMessage('descriptionm',invalidentry);}  else {clearErrorMessage('descriptionm');}
   if (getCheckedValue(app.doctype) =="") {otherfieldsgood=false; submitErrorMessage('doctypem',invalidentry);}      else {clearErrorMessage('doctypem');}
   if (app.fileupload.value =="")         {otherfieldsgood=false; submitErrorMessage('fileuploadm',invalidentry);}   else {checkFileExtention();}
   if (app.security_code.value =="")      {otherfieldsgood=false; submitErrorMessage('securitym',invalidentry);}     else {checkSecurity(app.security_code);}
}

<!-- ############################################################################### -->

var goodSubmit;
function confirmSubmitPlaybook()
{
	checkPlaybookOtherFields();
	
  if ((playbookgood) && (securitygood) && (otherfieldsgood)) 
	{
	   goodSubmit=true;
	}
	else
	{
		 goodSubmit=false;
	}

   return goodSubmit;
}

<!-- ############################################################################### -->

function setVideoLink(videolink,description,videoarea)
{
    window.scrollTo(0,230);

    ajaxpage(rootdomain+'/VideoPageRotate/VideoPage.php?vlink='+videolink+'&dlink='+description, videoarea);
}

<!-- ############################################################################### -->

function setBrokenVideoLink(videolink)
{
  var theURL = "/VideoPageRotate/BrokenLink.php?vlink="+videolink;
  var brokenlink = getReturnInfo(theURL);
  var broken = "Thanks Informing Us Of Broken YouTube Link.";
  document.getElementById('youTubeVideoAreaBrokenText').innerHTML= broken;  
    
}

<!-- ############################################################################### -->

function returnRelatedVideo(videoType)
{
	 var headerType;
	 
   switch (videoType) 
   {
      case 1 : headerType = "Offense"; break;
      case 2 : headerType = "Defense"; break;
      case 3 : headerType = "Special Teams"; break;
      case 4 : headerType = "Drills"; break;
      case 5 : headerType = "Organize"; break;
      case 6 : headerType = "Motivation"; break;
      case 7 : headerType = "Practice"; break;
      case 8 : headerType = "Highlights"; break;
      case 9 : headerType = "Big Hits"; break;
      case 10 : headerType = "Long Runs"; break;
      case 11 : headerType = "Recruiting"; break;
      case 12 : headerType = "Pro Football"; break;
      case 13 : headerType = "College"; break;
      case 14 : headerType = "High School"; break;
      case 15 : headerType = "Strength Training"; break;
      case 16 : headerType = "Speed Training"; break;
      case 17 : headerType = "Cut Ups"; break;
      case 18 : headerType = "Madden/NCAA"; break;
   }

   return headerType;
}

<!-- ############################################################################### -->

function setRelatedVideoLink(videolink,videotype,collegetype)
{
    window.scrollTo(0,230);

    var headerType = returnRelatedVideo(videotype);
    
    ajaxpage(rootdomain+'/VideoPageRotate/RelatedVideoPage.php?vlink='+videolink+'&vtype='+videotype+'&ctype='+collegetype, 'relatedVideoArea');
    document.getElementById('relatedHeaderTextRight').innerHTML= headerType;
}

<!-- ############################################################################### -->

function returnRelatedVideoCollege(collegeType)
{
	 var headerType;
   switch (collegeType) 
   {
      case "1" : headerType = "LSU"; break;
      case "2" : headerType = "USC"; break;
      case "3" : headerType = "Georgia"; break;
      case "4" : headerType = "Ohio State"; break;
      case "5" : headerType = "Missouri"; break;
      case "6" : headerType = "West Virginia"; break;
      case "7" : headerType = "Kansas"; break;
      case "8" : headerType = "Oklahoma"; break;
      case "9" : headerType = "Virginia"; break;
      case "10" : headerType = "Texas"; break;
      case "11" : headerType = "Boston College"; break;
      case "12" : headerType = "Tennessee"; break;
      case "13" : headerType = "Arizona State"; break;
      case "14" : headerType = "BYU"; break;
      case "15" : headerType = "Auburn"; break;
      case "16" : headerType = "Florida"; break;
      case "17" : headerType = "Hawaii"; break;
      case "18" : headerType = "Illinois"; break;
      case "19" : headerType = "Michigan"; break;
      case "20" : headerType = "Cincinnati"; break;
      case "21" : headerType = "Wisconsin"; break;
      case "22" : headerType = "Clemson"; break;
      case "23" : headerType = "Texas Tech"; break;
      case "24" : headerType = "Oregon"; break;
      case "25" : headerType = "Penn State"; break;
      case "26" : headerType = "Georgia Tech"; break;
      case "27" : headerType = "Miami"; break;
      case "28" : headerType = "Arkansas"; break;
      case "29" : headerType = "Alabama"; break;
      case "29" : headerType = "Alabama"; break;
      case "30" : headerType = "Nebraska"; break;
      case "31" : headerType = "Virginia Tech"; break;
      case "32" : headerType = "Florida State"; break;
      case "33" : headerType = "Colorado"; break;
      case "34" : headerType = "Michigan State"; break;
      case "35" : headerType = "Notre Dame"; break;
      case "36" : headerType = "Navy"; break;
      case "37" : headerType = "UCLA"; break;
      case "38" : headerType = "Oregon State"; break;
      case "39" : headerType = "Kentucky"; break;
      case "40" : headerType = "Toledo"; break;
      case "41" : headerType = "Boise State"; break;
      case "42" : headerType = "Maryland"; break;
      case "43" : headerType = "Akron"; break;
      case "44" : headerType = "Wake Forest"; break;
      case "45" : headerType = "NC State"; break;
      case "46" : headerType = "Pittsburgh"; break;
      case "47" : headerType = "Louisville"; break;
      case "48" : headerType = "Cincinnati"; break;
      case "49" : headerType = "Ohio U"; break;
   }

   return headerType;
}

<!-- ############################################################################### -->

function setRelatedVideoLinkCollege(collegeTeam)
{
    window.scrollTo(0,230);
    var college =  document.getElementById(collegeTeam);
    var collegeType = college.options[college.selectedIndex].value;

    var headerType = returnRelatedVideoCollege(collegeType);
    
    ajaxpage(rootdomain+'/VideoPageRotate/RelatedVideoPage.php?vlink=null&vtype=null&ctype='+collegeType, 'relatedVideoArea');
    document.getElementById('relatedHeaderTextRight').innerHTML= headerType;
}

<!-- ############################################################################### -->

function setRelatedPlaybookLink(playbooktype)
{
    window.scrollTo(0,230);

    ajaxpage(rootdomain+'/PlaybookPageRotate/RelatedPlaybookPage.php?ptype=null&pbook='+playbooktype, 'relatedPlaybookArea');
//    document.getElementById('relatedHeaderTextRight').innerHTML= headerType;
}



function comingSoon()
{
   alert("Coming Soon...Thanks For Your Patience!!!!")
}
