// JavaScript Document

function clearActive(){
		for (var i=0; i<document.getElementById('menuBorder').childNodes.length; i++){
			document.getElementById('menuBorder').childNodes.item(i).className = 'menuItem';	
		}
}


function textChange(id)
{		
		switch(id){
			case "TBtubbys":
				clearActive();
				var header = "<span class='infoHeader'>Tubby's Tank House (Thunderbolt)</span>";
				var info = "<table cellpadding='0' cellspacing='0' width='100%' height='215px' border='0'><tr><td class='infoAddress' height='30px' valign='top'>2909 River Drive, Savannah, Georgia 31406 <br /> 912.354.9040</td></tr><tr><td class='infoText' height='170px' valign='top' style='padding-top:5px;'><div style='overflow:auto;'>A local favorite known for great food and good times in a relaxed laid back atmosphere. Tubby's offers a variety of seafood and chicken fingers to satisfy anyone. Their most popular entree is the Tubby's Tankout. It is filled with Shrimp, Scallops, Oyters & Grouper Fingers. The best seats in the house are located above the restaurant's front porch. They offer a Bird's Eye View of historic Thunderbolt. Tubby's is known far and wide as the place to be every Thursday Night where they celebrate their legendary Sunset Party!</div></td></tr><tr><td height='15px' valign='bottom'><a href='http://tubbysthunderbolt.com' target='_blank'>Website</a> | <a href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=2909+River+Drive,+Savannah,+Georgia&sll=32.081149,-81.089202&sspn=0.011418,0.021822&ie=UTF8&hq=&hnear=2909+River+Dr,+Thunderbolt,+Chatham,+Georgia+31404&z=16' target='_blank'>Map</a></tr></table>";
				/*document.getElementById(id).className = 'menuItemActive';*/
				document.getElementById('headBack').className = 'boxheadYellow';
				break;
			case "tubbysRS":
				clearActive();
				var header = "<span class='infoHeader'>Tubby's Tank House (River Street)</span>";
				var info = "<table cellpadding='0' cellspacing='0' width='100%' height='215px' border='0'><tr><td class='infoAddress' height='30px' valign='top'>115 East River Street, Savannah, Georgia 31401<br />912.233.0770</td></tr><tr><td class='infoText' height='170px' valign='top' style='padding-top:5px;'><div style='overflow:auto;'>Located on River Street is one of the best places to enjoy live music while taking in the panoramic view of the Savannah River and the excitement of River Street. Tubby's is famous for their Grouper Fingers and their signature seafood. They insist on serving only the freshest fish available. During the hot summer days they have built in water misters that cool you off without soaking you. They invite you to sit back, relax and watch the tanker ships go by.</div></td></tr><tr><td height='15px' valign='bottom'><a href='http://savannahmenu.com/tubbysriverstreet' target='_blank'>Website</a> | <a href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=115+East+River+Street,+Savannah,+Georgia&sll=32.031073,-81.05072&sspn=0.011424,0.021822&ie=UTF8&hq=&hnear=115+E+River+St,+Savannah,+Chatham,+Georgia+31401&z=16' target='_blank'>Map</a></tr></table>";
				/*document.getElementById(id).className = 'menuItemActive';*/
				document.getElementById('headBack').className = 'boxheadYellow';
				break;
			case "fiddlersAnchor":
				clearActive();
				var header = "<span class='infoHeader'>Fiddler's Seafood (Southside)</span>";
				var info = "<table cellpadding='0' cellspacing='0' width='100%' height='215px' border='0'><tr><td class='infoAddress' height='30px' valign='top'>7201 Hodgson Memorial Drive, Savannah, Georgia 31406 <br /> 912.351.2274</td></tr><tr><td class='infoText' height='170px' valign='top' style='padding-top:5px;'><div style='overflow:auto;'>This restaurant is a tribute to the Incredibly hard working families of previous generations who made such an indelible mark on the seafood industry and our community. May God Bless Them All. <br /><br />Enjoy an eclectic combination of mouth watering seafood selections combined with an American cuisine flair. The tropical theme even has a waterfall that flows from the roof into the lagoon below. Surround yourself with friendly service, delicious entrees, and live entertainment in a tropical laidback atmosphere.</div></td></tr><tr><td height='15px' valign='bottom'><a href='http://fiddlerssouthside.com' target='_blank'>Website</a> | <a href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=7201+Hodgson+Memorial+Drive,+Savannah,+Georgia&sll=32.081149,-81.089202&sspn=0.011418,0.021822&ie=UTF8&hq=&hnear=7201+Hodgson+Memorial+Dr,+Savannah,+Chatham,+Georgia+31406&z=16' target='_blank'>Map</a></tr></table>";
				/*document.getElementById(id).className = 'menuItemActive';*/
				document.getElementById('headBack').className = 'boxheadRed';
				break;
			case "fiddlersCrab":
				clearActive();
				var header = "<span class='infoHeader'>Fiddler's Crab House (River Street)</span>";
				var info = "<table cellpadding='0' cellspacing='0' width='100%' height='215px' border='0'><tr><td class='infoAddress' height='30px' valign='top'>131 W. River Street, Savannah, Georgia 31401 <br /> 912.644.7172</td></tr><tr><td class='infoText' height='170px' valign='top' style='padding-top:5px;'><div style='overflow:auto;'>If you are looking for the hot spot for seafood and a scenic view of Savannah's River Street, you have just found it. Fiddlers offers a full menu for lunch and dinner as well as a full service bar. Fiddlers serves locally caught, fresh seafood daily, setting the standard for fresh seafood on River Street. We offer our signature crab cakes, and shellfish platter, along with a wide variety of steamed and fried seafood. We also have a full menu that caters to the steak, chicken and salad lover in you. Our great location also offers you seating on our balcony, overlooking the Savannah River with a beautiful view of the Talmadge Bridge.</div></td></tr><tr><td height='15px' valign='bottom'><a href='http://savannahmenu.com/fiddlerscrabhouse' target='_blank'>Website</a> | <a href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=131+West+River+Street,+Savannah,+Georgia&sll=32.005523,-81.110391&sspn=0.011427,0.021822&ie=UTF8&hq=&hnear=115+E+River+St,+Savannah,+Chatham,+Georgia+31401&z=16' target='_blank'>Map</a></tr></table>";
				/*document.getElementById(id).className = 'menuItemActive';*/
				document.getElementById('headBack').className = 'boxheadRed';
				break;
			case "spankys":
				clearActive();
				var header = "<span class='infoHeader'>Spanky's (River Street)</span>";
				var info = "<table cellpadding='0' cellspacing='0' width='100%' height='215px' border='0'><tr><td class='infoAddress' height='30px' valign='top'>317 East River Street, Savannah, Georgia 31401<br />912.236.3009</td></tr><tr><td class='infoText' height='170px' valign='top' style='padding-top:5px;'><div style='overflow:auto;'>One of River Street's oldest restaurants and taverns that has become a local and tourist hot spot. Chicken fingers just don't get any better than this! Savannah's friendliest lunch and Happy hour restaurant. Voted Savannah's best bar food. 'Home of the Original Chicken Finger.' All of us at Spanky's welcome you and your friends and assure you that we will do everything possible to make you visit comfortable and satiable pleasing.</div></td></tr><tr><td height='15px' valign='bottom'><a href='http://savannahmenu.com/spankysriverstreet' target='_blank'>Website</a> | <a href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=317+East+River+Street,+Savannah,+Georgia&sll=32.005523,-81.110391&sspn=0.011427,0.021822&ie=UTF8&hq=&hnear=317+E+River+St,+Savannah,+Chatham,+Georgia+31401&z=16' target='_blank'>Map</a></tr></table>";
				/*document.getElementById(id).className = 'menuItemActive';*/
				document.getElementById('headBack').className = 'boxheadOrange';
				break;
			case "riverHouse":
				clearActive();
				var header = "<span class='infoHeader'>River House Seafood (River Street)</span>";
				var info = "<table cellpadding='0' cellspacing='0' width='100%' height='215px' border='0'><tr><td class='infoAddress' height='30px' valign='top'>125 West River Street, Savannah, Georgia 31401<br />912.234.1900</td></tr><tr><td class='infoText' height='170px' valign='top' style='padding-top:5px;'><div style='overflow:auto;'>Genuine Savannah Flavor in an 1850s King Cotton Warehouse. Sit riverside and enjoy local seafood that the Savannah News awarded its highest rating, A, while watching local and merchant ships sail by. Delight in our homemade breads and desserts, baked on premise and served warm or available to take home. River House features some of the freshest local seafood available, helping to create some of the finest signature items you'll find in Savannah. Your trip to Savannah wouldn't be complete without trying some of our famous Chocolate Cheesecake, a Savannah original. We are sure it will satisfy any sweet tooth.</div></td></tr><tr><td height='15px' valign='bottom'><a href='http://riverhouseseafood.com' target='_blank'>Website</a> | <a href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=125+West+River+Street,+Savannah,+Georgia&sll=32.080445,-81.086131&sspn=0.011418,0.021822&ie=UTF8&hq=&hnear=125+W+River+St,+Savannah,+Chatham,+Georgia+31401&ll=32.082047,-81.092384&spn=0.011418,0.021822&z=16' target='_blank'>Map</a></tr></table>";
				/*document.getElementById(id).className = 'menuItemActive';*/
				document.getElementById('headBack').className = 'boxheadGreen';
				break;
			case "conchHouse":
				clearActive();
				var header = "<span class='infoHeader'>The Conch House Catering (River Street)</span>";
				var info = "<table cellpadding='0' cellspacing='0' width='100%' height='215px' border='0'><tr><td class='infoAddress' height='30px' valign='top'>225 W. River Street, Savannah, Georgia 31401<br />912.233.2901</td></tr><tr><td class='infoText' height='170px' valign='top' style='padding-top:5px;'><div style='overflow:auto;'>Savannah's Premier Catering & Event Facility! Over 7,500 square feet available with multiple dining rooms and a large full-service banquet hall on the second floor. Whether planning a wedding reception, gala event, holiday party, corporate event or special occasion, let The Conch House Special Event Facility be the perfect venue for your memorable event. With over 30 years experience, we have all the ingredients to make it a success! Call Linda Sanders, our on-site event planner, at 912-233-2901 or email: lsanders@liveoakrestaurants.com to help you plan your special event.</div></td></tr><tr><td height='15px' valign='bottom'><a href='http://savannahmenu.com/conchhouse' target='_blank'>Website</a> | <a href='http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=225+West+River+Street,+Savannah,+Georgia&sll=32.082047,-81.092384&sspn=0.011418,0.021822&ie=UTF8&hq=&hnear=115+E+River+St,+Savannah,+Chatham,+Georgia+31401&ll=32.081156,-81.089208&spn=0.011418,0.021822&z=16' target='_blank'>Map</a></tr></table>";
				/*document.getElementById(id).className = 'menuItemActive';*/
				document.getElementById('headBack').className = 'boxheadYellow';
				break;
			case "mcguires":
				clearActive();
				var header = "<span class='infoHeader'>Molly McGuire's Tavern</span>";
				var info = "<table cellpadding='0' cellspacing='0' width='100%' height='215px' border='0'><tr><td class='infoAddress' height='30px' valign='top'>216 Johnny Mercer Blvd, Savannah, Georgia 31401<br />912.898.0852</td></tr><tr><td class='infoText' height='170px' valign='top' style='padding-top:5px;'><div style='overflow:auto;'>Molly McGuire's, Spanky's fun-lovin' sister, has made her new debut on Johnny Mercer Boulevard serving all Savannian's at Wilmington Island's Shopping Center.  Live entertainment is a staple ingredient for Molly's fun atmosphere, where Islanders can unwind with their family, or even book a private event. Relax outdoors under Molly's gazebo, and feel like you're a part of history when ordering Spanky's Original Chicken Tenders with a side of Spuds. Sip on a $3 cocktail when you join Molly during her Happy Hour, happening everyday between 3pm-7pm.</div></td></tr><tr><td height='15px' valign='bottom'><a href='http://www.mollymcguirestavern.com' target='_blank'>Website</a> | <a href='http://maps.google.com/maps?hl=en&source=hp&q=216+Johnny+Mercer+Blvd&ie=UTF8&hq=&hnear=216+Johnny+Mercer+Blvd,+Savannah,+Chatham,+Georgia+31410&gl=us&ei=wg1zS6jdO8yUtged5bDtCQ&ved=0CAgQ8gEwAA&ll=32.014171,-80.983336&spn=0.009698,0.02738&t=h&z=16' target='_blank'>Map</a></tr></table>";
				/*document.getElementById(id).className = 'menuItemActive';*/
				document.getElementById('headBack').className = 'boxheadGreen';
				break;
			default:
		}
		
		document.getElementById('header').innerHTML = header;
		document.getElementById('infoBody').innerHTML = info;
}



