var currentLeft = "home_left";
var currentRight = "home";
function loadSection(section)
{
    loadRight(section);
    loadLeft(section + "_left");
}

function loadRight(section)
{
    unloadSection(currentRight);
    var x = new getObj(section);
    x.style.display = 'block';
    currentRight = section;
}

function loadLeft(section)
{
    unloadSection(currentLeft);
    x = new getObj(section);
    x.style.display = 'block';
    currentLeft = section;
}

function unloadSection(section)
{
    var x = new getObj(section);
    x.style.display = 'none';
}

function getObj(name)
{
   if (document.getElementById)
   {
     this.obj = document.getElementById(name);
     this.style = document.getElementById(name).style;
   }
   else if (document.all)
   {
     this.obj = document.all[name];
     this.style = document.all[name].style;
   }
   else if (document.layers)
   {
      this.obj = document.layers[name];
      this.style = document.layers[name];
   }
}
function openUrl(url)
{
    window.open(url);
}
var currentLocation = 0;
function openLocation(number)
{
   if (number != currentLocation)
   {
      if (number == 1)
      {
         this.fm.details.value="Speeds Billiards - 5528 Alpha Rd - Dallas - (972)233-7717\nThis is the premiere Foosball club in Dallas. It boasts the most tables and the biggest payout of the week at the Friday night Tourney. Not the fanciest locations but the staff is very friendly and the drink places are great.";
      }
      else if (number == 2)
      {
         this.fm.details.value="J.J. Dakotas - 9112 Highway 80 - Ft. Worth - (817)244-9000\nThis is the casual foosers heaven. This location boasts 5 tables and has many rookie and beginner players as well as some seasoned veterans. A laid back and casual atmospehere makes for a good time without the cutthroat foosball at most tournaments. There is also occasionally a live band on Saturdays.";
      }
      else if (number == 3)
      {
         this.fm.details.value="Milo Butterfingers - 5645 Yale Blvd - Dallas - (214)368-9212\nA former tournament bar, still a good place to find a game away from the tournament scene on the weekends. Always someone there on Saturday nights. A good mix of college students and 30 somethings, very pleasant atmosphere.";
      }
      else if (number == 4)
      {
         this.fm.details.value="Pugsley's Library - 2443 Walnut Hill - Dallas - (972)243-1111\nA new upscale location in what was formerly a movie theater. Huge building with 8 foosball tables and good music but very pricey drinks.";
      }
      else if (number == 5)
      {
         this.fm.details.value="Clicks Billiards - 9247 Skillman St - Dallas - (214)343-2184\n";
      }
      else if (number == 6)
      {
         this.fm.details.value="Speeds BIlliards - 700 N Watson Rd - Arlington - (817)640-7675\n";
      }
      else if (number == 7)
      {
         this.fm.details.value="Texas Billiards - 6531 Watauga Rd  - Ft. Worth - (817)498-2629\n";
      }
      else if (number == 8)
      {
         this.fm.details.value="The Beggars Club - 17449 Preston Road - Dallas - (972)732-8801\nThis upscale club in North Dallas boasts one of the best atmospheres for foosball. Has a DJ spinning great music during the week and usually live bands on the weekends. On the weekends the 3 tables usually have a nice mix of beginners and tournament players.";
      }
      else if (number == 9)
      {
         this.fm.details.value="O'Rileys - 8989 Forest Ln - Dallas - (972) 235-2781\n";
      }
      currentLocation = number;
   }
}
function openMap(number)
{
   var mapUrl = "";
   if (number == 1) mapUrl="http://maps.yahoo.com/py/maps.py?Pyt=Tmap&addr=5528+Alpha+Rd+&csz=Dallas%2C+TX&Get%A0Map=Get+Map";
   if (number == 2) mapUrl="http://maps.yahoo.com/py/maps.py?BFCat=&Pyt=Tmap&newFL=Use+Address+Below&addr=9112+Highway+80+W+%23+100&csz=Ft.worth%2C+tx&country=us&Get%A0Map=Get+Map";
   if (number == 3) mapUrl="http://yp.yahoo.com/py/ypMap.py?Pyt=Typ&tab=B2C&tuid=7664570&city=Dallas&state=TX&country=us&slt=32.783298&sln=-96.800003&cs=4&ck=1747369594";
   if (number == 4) mapUrl="http://maps.yahoo.com/py/maps.py?Pyt=Tmap&addr=2443%20Walnut%20Hill%20Lane&csz=Dallas%2C%20TX&Get+Map=Get+Map";
   if (number == 5) mapUrl="http://yp.yahoo.com/py/ypMap.py?Pyt=Typ&tuid=7707870&ck=1382851975&tab=B2C&city=Arlington&state=TX&country=us&slt=32.735630&sln=-97.108231&cs=4&stat=:pos:15:regular:regT:20:fbT:0";
   if (number == 6) mapUrl="http://yp.yahoo.com/py/ypMap.py?Pyt=Typ&tuid=7779683&ck=1425584062&tab=B2C&city=Arlington&state=TX&country=us&slt=32.735630&sln=-97.108231&cs=4&stat=:pos:0:regular:regT:1:fbT:0";
   if (number == 7) mapUrl="http://yp.yahoo.com/py/ypMap.py?Pyt=Typ&tuid=7832156&ck=689524531&tab=B2C&addr=dfw&city=Dallas-fort+Worth&state=TX&country=us&slt=32.896900&sln=-97.040497&cs=10&stat=:pos:0:regular:regT:3:fbT:0";
   if (number == 8) mapUrl="http://maps.yahoo.com/py/maps.py?Pyt=Tmap&addr=17449+Preston+Road+&csz=Dallas%2C+TX&Get%A0Map=Get+Map";
   if (number == 9) mapUrl="http://yp.yahoo.com/py/ypMap.py?Pyt=Typ&tuid=7708511&ck=1978074244&tab=B2C&city=Dallas&state=TX&country=us&slt=32.782940&sln=-96.800194&cs=4&stat=:pos:0:regular:regT:1:fbT:0";
   window.open(mapUrl);
}