var vwWin, selURL;

var pgTitle = new Array ("Cowtown Vintage Base Ball - Homepage",
  "Cowtown VBB - Schedule of Events",
  "Cowtown VBB - Board and Team Rosters",
  "Cowtown VBB - Sponsors",
  "Cowtown VBB - Photos, Video, & News",
  "Cowtown VBB - History",
  "Cowtown VBB - Links");

var pgHeader = new Array ("VBB Home",
  "Schedule of Events",
  "Board / Team Rosters",
  "Sponsors",
  "Photos & News",
  "History",
  "Links");
  
var pgLinkText = new Array ("Home",
  "Schedule",
  "Rosters",
  "Sponsors",
  "Photos & News",
  "History",
  "Links");

var pgLinkValue = new Array ("index.html",
  "schedule.html",
  "roster.html",
  "sponsors.html",
  "highlights.html",
  "history.html",
  "links.html");

var pgQuote = new Array 
  ("Baseball is ninety percent mental and the other half is physical. --- Yogi Berra",
   "All pitchers are liars or crybabies. --- Yogi Berra",
   "He hits from both sides of the plate. He's amphibious. --- Yogi Berra",
   "How can you think and hit at the same time? --- Yogi Berra",
   "I think Little League is wonderful. It keeps the kids out of the house. --- Yogi Berra",
   "Trying to lead you ballplayers is like trying to herd cats. --- Don 'Chilly' Alvord",
   "So I'm ugly. So what? I never saw anyone hit with his face. --- Yogi Berra",
   "The good rising fastball is the best pitch in baseball. --- Tom Seaver",
   "The other teams could make trouble for us if they win. --- Yogi Berra",
   "You wouldn't have won if we'd beaten you. --- Yogi Berra",
   "You can observe a lot by just watching. --- Yogi Berra", 
   "If there was ever a man born to be a hitter it was me. --- Ted Williams",
   "If you come to a fork in the road, take it. --- Yogi Berra",
   "Baseball is almost the only place in life where a sacrifice is really appreciated. --- Mark Beltaire",
   "When I put on my uniform, I feel I am the proudest man on earth. --- Roberto Clemente",
   "Baseball is like church. Many attend, few understand. --- Leo Durocher",
   "Baseball is a game of inches. --- Branch Rickey",
   "Close don't count in baseball. Close only counts in horseshoes and grenades. --- Frank Robinson",
   "Every strike brings me closer to the next home run. --- Babe Ruth",
   "One of the beautiful things about baseball is the history. --- Jim Abbott",
   "I had only one superstition. I made sure to touch all the bases when I hit a home run. --- Babe Ruth",
   "I don't want them to forget \(Babe\) Ruth, I just want them to remember me! --- Hank Aaron",
   "The first rule of baseball is to get a good ball to hit. --- Roger Hornsby",
   "It's supposed to be fun, the man says 'Play Ball' not 'Work Ball' you know. --- Wille Stargell",
   "Lady, I'm not an athlete. I'm a baseball player. --- John Kruk",
   "Playing baseball is not real life. It's a fantasy world... It's a dream come true. --- Dale Murphy",
   "In the great department store of life, baseball is the toy department. --- Unknown",
   "Players have two things to do. Play and keep their mouths shut. --- Sparky Anderson",
   "A baseball manager is a necessary evil. --- Sparky Anderson",
   "It ain't braggin' if you can back it up. --- Dizzy Dean", 
   "We're the best team in baseball, but not by much. --- Sparky Anderson",
   "The only reason I'm coming out here tomorrow is the schedule says I have to. --- Sparky Anderson",
   "I've changed my mind about it (DH) - instead of being bad, it stinks. --- Sparky Anderson",
   "Trying to throw a fastball by Henry Aaron is like trying to sneak a sunrise past a rooster. --- Curt Simmons",
   "I don't see pitches down the middle anymore - not even in batting practice. --- Hank Aaron",
   "Am I still in uniform? Then I ain't retired. --- Pete Rose",
   "I'd walk through hell in a gasoline suit to play baseball. --- Pete Rose",
   "I'm just like everybody else. I have two arms, two legs and four-thousand hits. --- Pete Rose",
   "You played hard and you play to win and afterwards you are all friends. --- Sonya 'Sass' Beye of the Grand Island Old Glories",
   "Hitting is fifty percent above the shoulders. --- Ted Williams",
   "You have to hit the fastball to play in the big leagues. --- Ted Williams", 
   "Hey, big mouth \(yelling out to a heckler\), how do you spell triple? --- Shoeless Joe Jackson",
   "Hitting the ball was easy. Running around the bases was the tough part. --- Mickey Mantle",
   "Well, baseball was my whole life. Nothing's ever been as fun as baseball. --- Mickey Mantle",
   "You don't realize how easy this game is until you get up in that broadcasting booth. --- Mickey Mantle",
   "I had slumps that lasted into the winter. --- Bob Uecker",
   "I led the league in \"Go get'em next time.\" --- Bob Uecker",
   "That last one sounded kinda high to me. --- Babe Ruth",
   "A pitcher's got to be good and he's got to be lucky to get a no hit game. --- Cy Young",
   "It helps if the hitter thinks you're a little crazy. --- Nolan Ryan",
   "Most pitchers are too smart to manage. --- Jim Palmer",
   "Show me a guy who can't pitch inside and I'll show you a loser. --- Sandy Koufax",
   "I found a delivery in my flaw. --- Dan Quisenberry",
   "When I throw a curve that hangs and it goes for a hit, I want to chew up my glove. --- Don Drysdale",
   "I can throw out any man alive. --- Johnny Bench",
   "You know, this game's not very much fun when you're only hitting .247. --- Reggie Jackson",
   "It could be, it might be... It is, A home run! --- Harry Caray",
   "Back, back, back, back... Gone! --- Chris Berman",
   "Hello again, everybody. It's a bee-yooo-tiful day for baseball. --- Harry Caray",
   "I don't want to play golf. When I hit a ball, I want someone else to go chase it. --- Roger Hornsby");
   
