// ___________________________________________________________________________
//
// Name:        lnllconfig.js 
//
// Author:      Tim Schramer - bifftoe@yahoo.com
//
// Description: Common settings for Laguna Niguel Little League Website.
//              Included in web pages to standardize common values. 
//
// Usage:       This file is auto-generated off-line from the "lnllconfig.ini"
//              settings file and sent to the website by the "LNLLConfig"
//              program. Variables below may be edited directly and this file 
//              transferred to the website manually if bypassing the automatic
//              update method.
//
//              To insert one of the preset values into a webpage,
//              first insert the line:
//
//  <SCRIPT LANGUAGE="JavaScript" SRC="./lnllconfig.js"></SCRIPT> 
//
//              within the <HEAD></HEAD> section near the top of the page.
//              Then add lines to refer to the variables below with the
//              following syntax (example Year):
//
//  <SCRIPT LANGUAGE="JavaScript">document.writeln(lnllconfig.Year);</SCRIPT>
//
//              Some variable are arrays and need looping to access values.
//              (example, for each Division print all the Team Managers): 
//
//  <SCRIPT LANGUAGE="JavaScript">
//    for (var i=0; i<lnllconfig.Divisions.length; i++) {
//      document.writeln(lnllconfig.Divisions[i].Name);
//      document.writeln(lnllconfig.Divisions[i].Commissioner);
//      for (var j=0; j<lnllconfig.Divisions[i].Teams.length; j++) {
//        document.writeln(lnllconfig.Divisions[i].Teams[j].Manager);
//      }
//    }
//  </SCRIPT>
//
// ___________________________________________________________________________

var lnllconfig;
var uDivision="",uTeam="",uLeague="",uDate1="",uDate2="",uOther="";

if(lnllconfig==null) lnllconfig = new makeAdmin();
getURLParameters();