function animate(elementID, newLeft, newTop, newWidth, newHeight, time, callback)
{
  var el = document.getElementById(elementID);
  if(el == null){
    return;
  }
  
  var cLeft = parseInt(el.style.left);
  var cTop = parseInt(el.style.top);
  var cWidth = parseInt(el.style.width);
  var cHeight = parseInt(el.style.height);
 
  var totalFrames = 1;
  if(time > 0){
    totalFrames = time/40;}

  var fLeft = newLeft - cLeft;
  if(fLeft != 0){
    fLeft /= totalFrames;}
 
  var fTop = newTop - cTop;
  if(fTop != 0){
    fTop /= totalFrames;}
 
  var fWidth = newWidth - cWidth;
  if(fWidth != 0){
    fWidth /= totalFrames;}
 
  var fHeight = newHeight - cHeight;
  if(fHeight != 0){
    fHeight /= totalFrames;}
   
  doFrame(elementID, cLeft, newLeft, fLeft, cTop, newTop, fTop,
      cWidth, newWidth, fWidth, cHeight, newHeight, fHeight, callback);
}

function doFrame(eID, cLeft, nLeft, fLeft, cTop, nTop, fTop,
    cWidth, nWidth, fWidth, cHeight, nHeight, fHeight, callback)
{
  var el = document.getElementById(eID);
  if(el == null){
    return;}

  cLeft = moveSingleVal(cLeft, nLeft, fLeft);
  cTop = moveSingleVal(cTop, nTop, fTop);
  cWidth = moveSingleVal(cWidth, nWidth, fWidth);
  cHeight = moveSingleVal(cHeight, nHeight, fHeight);

  el.style.left = Math.round(cLeft) + 'px';
  el.style.top = Math.round(cTop) + 'px';
  el.style.width = Math.round(cWidth) + 'px';
  el.style.height = Math.round(cHeight) + 'px';
 
  if(cLeft == nLeft && cTop == nTop && cHeight == nHeight
    && cWidth == nWidth)
  {
    if(callback != null){
      callback();
	  }
    return;
  }
   
  setTimeout( 'doFrame("'+eID+'",'+cLeft+','+nLeft+','+fLeft+','+cTop+','
      +nTop+','+fTop+','+cWidth+','+nWidth+','+fWidth+','+cHeight+','
      +nHeight+','+fHeight+','+callback+')', 40);
}

function moveSingleVal(currentVal, finalVal, frameAmt)
{
  if(frameAmt == 0 || currentVal == finalVal){
    return finalVal;}
 
  currentVal += frameAmt;
  if((frameAmt > 0 && currentVal >= finalVal)
      || (frameAmt < 0 && currentVal <= finalVal))
  {
    return finalVal;
  }
  return currentVal;
}