// Return Link List
function rtnHpList(){
  for (var i = 0; i < pgLinkText.length; i++) {
      if ( i > 0 ) {
        var ls_row = '<A href=' + pgLinkValue[i]+ '><B><FONT SIZE=2>' + pgLinkText[i] + '</FONT></B></A>';
      window.document.writeln(ls_row + '<BR><BR>');
      }
    }
  }

//////////////////////////////////////////////////////
//  Name: getUrlPage()
//////////////////////////////////////////////////////
function getUrlPage(){
  var ls_val = "";
  var ls_url = window.location.pathname;
  var ll_pos = ls_url.lastIndexOf('/');
  if (ll_pos == -1) {
    ls_val = ls_url;
    }
  else {
    ls_val = ls_url.substring(ll_pos + 1, ls_url.length);
    // Hosting Site will default to index.html
    if (ls_val == '' ) {
	  ls_val = 'index.html';
	}
  }
  return(ls_val);   
}

//////////////////////////////////////////////////////
//  Name: rtnNextPg()
//////////////////////////////////////////////////////
function rtnNextPg(){
  var lscpg = getUrlPage();
  for (var i = 0; i < pgLinkText.length; i++) {
      if ( lscpg == pgLinkValue[i]) {
        if ( i+1 == pgLinkText.length ){
          window.location.href = pgLinkValue[0];
          }
        else {
          window.location.href = pgLinkValue[i+1];
        }
        break;
      }
    }
  }      
      
//////////////////////////////////////////////////////
//  Name: rtnPgTitle()
//////////////////////////////////////////////////////
function rtnPgTitle(){
  var lscpg = getUrlPage();
  var lsTtl = "";
  for (var i = 0; i < pgLinkValue.length; i++) {
      if ( lscpg == pgLinkValue[i]) {
        lsTtl = pgTitle[i];
        break;
      }
    }
    window.document.title = lsTtl;
  }      

