	 function dayofWeek(day)
	 {
		  switch (day)
		  {
				case 0: s = "Sun"; break;
				case 1: s = "Mon"; break;
				case 2: s = "Tue"; break;
				case 3: s = "Wed"; break;
				case 4: s = "Thu"; break;
				case 5: s = "Fri"; break;
				case 6: s = "Sat"; break;
				default: s = "Unk"
		  }
		  return s;
	 }

	 function monthofYear(mon)
	 {
		  switch (mon)
		  {
				case 0: s = "Jan"; break;
				case 1: s = "Feb"; break;
				case 2: s = "Mar"; break;
				case 3: s = "Apr"; break;
				case 4: s = "May"; break;
				case 5: s = "Jun"; break;
				case 6: s = "Jul"; break;
				case 7: s = "Aug"; break;
				case 8: s = "Sep"; break;
				case 9: s = "Oct"; break;
				case 10: s = "Nov"; break;
				case 11: s = "Dec"; break;
				default: s = "Unk"
		  }
		  return s;
	 }

	 function preloadImages()
	 {
		  for (i = 0; i < preloadImages.arguments.length; i++)
				new Image().src = preloadImages.arguments[i];
	 }

	 function DisplayPic(picURL)
	 {
		  document.location.href = picURL;
	 }

	 function DisplayImage(picURL,picWidth,picHeight,picTitle)
	 {
		  newWindow = window.open(picURL,'newWin','toolbar=no,width='+picWidth+',height='+picHeight);
		  newWindow.document.write('<html><head><title>'+picTitle+'<\/title><\/head><body><img src="'+picURL+'" width="'+picWidth+'" height="'+picHeight+'"\/><\/body><\/html>');
		  newWindow.resizeBy(picWidth-newWindow.document.body.clientWidth,picHeight-newWindow.document.body.clientHeight);
		  newWindow.focus();
	 }

	 function OpenPlayerPic(photoUrl,FName,LName,Number,Pos,Class,Ht,Wt)
	 {
		  document.location.href = "player_pic.html" + "?Pu=" + photoUrl + "&Fn=" + FName + "&Ln=" + LName +
										  "&Nm=" + Number + "&Ps=" + Pos + "&Cl=" + Class + "&Ht=" + Ht + "&Wt=" + Wt;
	 }

	 var tempImg = new Image();
	 var tempTitle, tempURL;
	 var mywindow;

	 function OpenPopup()
	 {
		  var ht = tempImg.height;
		  var wd = tempImg.width;
		  var stile = 'toolbar=no,location=1,menubar=no,status=no,scrollbars=no,width='+wd+',height='+ht;
		  var stile2 = 'toolbar=no,location=1,menubar=no,status=no,scrollbars=no,width=500,height=700';

		  alert('1 '+tempTitle+'('+tempURL+';'+ stile +')= '+wd+'*'+ht);

		  mywindow = window.open (tempURL,'picwindow',stile);

		  /*
		  mywindow = window.open (tempURL,'picwindow','toolbar=no,location=1,menubar=no,status=no,scrollbars=no,width=500,height=700');
		  alert('2 '+tempTitle+'('+tempURL+')= '+wd+'*'+ht);
		  */
		  mywindow.document.write('<html><head><title>'+tempTitle+'<\/title><\/head><body><\/body><\/html>');
		  mywindow.moveTo(0,0);
		  mywindow.focus();
	 }

	 function mypopup(picURL,picTitle)
	 {
		  tempImg.onload = OpenPopup;
		  tempImg.src = picURL;
		  tempURL = picURL;
		  tempTitle = picTitle;
	 }

	 function showDiv(pass)
	 {
		  var divs = document.getElementsByTagName('div');
		  for(i=0;i<divs.length;i++)
		  {
				if (divs[i].id.match(pass))
				{ //if they are 'see' divs
					 if (document.getElementById) // DOM3 = IE5, NS6
	 					 divs[i].style.visibility="visible";// show/hide
					 else
						  if (document.layers) // Netscape 4
								document.layers[divs[i]].display = 'visible';
						  else // IE 4
								document.all.divs[i].visibility = 'visible';
				}
				else
				{
					 if (divs[i].id.substring(0,2) == 'RP_')
					 {
						  if (document.getElementById)
								divs[i].style.visibility="hidden";
						  else
								if (document.layers) // Netscape 4
									 document.divs[i].visibility = 'hidden';
								else // IE 4
									 document.all.divs[i].visibility = 'hidden';
					 }
				}
		  }
	 }

	 function mainmenu()
	 {
		  $("ul.MM>li").hover
		  (
				function()
				{
					 $(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown().show('slow');
				},
				function()
				{
					 $(this).find('ul:first').css({visibility: "hidden"});
				}
		  );
	 }

	function slideSwitch_wide()
	{
		  var $active = $('#slideshow_wide IMG.active');

		  if ( $active.length == 0 ) $active = $('#slideshow_wide IMG:last');

		  var $next =  $active.next().length ? $active.next()
														  : $('#slideshow_wide IMG:first');

		  $active.addClass('last-active');

		  $next.css({opacity: 0.0})
		  .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
	 }

	function slideSwitch_nar()
	{
		  var $active = $('#slideshow_nar IMG.nactive');

		  if ( $active.length == 0 ) $active = $('#slideshow_nar IMG:last');

		  var $next =  $active.next().length ? $active.next()
														  : $('#slideshow_nar IMG:first');

		  $active.addClass('last-active');

		  $next.css({opacity: 0.0})
		  .addClass('nactive')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('nactive last-active');
        });
	 }

	 $(function()
	 {
		  setInterval( "slideSwitch_nar()", 5000 );
		  setInterval( "slideSwitch_wide()", 6000 );
	 });

	 $(document).ready(function()
	 {
		  $(".NewsSectionText_CLS").show();
		  $(".NewsSectionText_CL").hide();

		  $("div.NewsSectionHeader_CL > div.NewsSectionTitle").toggle
		  (
				function()
				{
	 				$(this).parent().next("div.NewsSectionText_CL").slideDown(100);
	 				$(this).find("div.ArrowExpand").removeClass("ArrowExpand").addClass("ArrowClose");
				},
				function()
				{
	 				$(this).parent().next("div.NewsSectionText_CL").slideUp(300);
	 				$(this).find("div.ArrowClose").removeClass("ArrowClose").addClass("ArrowExpand");
				}
		  );

		  $("div.NewsSectionHeader_CLS > div.NewsSectionTitle").toggle
		  (
				function()
				{
	 				$(this).parent().next("div.NewsSectionText_CLS").slideUp(300);
	 				$(this).find("div.ArrowClose").removeClass('ArrowClose').addClass('ArrowExpand');
				},
				function()
				{
	 				$(this).parent().next("div.NewsSectionText_CLS").slideDown(100);
	 				$(this).find("div.ArrowExpand").removeClass('ArrowExpand').addClass('ArrowClose');
				}
		  );
	 });