// Make a top-level object with all site information.
// ___________________________________________________________________________
function makeAdmin() {
  var BoardMembers=new Array();
  var Divisions=new Array();
  var Sponsors=new Array();
  var nb=0,nd=0,ns=0;

//(The code above this line may be overwritten by the contents of a file named "C:\lnlladmin\LNLLConfig.js1".)
//............(End Section 1)
  this.Year=             '2010';
  this.Address1=         'P.O. Box 6985';
  this.Address2=         'Laguna Niguel, CA 92607';
  this.Phone=            '';
  this.Website=          'www.lnll.org';
  this.Email=            'webmaster@lnll.org';
  this.Sponsorname=      'GotData.com';
  this.Sponsorlink=      'www.gotdata.com';
  this.Openingday=       '20100201';
  this.Allowinterleague= 'No';

  BoardMembers[nb++]=new makeBoardMember('President',
                                         'Mark Williams',
                                         'markwilliams4@hotmail.com');

  BoardMembers[nb++]=new makeBoardMember('Vice President',
                                         'Greg Fisher',
                                         'grjf@cox.net');

  BoardMembers[nb++]=new makeBoardMember('Vice President',
                                         'Ira Herman',
                                         'irahermann@aol.com');

  BoardMembers[nb++]=new makeBoardMember('Treasurer',
                                         'Bernhard Wagener',
                                         'wagener@cox.net');

  BoardMembers[nb++]=new makeBoardMember('Secretary',
                                         'Robin Martindale',
                                         'rmartindale@pbmlawyer.com');

  BoardMembers[nb++]=new makeBoardMember('Player Agent',
                                         'Bob Riska',
                                         'rriiska@yahoo.com');

  BoardMembers[nb++]=new makeBoardMember('League Information Officer',
                                         'Chris Osman',
                                         'Chris_Osman@hotmail.com');

  BoardMembers[nb++]=new makeBoardMember('City Liaison',
                                         'Paul Van Hoomissen',
                                         'pvanhoomissen@jdtplaw.com');

  BoardMembers[nb++]=new makeBoardMember('Operations Director - Equipment and Uniforms',
                                         'Bob Fulton|Ron Hoopes',
                                         'crfulton1@cox.net|ron@1cd.com');

  BoardMembers[nb++]=new makeBoardMember('Special Events Coordinator',
                                         'Stacey Healey',
                                         'staceyhealey@cox.net');

  BoardMembers[nb++]=new makeBoardMember('Sponsorship Director',
                                         'Eric Anderson',
                                         'eanderson@mfs.com');

  BoardMembers[nb++]=new makeBoardMember('Operations Director - Safety/Fields',
                                         'Eica Hoopes',
                                         'ericahoopes@cox.net');

  BoardMembers[nb++]=new makeBoardMember('Chief Umpire',
                                         'Sam DeBaca',
                                         'sdebaca@cox.net');

  BoardMembers[nb++]=new makeBoardMember('Snack Bar Director',
                                         'Shauna Atchity',
                                         'atchtiyoc@yahoo.com');

  BoardMembers[nb++]=new makeBoardMember('Seniors & Juniors Commissioner',
                                         'Todd Gallina',
                                         'gallina@gmail.com');

  BoardMembers[nb++]=new makeBoardMember('Majors Commissioner',
                                         'Bill Quinley',
                                         'xtremequinley@cox.net');

  BoardMembers[nb++]=new makeBoardMember('AAA Commissioner',
                                         'Dave Alldredge',
                                         'dalldredge@cox.net');

  BoardMembers[nb++]=new makeBoardMember('AA Commissioner',
                                         'Rich McKeown',
                                         'apinc@mac.com');

  BoardMembers[nb++]=new makeBoardMember('A Commissioner',
                                         'Bill Stairs',
                                         'wcstairs@aol.com');

  BoardMembers[nb++]=new makeBoardMember('Coach Pitch Commissioner',
                                         'Josh Bateson',
                                         'jjbbateson@yahoo.com');

  BoardMembers[nb++]=new makeBoardMember('T-Ball Commissioner',
                                         'Jon Clark',
                                         'jhclark@cox.net');


  Sponsors[ns++]=new makeSponsor('Gold',
                                 'Juniors',
                                 'Pirates',
                                 'Ira Herman',
                                 unescape('Northwestern%20Mutual%20Financial%20Network'),
                                 '800-414-7516',
                                 'www.irahermann.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Gold',
                                 'AAA',
                                 'Pirates',
                                 'Rich McKeown',
                                 unescape('American%20Plumbing'),
                                 '(949) 499-2401',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Gold',
                                 '',
                                 '',
                                 '',
                                 unescape('Baseball%20Performance%20Academy'),
                                 '(949) 276-8011',
                                 'www.bpaoc.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Gold',
                                 '',
                                 '',
                                 '',
                                 unescape('Cox%20Communications'),
                                 '(949) 546-2501',
                                 'http://ww2.cox.com/residential/orangecounty/home.cox',
                                 '');

  Sponsors[ns++]=new makeSponsor('Gold',
                                 '',
                                 '',
                                 '',
                                 unescape('FRANK%20J%2E%20MOGAVERO%20DDS%20MS'),
                                 '(949) 493-7300',
                                 'www.syncyoursmile.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Gold',
                                 '',
                                 '',
                                 '',
                                 unescape('Newport%20Lexus'),
                                 '(949) 276-8011',
                                 'www.newportlexus.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Gold',
                                 '',
                                 '',
                                 '',
                                 unescape('WIZARD%20SPORTS%20EQUIPMENT'),
                                 '(714) 637-7751',
                                 'www.wizardsports.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Gold',
                                 'Juniors',
                                 'Athletics',
                                 'Go Athletics!',
                                 unescape(''),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Gold',
                                 'Seniors',
                                 'Laguna Niguel',
                                 'Go Laguna Niguel!',
                                 unescape(''),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Gold',
                                 '',
                                 '',
                                 '',
                                 unescape('American%20Plumbing'),
                                 '(949) 499-2401',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Gold',
                                 'T-Ball',
                                 'Red Sox',
                                 '',
                                 unescape('Go%20Red%20Sox%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'T-Ball',
                                 'Dodgers',
                                 'NY Upper Crust Pizza',
                                 unescape('Marina%20Hills'),
                                 '(949) 249-9700',
                                 'www.nyuppercrustpizza.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'T-Ball',
                                 'Yankees',
                                 'Go Yankees!',
                                 unescape(''),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'T-Ball',
                                 'Athletics',
                                 'Casey ODell',
                                 unescape('Sharp%20Electronics'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'T-Ball',
                                 'Angels',
                                 '',
                                 unescape('Go%20Angels%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'T-Ball',
                                 'Phillies',
                                 '',
                                 unescape('Go%20Phillies%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'A',
                                 'Phillies',
                                 '',
                                 unescape('Ball%20Park%20Pizza'),
                                 '(949) 249-2778',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'A',
                                 'Diamondbacks',
                                 'Jeff Sterner',
                                 unescape('The%20Capital%20Group%20Companies'),
                                 '',
                                 'www.capgroup.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'B',
                                 'Giants',
                                 'We Root for the A Ball Giants!',
                                 unescape('Performance%20Roofing%20Company'),
                                 '949-645-2382',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'A',
                                 'Yankees',
                                 'Saccullo Family',
                                 unescape('GO%20A%20YANKEES%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'A',
                                 'Cubs',
                                 'Trafalgar insurance',
                                 unescape(''),
                                 '(800) 221-3884',
                                 'www.trafalgarinsurance.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'A',
                                 'Dodgers',
                                 'Go Dodgers!',
                                 unescape(''),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'A',
                                 'Padres',
                                 'Go Padres!',
                                 unescape(''),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'A',
                                 'Angels',
                                 'PrintWorks',
                                 unescape('Go%20A%20Angels%21%21'),
                                 '(949) 753-8877',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AA',
                                 'Red Sox',
                                 'Allen Moznett',
                                 unescape('Newport%20Lexus'),
                                 '(949) 276-8011',
                                 'www.newportlexus.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AA',
                                 'Cubs',
                                 'Joe Philbin',
                                 unescape('SUKUT%20CONSTRUCTION'),
                                 '(888) 785-8801',
                                 'www.sukut.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AA',
                                 'Cardinals',
                                 'Rick Costa',
                                 unescape('Sepulivda%20Building%20Materials'),
                                 '(949) 347-2100',
                                 'www.sepulveda.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AA',
                                 'Athletics',
                                 'Dan Dreyer',
                                 unescape('Cycle%20City%20MotorSports'),
                                 '(949) 770-6554',
                                 'www.cyclecitymotorsports.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AA',
                                 'Giants',
                                 'Ball Park Pizza',
                                 unescape('%33%30%31%32%30%20Town%20Center%20Drive%20Laguna%20Niguel'),
                                 '(949) 249-2778',
                                 'www.eatballparkpizza.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AA',
                                 'Yankees',
                                 'Oggis Pizza',
                                 unescape('%31%32%34%35%20Puerta%20Del%20Sol%20San%20Clemente'),
                                 '(949) 218-3961',
                                 'www.oggis.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AA',
                                 'Dodgers',
                                 'Go Dodgers!',
                                 unescape(''),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AA',
                                 'Athletics',
                                 'Jason Malecka',
                                 unescape('Go%20AA%20Athletics%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Athletics',
                                 'John Ratliff',
                                 unescape('Cypress%20Funding'),
                                 '(800) 506-0602',
                                 'www.cypressfunding.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Orioles',
                                 'Marcel Barnhoorn',
                                 unescape('Barnhoorn%20Automotive'),
                                 '(949) 497-3637',
                                 'www.ocautosites.com/Barnhoorn/',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Reds',
                                 'Mark Miller',
                                 unescape('GO%20AAA%20Reds%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Phillies',
                                 'Ned Nakasuka',
                                 unescape('Aliso%20Woods%20Dental'),
                                 '(949) 360-1213',
                                 'www.alisowoodsdental.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Tigers',
                                 'Robin Martindale',
                                 unescape('PCM%20Law'),
                                 '',
                                 'www.pcminternet.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Tigers',
                                 'Swanson Family',
                                 unescape('Tigers%20Always%20Strive%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Twins',
                                 'Weissenberger Family',
                                 unescape('Go%20AAA%20TWINS%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Athletics',
                                 'John Ratliff',
                                 unescape('Cypress%20Funding'),
                                 '(800) 506-0602',
                                 'www.cypressfunding.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Royals',
                                 'Laurie Bruyntjens',
                                 unescape('Coast%20Motorsports'),
                                 '(949) 342-1130',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Athletics',
                                 'The Donsbach Family',
                                 unescape('AAA%20Athletics%20%20%2D%20We%27re%20Earning%20Our%20Stripes%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Pirates',
                                 'Dan Upton',
                                 unescape('Nations%20Direct%20Mortgage'),
                                 '(949) 270-7900',
                                 'www.brokerfha.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'AAA',
                                 'Athletics',
                                 'Van Hoomissen Family',
                                 unescape('Professional%20Community%20Management%20Go%20AAA%20A%27s%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Coach Pitch',
                                 'Angels',
                                 'CalNational Bank',
                                 unescape('CalNational%20Bank%20now%20part%20of%20U%2ES%2E%20Bank'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Coach Pitch',
                                 'Dodgers',
                                 'Pete Olvera-Harle',
                                 unescape('Go%20Dodgers%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Coach Pitch',
                                 'Cubs',
                                 '',
                                 unescape('Go%20Cubs%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Coach Pitch',
                                 'Padres',
                                 'Jeff Cadieux',
                                 unescape('JLC%20Associates%2C%20Inc%2E%20Proud%20Supporter%20of%20Coach%20Pitch%20Padres%21%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Coach Pitch',
                                 'Phillies',
                                 '',
                                 unescape('Go%20Phillies%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Coach Pitch',
                                 'Padres',
                                 '',
                                 unescape('Go%20Padres%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Coach Pitch',
                                 'Yankees',
                                 '',
                                 unescape('Go%20Yankees%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Coach Pitch',
                                 'Giants',
                                 '',
                                 unescape('Go%20Giants%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Juniors',
                                 'Indians',
                                 'Louchinos Family',
                                 unescape('GO%20INDIANS'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Juniors',
                                 'Mets',
                                 '',
                                 unescape('HP'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Juniors',
                                 'Pirates',
                                 'Gregory Diem',
                                 unescape('Go%20Pirates%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Juniors',
                                 'Angels',
                                 'Mark Williams',
                                 unescape('Landmark%20Lending'),
                                 '(949) 456-9577',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Majors',
                                 'Red Sox',
                                 'Hassan Kany',
                                 unescape('Action%20Carpet%20%26%20Floor%20Décor'),
                                 '(760) 726-9777',
                                 'www.floordecor.org',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Majors',
                                 'Mets',
                                 '',
                                 unescape('Hi%2DTech%20Collision'),
                                 '',
                                 'www.hitechcollision.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Majors',
                                 'Yankees',
                                 'Mike Gault',
                                 unescape('South%20Orange%20County%20Cardiology%20Group'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Majors',
                                 'Dodgers',
                                 'The Swanson Family',
                                 unescape('We%20Bleed%20Majors%20Dodger%20Blue%21%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Majors',
                                 'Yankees',
                                 'Tom Clements',
                                 unescape('GO%20YANKEE%20NATION%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Majors',
                                 'Cardnals',
                                 'Patrick OBrien',
                                 unescape('OBRIEN%20Technical%20Services'),
                                 '(949) 204-6045',
                                 'www.obtechservices.com',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Majors',
                                 'Mets',
                                 'Vince Arico',
                                 unescape('Go%20Mets%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Majors',
                                 'Giants',
                                 '',
                                 unescape('Go%20Giants%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Majors',
                                 'Phillies',
                                 '',
                                 unescape('Go%20Phillies%21'),
                                 '',
                                 '',
                                 '');

  Sponsors[ns++]=new makeSponsor('Silver',
                                 'Majors',
                                 'White Sox',
                                 'Linda Conti',
                                 unescape('Cox%20Media%20Go%20White%20Sox%21'),
                                 '',
                                 '',
                                 '');


  Divisions[nd++]=new makeDivision('Seniors',
                                   'Todd Gallina',
                                   'gallina@gmail.com',
                                   '20110509',
                                   unescape('Prepare%20your%20player%20for%20the%20next%20level%20with%20the%20LNLL%20Seniors%20Division%2E%20District%20%35%35%20invited%20LNLL%20to%20join%20Seniors%20due%20to%20the%20quality%20of%20our%20program%2C%20the%20number%20of%20players%20in%20our%20league%2C%20and%20the%20competitiveness%20of%20LNLL%20teams%2E%20LNLL%20Seniors%20will%20play%20teams%20from%20other%20District%20%35%35%20Leagues%2E%20Seniors%20is%20OPEN%20to%20all%20League%20Age%20%31%35%20and%20%31%36%20year%20olds%20that%20live%20with%20in%20the%20LNLL%20approved%20borders%2E%20Players%20that%20have%20been%20grandfathered%20in%20to%20LNLL%20due%20to%20relocation%20are%20also%20welcome%2E%20Seniors%20Division%20is%20a%20great%20opportunity%20to%20challenge%20players%20to%20experience%20the%20next%20level%20of%20baseball%20as%20a%20member%20of%20LNLL%2E%20From%20field%20dimension%20size%2C%20to%20competing%20against%20players%20from%20other%20leagues%2C%20while%20working%20with%20some%20of%20the%20most%20committed%20managers%20and%20coaches%2E'),
                                   '15 & 16 year olds',
                                   '-GtTs-');

  Divisions[nd++]=new makeDivision('Juniors',
                                   'Todd Gallina',
                                   'gallina@gmail.com',
                                   '20110509',
                                   unescape('PPrepare%20your%20player%20for%20the%20next%20level%20with%20the%20LNLL%20Juniors%20Division%2E%20LNLL%20Juniors%20offers%20a%20quality%2C%20competitive%20program%20for%20%31%33%20and%20%31%34%20year%20olds%20with%20LNLL%20having%20the%20most%20number%20of%20Juniors%20teams%20and%20players%20in%20District%20%35%35%2E%20Junior%20tryouts%20are%20OPEN%20to%20all%20League%20Age%20%31%33%20and%20%31%34%20year%20olds%20that%20live%20with%20in%20the%20LNLL%20approved%20borders%2E%20Players%20that%20have%20been%20grandfathered%20in%20to%20LNLL%20due%20to%20relocation%20are%20also%20welcome%2E%20Juniors%20Division%20is%20a%20great%20opportunity%20to%20challenge%20players%20to%20experience%20the%20next%20level%20of%20baseball%20as%20a%20member%20of%20LNLL%2E%20All%20Juniors%20teams%20will%20compete%20in%20the%20District%20%35%35%20TOC%20Tournament%20in%20June%20against%20all%20other%20leagues%20within%20District%20%35%35%2E%20%20From%20field%20dimension%20size%2C%20to%20competing%20against%20players%20from%20other%20leagues%2C%20while%20working%20with%20some%20of%20the%20most%20committed%20managers%20and%20coaches%2C%20LNLL%20Juniors%20program%20has%20a%20lot%20to%20offer%20your%20player%2E'),
                                   '13 & 14 year olds',
                                   '-GtTs-');

  Divisions[nd++]=new makeDivision('Majors',
                                   'Bill Quinley',
                                   'xtremequinley@cox.net',
                                   '20110502',
                                   unescape('The%20Major%20League%20is%20the%20top%20of%20the%20heap%20in%20Little%20League%20Baseball%2E%20%20In%20the%20Majors%2C%20players%20ages%20%31%31%20%26%20%31%32%20try%20out%20and%20are%20evaluated%20and%20drafted%20according%20to%20the%20Official%20Rules%20of%20Little%20League%20Baseball%20of%20Williamsport%2C%20PA%2E%20%20At%20the%20Major%20league%20level%20the%20focus%20is%20on%20mastering%20the%20fundamentals%20of%20the%20game%2C%20as%20well%20as%20developing%20advanced%20skills%20and%20strategies%20of%20the%20game%20in%20a%20competitive%20environment%20and%20to%20prepare%20players%20to%20move%20on%20to%20the%20next%20level%20of%20play%20including%20Little%20League%27s%20own%20Junior%20Division%2E'),
                                   '11 & 12 year olds',
                                   '-QtBs-');

  Divisions[nd++]=new makeDivision('AAA',
                                   'Dave Alldredge',
                                   'dalldredge@cox.net',
                                   '20110502',
                                   unescape('The%20Triple%2DA%20division%20serves%20as%20the%20final%20%22minor%20league%22%20division%20for%20the%20next%20step%20into%20Majors%2E%20%20The%20Triple%2DA%20level%20is%20designed%20to%20give%20players%20the%20ability%20to%20play%20in%20a%20Major%20League%20atmosphere%20while%20playing%20at%20their%20appropriate%20skill%20level%2E%20The%20Triple%2DA%20focus%20is%20on%20continuing%20the%20development%20of%20the%20fundamentals%20of%20the%20game%20while%20introducing%20game%20strategy%20and%20competition%20to%20the%20game%2E'),
                                   '9 - 12 year olds',
                                   '-AtDs-');

  Divisions[nd++]=new makeDivision('AA',
                                   'Rich McKeown',
                                   'apinc@mac.com',
                                   '20100502',
                                   unescape('At%20the%20Double%2DA%20level%2C%20the%20rules%20are%20basically%20the%20same%20as%20Single%2DA%2C%20with%20one%20notable%20difference%2C%20player%20pitching%20is%20introduced%20into%20the%20game%2E%20%20This%20gives%20both%20the%20batters%20and%20the%20pitchers%20the%20first%20real%20opportunity%20to%20learn%20how%20to%20play%20the%20game%20in%20a%20competitive%20environment%2E%20%20At%20this%20level%2C%20the%20focus%20is%20on%20the%20continuation%20of%20learning%20the%20fundamentals%20of%20the%20game%2C%20including%20offensive%20and%20defensive%20positioning%2E'),
                                   '8 - 11 year olds',
                                   '-MtRs-');

  Divisions[nd++]=new makeDivision('A',
                                   'Bill Stairs',
                                   'wcstairs@aol.com',
                                   '20110521',
                                   unescape('The%20Single%2DA%20division%20takes%20players%20that%20have%20graduated%20from%20the%20Coach%2DPitch%20level%20and%20puts%20them%20on%20the%20playing%20field%20against%20the%20pitching%20machine%2E%20Single%2DA%20serves%20as%20an%20introduction%20into%20competitive%20baseball%2E%20%20The%20Single%2DA%20level%20is%20designed%20to%20give%20players%20the%20skills%20required%20to%20be%20prepared%20to%20play%20in%20a%20player%2Dpitch%20level%2C%20while%20developing%20a%20introductory%20level%20of%20strategy%2E'),
                                   '7 - 9 year olds',
                                   '-StBs-');

  Divisions[nd++]=new makeDivision('Coach Pitch',
                                   'Josh Bateson',
                                   'jjbbateson@yahoo.com',
                                   '20110606',
                                   unescape('The%20Coach%2DPitch%20division%20is%20a%20step%20up%20from%20the%20T%2DBall%20level%20of%20play%2E%20It%20introduces%20players%20to%20actual%20pitching%2E%20%20There%20are%20major%20differences%20at%20this%20level%20that%20separates%20it%20from%20T%2DBall%2E%20%20Essentially%2C%20the%20game%20is%20played%20with%20regulation%20rules%20with%20a%20couple%20of%20notable%20differences%2E%20Instead%20of%20players%20pitching%2C%20coaches%20pitch%2E%20This%20gives%20children%20the%20opportunity%20to%20learn%20to%20hit%20a%20pitched%20ball%20without%20fear%20of%20being%20hit%2E%20%20Balls%20and%20strikes%20are%20not%20called%2C%20however%20a%20player%20may%20strike%20out%20swinging%2E%20%20The%20focus%20of%20Coach%2DPitch%20is%20to%20learn%20the%20fundamentals%20of%20the%20game%20in%20a%20format%20that%20stresses%20learning%20the%20physical%20skills%20necessary%20to%20advance%20to%20the%20next%20level%20of%20play%2C%20Single%2DA%2E'),
                                   '6 - 7 year olds',
                                   '-BtJs-');

  Divisions[nd++]=new makeDivision('T-Ball',
                                   'Jon Clark',
                                   'jhclark@cox.net',
                                   '20110606',
                                   unescape('T%2DBall%20is%20the%20entry%20level%20to%20the%20game%20of%20baseball%20and%20softball%20for%20young%20players%2C%20usually%20five%20to%20seven%20years%20old%2E%20%20Members%20of%20two%20teams%20take%20turns%20hitting%20a%20ball%20off%20a%20batting%20tee%20set%20on%20home%20plate%2E%20%20Batters%20try%20to%20get%20on%20base%20and%20advance%20to%20home%2E%20Fielders%20try%20to%20prevent%20that%20from%20happening%2E%20%20The%20elimination%20of%20pitching%20allows%20children%20to%20participate%20without%20the%20fear%20of%20being%20hit%20by%20a%20pitched%20ball%2E%20Tee%20ball%20develops%20the%20primary%20baseball%20skills%20of%20hitting%2C%20running%2C%20fielding%20and%20throwing%2E%20%20The%20players%20gain%20an%20understanding%20of%20the%20fundamental%20rules%20of%20baseball%2C%20and%20since%20score%20is%20not%20kept%2C%20there%20are%20no%20losers%20in%20T%2DBall%2C%20only%20winners%21'),
                                   '5 - 6 year olds',
                                   '-CtJs-');

//............(End Section INI)
//(The code below this line may be overwritten by the contents of a file named "C:\lnlladmin\LNLLConfig.js2".)
  this.BoardMembers=BoardMembers;
  this.Divisions=Divisions;
  this.Sponsors=Sponsors;
  return this;
}

// Make a Board Member object.
// ___________________________________________________________________________
function makeBoardMember(Title,Name,Email) {

  this.Title=Title;
  this.Name=Name;
  this.Email=Email;
  return this;
}

// Make a Sponsor object.
// ___________________________________________________________________________
function makeSponsor(Level,Division,Team,Contact,Company,Phone,Link,Email) {

  this.Level=Level;
  this.Division=Division;
  this.Team=Team;
  this.Contact=Contact;
  this.Company=Company;
  this.Phone=Phone;
  this.Link=Link;
  this.Email=Email;
  return this;
}

// Make a Division object and add Division Teams.
// ___________________________________________________________________________
function makeDivision(Name,Commissioner,Email,Lastregularday,Comments,Ages,Version) {
  var Checkteam=null;
  var Checkname=Name;
  var Teams=new Array();
  var nt=0;

  this.Name=Name;
  this.Commissioner=Commissioner;
  this.Email=Email;
  this.Lastregularday=Lastregularday;
  this.Comments=Comments;
  this.Ages=Ages;
  this.Version=Version;

//(The code above this line may be overwritten by the contents of a file named "C:\lnlladmin\LNLLConfig.js2".)
//............(End Section 2)
  Checkteam=new addTeam(Checkname,
                       'Seniors',
                       'All',
                       'Laguna Niguel',
                       'Ken Vause',
                       '1smrtazz@cox.net',
                       '');
  if(Checkteam.Key!='') Teams[nt++]=Checkteam;

//............(End Section INI)
//(The code below this line may be overwritten by the contents of a file named "C:\lnlladmin\LNLLConfig.js3".)
  this.Teams=Teams;
  return this;
}

// Make a Team object with team related information.
// ___________________________________________________________________________
function addTeam(Checkname,Division,League,Name,Manager,Email,Link) {
  var nt=0;

// Define team only for the division passed in.
  if(Checkname != Division) {
    this.Key='';
    return this;
  }

  this.Key=1;
  this.Division=Division;
  this.League=League;
  this.Name=Name;
  this.Manager=Manager;
  this.Email=Email;
  this.Link=Link;

// Record info added later.
  this.Won=0;
  this.Loss=0;
  this.Tie=0;
  this.Total=0;
  this.Pct=0;
  this.GB=0;
  this.Steak='-';
  this.Overall='0-0';
  return this;
}

// Return set of teams given Divsion and optional League.
// ___________________________________________________________________________
function getTeams(Division,League) {
  var nt=0;
  var Teams=new Array();

// Gather teams.
  for (var i=0; i<lnllconfig.Divisions.length; i++) {
    if(lnllconfig.Divisions[i].Name==Division) {
      for (var j=0; j<lnllconfig.Divisions[i].Teams.length; j++) {
        if(League=='' || lnllconfig.Divisions[i].Teams[j].League==League) {
          Teams[nt++]=lnllconfig.Divisions[i].Teams[j];
        }
      }
      break;
    }
  }

  return Teams;
}

// Get Sponsors for this division sorted by Team.
// ___________________________________________________________________________
function getSponsors(Level,Division,Team) {
  var Sponsors=new Array();
  var ns=0;

// Look through all Sponsors and grab those in matching input criteria.
  for(var i=0; i<lnllconfig.Sponsors.length; i++) {

// Level specified
    if(Level && Level.length>0) {
      if(lnllconfig.Sponsors[i].Level==Level) {
// Level and Division specified
        if(Division && Division.length>0) {
          if(lnllconfig.Sponsors[i].Division==Division) {
// Level, Division and Team specified
            if(Team && Team.length>0) {
              if(lnllconfig.Sponsors[i].Team==Team)
                Sponsors[ns++]=lnllconfig.Sponsors[i];
            }
            else Sponsors[ns++]=lnllconfig.Sponsors[i];
          }
        }
// Level and Team specified
        else if(Team && Team.length>0) {
          if(lnllconfig.Sponsors[i].Team==Team)
            Sponsors[ns++]=lnllconfig.Sponsors[i];
        }
        else Sponsors[ns++]=lnllconfig.Sponsors[i];
      }
    }
// Division specified
    else if(Division && Division.length>0) {
      if(lnllconfig.Sponsors[i].Division==Division) {
// Division and Team specified
        if(Team && Team.length>0) {
          if(lnllconfig.Sponsors[i].Team==Team)
            Sponsors[ns++]=lnllconfig.Sponsors[i];
        }
        else Sponsors[ns++]=lnllconfig.Sponsors[i];
      }
    }
// Team specified
    else if(Team && Team.length>0) {
      if(lnllconfig.Sponsors[i].Team==Team)
        Sponsors[ns++]=lnllconfig.Sponsors[i];
    }
// Nothing specified, gather all sponsors
    else Sponsors[ns++]=lnllconfig.Sponsors[i];
  }

// Sort Sponsors by Level if specified otherwise Team. 
  if(Level && Level.length>0)
    Sponsors.sort(sortByContact);
  else
    Sponsors.sort(sortByTeam);

  this.Sponsors=Sponsors;
  return this;
}

// Sort routine for Sponsors array. 
// ___________________________________________________________________________
function sortByTeam(a,b) {
  var x = a.Team;
  var y = b.Team;
  return ((x<y) ? -1 : ((x>y) ? 1 : 0));
}

// Sort routine for Sponsors array.
// ___________________________________________________________________________
function sortByContact(a,b) {
  var x = a.Contact;
  var y = b.Contact;
  return ((x<y) ? -1 : ((x>y) ? 1 : 0));
}

// Parse current URL to get parameters
// ___________________________________________________________________________
function getURLParameters()
{
  var url_string = "";
  var val_string1 = "";
  var val_string2 = "";

  url_string = window.location.toString();
  if(url_string.indexOf('?') == -1) return;

  val_string1=url_string.substring(url_string.indexOf('?')+1);
  val_string2=val_string1;
  if(val_string2.indexOf('#')>0) val_string2=val_string1.substring(0,val_string1.indexOf('#'));

  uDivision=unescape(pairValue(val_string2,'division'));
  uTeam=unescape(pairValue(val_string2,'team'));
  uLeague=unescape(pairValue(val_string2,'league'));
  uDate1=unescape(pairValue(val_string2,'date1'));
  uDate2=unescape(pairValue(val_string2,'date2'));
  uOther=unescape(pairValue(val_string2,'other'));
}

// Given Name=Value pairs in ampersand delimited string, get Value give Name.
// ___________________________________________________________________________
function pairValue(instring,param)
{
  var begin,end;

  if(instring.length>1) {
    if(instring.indexOf(param)==-1) return'';
    begin=instring.indexOf(param) + param.length+1;
    end=instring.indexOf('&',begin);
    if(end==(-1)) end=instring.length;
    return(instring.substring(begin,end));
  }
  else return('');
}

// Return current day in YYYYMMDD format.
// ___________________________________________________________________________
function getDay() {
  var today=new Date();
  var mathday=0;
  var mathmonth=0;
  var mathyear=0;
  var calday='';
  var calmonth='';
  var calyear='';
  mathday=today.getDate();
  calday=mathday.toString();
  if(mathday < 10) calday='0' + calday;
  mathmonth=(today.getMonth()+1);
  calmonth=mathmonth.toString();
  if(mathmonth < 10) calmonth='0' + calmonth;
  mathyear=today.getYear();
  if(mathyear < 1000) mathyear=mathyear + 1900;
  calyear=mathyear.toString();
  return calyear+calmonth+calday;
}

// Return current month in YYYYMM format.
// ___________________________________________________________________________
function getMonth() {
  var today=new Date();
  var mathmonth=0;
  var mathyear=0;
  var calmonth='';
  var calyear='';
  mathmonth=(today.getMonth()+1);
  calmonth=mathmonth.toString();
  if(mathmonth < 10) calmonth='0' + calmonth;
  mathyear=today.getYear();
  if(mathyear < 1000) mathyear=mathyear + 1900;
  calyear=mathyear.toString();
  return calyear+calmonth;
}

// Set defaults on date pulldowns given 2 dates in yyyymm format.
// ___________________________________________________________________________
function setDate(frm_name,date1) {
  var yy=0;
  var mm=0;
  var dd=0;
  var form=document.forms[frm_name]
  if(form) {
    if(date1 !='') {
      if(date1.indexOf('/')==-1 ) {
        yy=date1.substr(0,4);
        mm=date1.substr(4,2);
        if(form.Month1) form.Month1.selectedIndex=mm - 1;
        if(form.Year1)  {
          if(form.Year1.type.indexOf('select') > -1)  {
            form.Year1.selectedIndex=yy - form.Year1.options[0].value;
          }
          else form.Year1.value=yy;
        }
        if(date1.length==8) {
          dd=date1.substr(6,2);
          if(form.Day1)  form.Day1.selectedIndex=dd - 1;
        }
      }
    }
  }
}

// Make sure a selected date is valid.
// ___________________________________________________________________________
function checkValidDate(mm,dd,yy) {
  datevalue=dd + mm + yy;
     
  if(datevalue.length > 0 && datevalue.length < 9) {
    alert('Invalid Date Length');
    return false;
  }
  if((mm=='apr' || mm=='jun' || mm=='sep' || mm=='nov') && dd > 30) {
    alert(mm + ' has only 30 days');
    return false;
  } else {
    if(dd > 31) {
      alert(mm + ' has only 31 days');
      return false;
    }
  }
  if(mm=='feb') {
    if(yy  > 0 && dd > 28) {
      alert('February of ' + yy + ' has only 28 days');
      return false;
    } else {
      if(dd > 29) {
        alert('February of ' + yy + ' has only 29 days');
        return false;
      }
    }
  }
  return true;
}

// Return mm/dd/yyyy format given yyyymmdd format
// ___________________________________________________________________________
function niceDate(day) {
  var yy=0;
  var mm=0;
  var dd=0;
  if(day!='') {
    if(day.indexOf('/')==-1 ) {
      yy=day.substr(0,4);
      mm=day.substr(4,2);
      dd=day.substr(6,2);
      return mm+'/'+dd+'/'+yy;
    }
    else {
      return day;
    }
  }
  return '';
}

// Return integer day of week given YYYYMMDD string.
// ___________________________________________________________________________
function getDOW(datstr) {
  var tmpdate = new Date(niceDate(datstr));
  var intDay = tmpdate.getDay();
  var DayArray = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday',
                           'Thursday', 'Friday', 'Saturday');
  return DayArray[intDay];
}

// Return Monday date given any day this week..
// ___________________________________________________________________________
function getPreviousMonday(datstr) {
  var tmpdate1 = new Date(niceDate(datstr));
  var intDay = tmpdate1.getDay();
  if(intDay==0) intDay=7;
  var delta = intDay - 1;
  var tmpdate2 = new Date(tmpdate1.getTime()-(delta * 86400000));
  var yy = tmpdate2.getYear();
  var mm = tmpdate2.getMonth() + 1;
  var dd = tmpdate2.getDate();

  if(yy<1000) yy+=1900;
  if(mm<10)   mm='0'+mm;
  if(dd<10)   dd='0'+dd;

  return (yy+''+mm+''+dd);
}

// Return YYYYMMDD of last Monday given Saturday
// ___________________________________________________________________________
function mondayDate(datstr) {
  var tmpdate1 = new Date(niceDate(datstr));
  var tmpdate2 = new Date(tmpdate1.getTime()-432000000);
  var yy = tmpdate2.getYear();
  var mm = tmpdate2.getMonth()+1;
  var dd = tmpdate2.getDate();

  if(yy<1000) yy+=1900;
  if(mm<10)   mm='0'+mm;
  if(dd<10)   dd='0'+dd;

  return (yy+''+mm+''+dd);
}

// Return YYYYMMDD of next Saturday given Monday
// ___________________________________________________________________________
function saturdayDate(datstr) {
  var tmpdate1 = new Date(niceDate(datstr));
  var tmpdate2 = new Date(tmpdate1.getTime()+432000000);
  var yy = tmpdate2.getYear();
  var mm = tmpdate2.getMonth()+1;
  var dd = tmpdate2.getDate();

  if(yy<1000) yy+=1900;
  if(mm<10)   mm='0'+mm;
  if(dd<10)   dd='0'+dd;

  return (yy+''+mm+''+dd);
}

// Return YYYYMMDD of date number of weeks from another date.
// ___________________________________________________________________________
function weekDate(datstr,weeksfrom) {
  var tmpdate1 = new Date(niceDate(datstr));
  var tmpdate2 = new Date(tmpdate1.getTime()+(weeksfrom * 604800000));
  var yy = tmpdate2.getYear();
  var mm = tmpdate2.getMonth()+1;
  var dd = tmpdate2.getDate();

  if(yy<1000) yy+=1900;
  if(mm<10)   mm='0'+mm;
  if(dd<10)   dd='0'+dd;

  return (yy+''+mm+''+dd);
}

// Return YYYYMMDD after adding a number of days to it.
// ___________________________________________________________________________
function addDays(datstr,numday) {
  if(numday==0) return datstr;
  var tmpdate1 = new Date(niceDate(datstr));
  var tmpdate2 = new Date(tmpdate1.getTime()+(numday*86400000));
  var yy = tmpdate2.getYear();
  var mm = tmpdate2.getMonth()+1;
  var dd = tmpdate2.getDate();

  if(yy<1000) yy+=1900;
  if(mm<10)   mm='0'+mm;
  if(dd<10)   dd='0'+dd;

  return (yy+''+mm+''+dd);
}

// Days between 2 dates in YYYYMMDD format.
// ___________________________________________________________________________
function diffDate(datstr1,datstr2) {
  var tmpdate1 = new Date(niceDate(datstr1));
  var tmpdate2 = new Date(niceDate(datstr2));
  var timediff = tmpdate1.getTime()-tmpdate2.getTime();

  if(timediff<0) timediff = -timediff;
  var daydiff = timediff/86400000;

  return daydiff;
}

// Return alpha month and day string given YYYYMMDD string.
// ___________________________________________________________________________
function monthDate(datstr) {
  var MonthArray = new Array('Jan', 'Feb', 'Mar',
                             'Apr', 'May', 'June', 'July',
                             'Aug', 'Sep', 'Oct',
                             'Nov', 'Dec');
  var mm=datstr.substr(4,2);
  var dd=datstr.substr(6,2);
  var mc=parseInt(mm,10)-1;

  return MonthArray[mc]+' '+parseInt(dd,10);
}

// lTrim(string) : Returns a copy of a string without leading spaces.
// ___________________________________________________________________________
function lTrim(str) {
   var whitespace = new String(' \t\n\r');
   var s = new String(str);

// We have a string with leading blank(s)...
   if (whitespace.indexOf(s.charAt(0)) != -1) {
     var j=0, i = s.length;

// Iterate from the far left of string until we don't have any more whitespace.
     while (j < i && whitespace.indexOf(s.charAt(j)) != -1) j++;

// Get the substring from the first non-whitespace character to the end of
// the string... 
     s = s.substring(j, i);
   }
   return s;
}

// tTrim(string) : Returns a copy of a string without trailing spaces.
// ___________________________________________________________________________
function tTrim(str) {
// We don't want to trip JUST spaces, but also tabs, line feeds, etc.
// Add anything else you want to trim here in Whitespace
   var whitespace = new String(' \t\n\r');
   var s = new String(str);

// We have a string with trailing blank(s)...
   if (whitespace.indexOf(s.charAt(s.length-1)) != -1) {

// Get length of string
      var i = s.length - 1;

// Iterate from the far right until we don't have any more whitespace.
      while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1) i--;

// Get the substring from the front of the string to where the last
// non-whitespace character is...
      s = s.substring(0, i+1);
   }

   return s;
}

// ltTrim(string) : Returns a copy of a string w/o leading or trailing spaces
// ___________________________________________________________________________
function ltTrim(str) {
   return tTrim(lTrim(str));
}
// stringReverse(string) : Returns a copy of a string with characters reversed
// ___________________________________________________________________________
function stringReverse(str) {
  var s = '';
  var i = str.length;
  while (i>0) {
    s += str.substring(i-1,i);
    i--;
  }
  return s;
}