//////////////////////////////////////////////////////
//  Name: rtnStdLinks()
//////////////////////////////////////////////////////
function rtnStdLinks(beforeln, afterln){      
  var lscpg = getUrlPage();
  var lsRoot = "./";  
  window.document.writeln('<DIV ALIGN=CENTER>');
  window.document.writeln('<TABLE border=0 align=center width="98%" cellspacing="0" cellpadding="0">');
  if ( beforeln == '1') {
    window.document.writeln('<TR>');
    window.document.writeln('<TD align=center>');
    window.document.writeln('<HR noshade color="#800000">');      
    window.document.writeln('</TD>');
    window.document.writeln('</TR>');
    }
  window.document.writeln('<TR>');
  window.document.writeln('<TD class=td-hdr-1C align=center>');
  for (var i = 0; i < pgLinkText.length; i++) {
    if ( lscpg != pgLinkValue[i]) {
      if ('http:' == pgLinkValue[i].substring(0, 5)) {
        var ls_row = '<A href=' + pgLinkValue[i] + ' target="_blank">' + pgLinkText[i] + '</A>';
      } else {
        var ls_row = '<A href=' + lsRoot + pgLinkValue[i] + '>' + pgLinkText[i] + '</A>';
      }
      
      if ( i+1 == pgLinkText.length ){
        window.document.writeln(ls_row);
      } else {
        window.document.writeln(ls_row + '&nbsp;&nbsp;|&nbsp;&nbsp;');
      }
    } else {
      var ls_row = pgLinkText[i];
      if ( i+1 == pgLinkText.length ){
        window.document.writeln(ls_row);
      } else {
        window.document.writeln(ls_row + '&nbsp;&nbsp;|&nbsp;&nbsp;');
      }
    }
  }
  window.document.writeln('</TD>');
  window.document.writeln('</TR>');
  if ( afterln == '1') {
    window.document.writeln('<TR>');
    window.document.writeln('<TD align=center>');
    window.document.writeln('<HR noshade color="#800000">');      
    window.document.writeln('</TD>');
    window.document.writeln('</TR>');
    }
  window.document.writeln('</TABLE>');
  window.document.writeln('</DIV>');
}
      
/////////////////////////////////////////////////////////////
//  Name: rtnAddress(ParName)
//////////////////////////////////////////////////////
function rtnAddress(mainsize, secsize, add_color){
  var ls_html = '<DIV align=center><FONT size=' + mainsize + ' color="'+ add_color + '">';
  ls_html += '<B>Cowtown Vintage Base Ball</B><BR></FONT>';
  ls_html += '<FONT size=' + secsize + ' color="'+ add_color + '">';
  ls_html += '1865 W. Museum Blvd.<BR>';
  ls_html += 'Wichita, KS&nbsp;&nbsp;67203<BR></FONT></DIV>';
  window.document.writeln(ls_html);
}

/////////////////////////////////////////////////////////////
//  Name: getParameter(ParName)
//////////////////////////////////////////////////////
  function getParameter(ParName) {
    // Parameter to Get
    var search = ParName + "=";
    
    if (location.href.indexOf('?') > 0) {
      //if there are any parameters
      var offset = location.href.indexOf(search);
      
      if (offset != -1) { 
        //if parameter exists set offset index to
        //the beginning of the parameter value
        offset += search.length;

        //set end index to the end of the parameter value
        var end = location.href.indexOf("&",offset);
              
        if (end == -1) { 
          end = location.href.length;
        }
              
        return unescape(location.href.substring(offset,end));
      }
      return "";
    }    
    return "";
  } // End of function assignParameter


/////////////////////////////////////////////////////////////
//  Name: rtnStdMenu(ParName)
//////////////////////////////////////////////////////
function rtnStdMenu(){      
  var lscpg = getUrlPage();
  var lsRoot = "./";  
  var ls_val, ls_sp;
  window.document.writeln('<TABLE borderColor="#ff0000" cellSpacing="0" cellPadding="0" border=1 align=left width="100%">');
  window.document.writeln('<TR>');
  window.document.writeln('<TD align=middle>');
  window.document.writeln('<B><FONT SIZE=2 >NAVIGATION MENU</FONT></B>');      
  window.document.writeln('</TD>');
  window.document.writeln('</TR>');
  window.document.writeln('<TR>');
  window.document.writeln('<TD align=left>');
  for (var i = 0; i < pgLinkText.length; i++) {
    ls_val = pgLinkValue[i].substring(0, 5);
    if (ls_val == 'ksmcl'){ 
       ls_sp = '&nbsp;&nbsp;';
    } else {
       ls_sp = '';
    }

    if ( lscpg != pgLinkValue[i]) {
      if ('http:' == pgLinkValue[i].substring(0, 5)) {
        var ls_row = '<A href=' + pgLinkValue[i] + '><FONT SIZE=2><B>' + pgLinkText[i] + '</B></FONT></A><BR>';
      } else {
        var ls_row = ls_sp + "<A href=" + lsRoot + pgLinkValue[i] + " Title='" + pgTitle[i] + "'><FONT SIZE=2><B>" + pgLinkText[i] + "</B></FONT></A><BR>";
      }
    } else {
      var ls_row = ls_sp + '<FONT SIZE=2><B>' + pgLinkText[i] + '</B></FONT><BR>';
    }
    window.document.writeln(ls_row);
  }
  window.document.writeln('</TD>');
  window.document.writeln('</TR>');
  window.document.writeln('</TABLE>');
}

/////////////////////////////////////////////////////////////
//  Name: rntQuote(class)
//////////////////////////////////////////////////////
function rtnQuote(class1){
  var lsHtml ="";
  var lsQuote = "";
  var lsAuthor = "";
  var lsDash;
  var lsSec
  var lsItem
  lsTime = new Date();
  lsSec = lsTime.getSeconds();
  lsItem = lsSec.toString();
  //if (lsItem > 29) {
  //  lsItem = lsItem - 30;
  //}

  window.document.writeln('<TABLE border=0 align=center width="100%" cellpadding="0" cellspacing="0">');
  window.document.writeln('<TR>');
  lsHtml = '<TD width="100%" align=center valign=bottom ' + class1 + ' >';
  window.document.writeln(lsHtml);
  lsHtml = pgQuote[lsItem];
  lsDash = lsHtml.indexOf('---');
  lsQuote = lsHtml.substring(0, lsDash - 1);
  lsAuthor = '<br>' + lsHtml.substring(lsDash + 2, lsHtml.length);
  window.document.writeln(lsQuote);
  window.document.writeln(lsAuthor);
  window.document.writeln('</TD>');
  window.document.writeln('</TR>');
  window.document.writeln('</TABLE>');
  }      

/////////////////////////////////////////////////////////////
//  Name: BC_formatDate()
//////////////////////////////////////////////////////  
function BC_formatDate(){
  dayOWeek = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
  nameOMonth = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
  thisInstant = new Date();

  dayString = dayOWeek[thisInstant.getDay()];
  monthString = nameOMonth[thisInstant.getMonth()];
  yearNum = thisInstant.getYear();
  if (yearNum < 1900) { yearNum+=1900; }

  infoString = dayString + " | " + monthString + " " + thisInstant.getDate() + ", " + yearNum ;
  return infoString;
}


//////////////////////////////////////////////////////
//  Name: rtnPgHeader()
//////////////////////////////////////////////////////
function rtnPgHeader(){
  var lsHtml ="";
    rtnPgHdrWrap();
    lsHtml = '<TABLE border=0 align=center width="98%" cellpadding="0" cellspacing="0">';
    window.document.writeln(lsHtml);
    lsHtml = '<TR><TD align=middle width="20%" rowspan=5>';
    window.document.writeln(lsHtml);
	lsHtml = '<IMG border=0 height=145 width=135 src="./images/cowbaselogocolor.gif" >';
    window.document.writeln(lsHtml);
    lsHtml = '</TD><TD align=middle width="80%" class=td-hdr6C>Cowtown Vintage Base Ball</TD></TR>';
    window.document.writeln(lsHtml);	
	lsHtml = '<TR><TD align=middle class=td-hdrC><a href="http://www.oldcowtown.org" target="_blank"><u><font color=#800000>Old Cowtown Museum</font></u></a>&nbsp;-&nbsp;1871 Sim Park Drive&nbsp;-&nbsp;Wichita, Kansas 67203-3203&nbsp;-&nbsp;316.219.1871</TD></TR>';
    window.document.writeln(lsHtml);
    lsHtml = '<TR><TD align=middle class=td-hdrC>';
    window.document.writeln(lsHtml);	
    lsHtml = '<SCRIPT language=JAVASCRIPT type="TEXT/JAVASCRIPT">';
    window.document.writeln(lsHtml);
    lsHtml = 'var today_date = BC_formatDate(); window.document.writeln(today_date);';
    window.document.writeln(lsHtml);
    lsHtml = '</SCRIPT></TD></TR>';
    window.document.writeln(lsHtml);
    lsHtml = '<TR><TD vAlign=top align=middle>';
    window.document.writeln(lsHtml);
    lsHtml = '<HR size=1 noShade color="#800000" width="98%" align=right>';
    window.document.writeln(lsHtml);
    lsHtml = '<table border=0 width="100%" cellpadding="0" cellspacing="0"> <TR>';
    window.document.writeln(lsHtml);
	lsHtml = '<TD width="2%">&nbsp;</TD><TD width="98%" vAlign=top align=middle>';
    window.document.writeln(lsHtml);
	lsHtml = '<SCRIPT language=JAVASCRIPT type="TEXT/JAVASCRIPT">rtnQuote("class=td");</SCRIPT>';
    window.document.writeln(lsHtml);
	lsHtml = '</TD></TR></table>';
    window.document.writeln(lsHtml);
	lsHtml = '<HR size=1 noShade color="#800000" width="98%" align=right></TD></TR>';
    window.document.writeln(lsHtml);
	lsHtml = '<TR><TD><table border=0 cellspacing="0" cellpadding="0" width="100%"><TR>';
    window.document.writeln(lsHtml);
	lsHtml = '<TD width="2%">&nbsp;</TD><TD width="98%" vAlign=top align=middle>';
    window.document.writeln(lsHtml);
	lsHtml = '<SCRIPT language=JAVASCRIPT type="TEXT/JAVASCRIPT">rtnStdLinks("0", "0");</SCRIPT> ';
    window.document.writeln(lsHtml);
	lsHtml = '</TD></TR></table></TD></TR>';
    window.document.writeln(lsHtml);
	lsHtml = '<TR><TD vAlign=top align=middle colSpan=2><HR noShade color="#800000"></TD></TR></TABLE>';
    window.document.writeln(lsHtml);
  }      

/////////////////////////////////////////////////////////////
//  Name: rtnStdFooter()
//////////////////////////////////////////////////////
function rtnStdFooter(){
  window.document.writeln('<DIV ALIGN=CENTER>');
  window.document.writeln('<TABLE border=0 align=center width="98%" cellpadding="0" cellspacing="0">');
  window.document.writeln('<TR>');
  window.document.writeln('<TD valign=top height=2 align=center class=td-1 colspan=3>');
  window.document.writeln('<HR noshade color="#800000">');      
  window.document.writeln('</TD>');
  window.document.writeln('</TR>');
  window.document.writeln('<TR>');
  window.document.writeln('<TD align=middle valign=top width="35%">');
  window.document.writeln('<Table border=0 cellpadding="0" cellspacing="0" width="100%" align=center><tr>');  
  window.document.writeln('<td align=middle width="100%" class="td-hdrC">Cowtown Vintage Base Ball Contacts</td></tr>');
  window.document.writeln('<tr><td align=middle class="td-hdr-1C">');
  window.document.writeln('<A HREF="mailto:president@cowtownbaseball.org"><u><font color=#800000>president@cowtownbaseball.org</font></u></A><br>');
  window.document.writeln('<A HREF="mailto:gary.lee@cowtownbaseball.org"><u><font color=#800000>gary.lee@cowtownbaseball.org</font></u></A><br>');  
  window.document.writeln('Send website comments to the <A HREF="mailto:webmaster@cowtownbaseball.org"><u><font color=#800000>Webmaster</font></u></A>');
  window.document.writeln('</td></tr></table></TD>');
  window.document.writeln('<TD align=middle noWrap width="30%">');
  window.document.writeln('<Table border=0 cellpadding="0" cellspacing="0" width="100%" align=center><tr><td align=middle>');
  window.document.writeln('<a href="http://www.oldcowtown.org" target="_blank">');
  window.document.writeln('<IMG border=0 height=60 width=158 src="./images/ocm_logo.jpg"></a></td></tr></table>');
  window.document.writeln('</TD>');  
  window.document.writeln('<TD align=right valign=top width="35%">');
  window.document.writeln('<Table border=0 cellpadding="0" cellspacing="0" width="100%" align=center><tr>');  
  window.document.writeln('<td align=middle width="100%" class="td-hdrC"><a href="http://www.oldcowtown.org" target="_blank"><u><font color=#800000>Old Cowtown Museum</font></u></a></td></tr>');
  window.document.writeln('<tr><td align=middle class="td-hdr-1C">');  
  window.document.writeln('1871 Sim Park Drive<br>Wichita, Kansas 67203-3203<br>316.219.1871');
  //&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="mailto:cowtown@sedgwick.org"><u><font color=#800000>cowtown@sedgwick.org</font></u></A>
  window.document.writeln('</td></tr></table></TD></TR>');
  window.document.writeln('</TABLE>');
  window.document.writeln('</DIV>');
  rtnPgFtrWrap();
}      

/////////////////////////////////////////////////////////////
//  Name: rtnPgHdrWrap()
//////////////////////////////////////////////////////
function rtnPgHdrWrap(){
  window.document.writeln('<table width="775" border="0" align="center" cellpadding="0" cellspacing="0">');
  window.document.writeln('<tr>');
  window.document.writeln('<td width="100%">');
}      

/////////////////////////////////////////////////////////////
//  Name: rtnPgFtrWrap()
//////////////////////////////////////////////////////
function rtnPgFtrWrap(){
  window.document.writeln('</td');
  window.document.writeln('</tr>');
  window.document.writeln('</table>');
}

/////////////////////////////////////////////////////////////
//  Name: move_box(an, box)
//////////////////////////////////////////////////////
function move_box(an, box) {
  var cleft = 0;
  var ctop = 0;
  var obj = an;
  while (obj.offsetParent) {
    cleft += obj.offsetLeft;
    ctop += obj.offsetTop;
    obj = obj.offsetParent;
  }
  box.style.left = cleft + 'px';
  ctop += an.offsetHeight + 8;
  if (document.body.currentStyle &&
    document.body.currentStyle['marginTop']) {
    ctop += parseInt(
      document.body.currentStyle['marginTop']);
  }
  box.style.top = ctop + 'px';
}

/////////////////////////////////////////////////////////////
//  Name: show_hide_box()
//////////////////////////////////////////////////////
function show_hide_box(an, width, height, borderStyle) {
  var href = an.href;
  var boxdiv = document.getElementById(href);

  if (boxdiv != null) {
    if (boxdiv.style.display=='none') {
      move_box(an, boxdiv);
      boxdiv.style.display='block';
    } else
      boxdiv.style.display='none';
    return false;
  }

  boxdiv = document.createElement('div');
  boxdiv.setAttribute('id', href);
  boxdiv.style.display = 'block';
  boxdiv.style.position = 'absolute';
  boxdiv.style.width = width + 'px';
  boxdiv.style.height = height + 'px';
  boxdiv.style.border = borderStyle;
  boxdiv.style.backgroundColor = '#fff';

  var contents = document.createElement('iframe');
  contents.scrolling = 'no';
  contents.frameBorder = '0';
  contents.style.width = width + 'px';
  contents.style.height = height + 'px';
  contents.src = href;

  boxdiv.appendChild(contents);
  document.body.appendChild(boxdiv);
  move_box(an, boxdiv);

  return false;
}

/////////////////////////////////////////////////////////////
//  Name: disPlayerNm(playerId, lnBrk)
//////////////////////////////////////////////////////
function disPlayerNm(playerId, lnBrk) {
  var llplayer;
  var lsplayernm;
  
  llplayer = parseInt(playerId);
  //lsplayernm = playerInfo[llplayer][0];

  //window.document.writeln('<a href="players/player_info.html?playerid=' + llplayer);
  //window.document.writeln('" onClick="return show_hide_box(this,475,315,' + "''" + ')">');
  //window.document.writeln(lsplayernm + '</a>');
  
  // 2008-11-15 - Removed the link to display stats
  //window.document.writeln('<a href="Javascript:disPlayerStats(');
  //window.document.writeln("'" + llplayer + "')");
  //window.document.writeln('">' + lsplayernm + '</a>');
  lsplayernm = playerInfo[llplayer];
  window.document.writeln(lsplayernm);
  
  if (lnBrk == 'Y') {
    window.document.writeln('<br>');
  }		   
}

/////////////////////////////////////////////////////////////
//  Name: disPlayerStats(playerId)
//////////////////////////////////////////////////////
function disPlayerStats(playerId) {
  // IE Does Not Like a Space in the Title
  var lsTitle = 'Player';
  if(vwWin != null) {
    vwWin.close();
  }
   
  selURL = "player_info.html?playerid=" + playerId;
 
  vwWin=window.open(selURL, lsTitle,'status=yes,scrollbars=yes,location=no,resizable=yes,width=550,height=350');
  vwWin.opener = self;
}

/////////////////////////////////////////////////////////////
//  Name: disHighlights()
//////////////////////////////////////////////////////
function disHighlights(dirName) {
  if(vwWin != null) {
    vwWin.close();
  }

  selURL = "highlightshow.html?picdir=" + dirName + "&picture=1"; 
  vwWin=window.open(selURL,'Highlights','status=yes,scrollbars=yes,location=no,resizable=yes,width=550,height=450');
  vwWin.opener = self;
}

/////////////////////////////////////////////////////////////
//  Name: disEventInfo(picGrp, picSz, fnSz)
//////////////////////////////////////////////////////
function disEventInfo(picGrp, picSz, fnSz) {
  var llpicGrp;
  
  llpicGrp = parseInt(picGrp);
  window.document.writeln('<table border="0" width="100%" cellpadding="0" cellspacing="0">');
  // Size parameter 0=no picture, 1=full 2=half 4=quarter(default)
  if (picSz == '1' || picSz == '2' || picSz == '4') {
    window.document.writeln('<tr><td align=center>');
  	window.document.writeln('<img src="pictures/' + picDir[llpicGrp] + '/' + picPre[llpicGrp] + '1.jpg" border="0" hspace="3" vspace="3" ');
	if (picSz == '1') {
      window.document.writeln('height="300" width="400">');
	} else if (picSz == '2') {
  	  window.document.writeln('height="150" width="200">');  
  	} else {
  	  window.document.writeln('height="75" width="100">');
  	}
  	window.document.writeln('</td></tr>');
  }
  window.document.writeln('<tr><td align=center class='+fnSz+'>'+picDesc[llpicGrp]+'</td></tr>');
  window.document.writeln('<tr><td align=center class='+fnSz+'>'+picDate[llpicGrp]+'</td></tr>');
  window.document.writeln('<tr><td align=center class='+fnSz+'>');
  window.document.writeln('<a href="Javascript:disHighlights(');
  window.document.writeln("'" + llpicGrp + "')");
  window.document.writeln('"><u>View pictures</u></a>');
  window.document.writeln('</td></tr></table>');
}

//////////////////////////////////////////////////////
//  Name: rtnGameScore()
//////////////////////////////////////////////////////
function rtnGameScore(game){      
  var lsHtml ="";
  lsHtml = '<TABLE border=0 align=center width="100%" cellpadding="0" cellspacing="0">';
  window.document.writeln(lsHtml);
  lsHtml = '<tr><td colspan=2 align=middle class=td-hdr-2 width="90%">';
  window.document.writeln(lsHtml);
  lsHtml = '<u>' + GmDate[game] + '</u></td><td align=right class=td-1 width=10% rowspan=3>&nbsp;</td></tr>';
  window.document.writeln(lsHtml);
  lsHtml = '<tr><td align=left class=td-1 width="80%">';
  window.document.writeln(lsHtml);
  lsHtml = GmTeam1[game] + '</td><td align=right class=td-1 width="10%">' + GmScore1[game] + '</td></tr>';
  window.document.writeln(lsHtml);
  lsHtml = '<tr><td align=left class=td-1 width="80%">';
  window.document.writeln(lsHtml);
  lsHtml = GmTeam2[game] + '</td><td align=right class=td-1 width="10%">' + GmScore2[game] + '</td></tr>';
  window.document.writeln(lsHtml);  
  lsHtml = '</TABLE>';
  window.document.writeln(lsHtml);
  }
  
  //////////////////////////////////////////////////////
//  Name: rtnGameTally()
//////////////////////////////////////////////////////
function rtnGameTally(game){      
  var lsHtml ="";
  lsHtml = '<Table width="100%" border=0 cellpadding=0 cellspacing=0>';
  window.document.writeln(lsHtml);
  lsHtml = '<tr><td Colspan=4 align=left class=td-hdr-1><b><u>Game Tally:</u></b></td></tr>';
  window.document.writeln(lsHtml);
  lsHtml = '<tr><td align=right class=td width="5%"></td><td align=left class=td width="30%">';
  window.document.writeln(lsHtml);
  lsHtml = GmTeam1[game] + '</td><td align=right class=td width="5%">' + GmScore1[game] + '</td><td class=td width="55%">&nbsp;</td></tr>';
  window.document.writeln(lsHtml);
  lsHtml = '<tr><td align=right class=td width="5%"></td><td align=left class=td width="30%">';
  window.document.writeln(lsHtml);
  lsHtml = GmTeam2[game] + '</td><td align=right class=td width="5%">' + GmScore2[game] + '</td><td class=td width="55%">&nbsp;</td></tr>';
  window.document.writeln(lsHtml);  
  lsHtml = '</table>';
  window.document.writeln(lsHtml);
  }

