function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}


function checkHowHeard()
{
	var selectedelement=document.getElementById('howheard');
	var chosenoption=document.getElementById('howheard').options[document.getElementById('howheard').options.selectedIndex].value;
	
if (chosenoption == "Referral") { unhide("howheardotherdiv"); document.getElementById('howhearddesc').innerHTML="Who referred you?";}
else if (chosenoption == "Another Website") { unhide("howheardotherdiv"); document.getElementById('howhearddesc').innerHTML="Which website?"; }
else if (chosenoption == "Other") { unhide("howheardotherdiv"); document.getElementById('howhearddesc').innerHTML="Other:";}
else if (chosenoption == "Yellow Pages") { hide("howheardotherdiv"); }
else if (chosenoption == "Word of Mouth") { hide("howheardotherdiv"); }
else if (chosenoption == "Google") { hide("howheardotherdiv"); }

}

function unhide(divID) {
  var item = document.getElementById(divID);
  if (item) {
    item.className=(item.className=='hidden')?'unhidden':'unhidden';
  }
}

function hide(divID) {
  var item = document.getElementById(divID);
  if (item) {
    item.className=(item.className=='unhidden')?'hidden':'hidden';
  }
}



/*
var selbox = document.items.howheard;
selbox.options.length = 0;
if (chosen == " ") {
selbox.options[selbox.options.length] = new Option('Please select one of the options above first',' ');

}
if (chosen == "Tables & Chairs") {
selbox.options[selbox.options.length] = new Option('Rectangle Banquet Tables','Rectangle Banquet Tables');
selbox.options[selbox.options.length] = new Option('Round Tables','Round Tables');
selbox.options[selbox.options.length] = new Option('Specialty Tables','Specialty Tables');
}
if (chosen == "2") {
selbox.options[selbox.options.length] = new Option('second choice - option one','twoone');
selbox.options[selbox.options.length] = new Option('second choice - option two','twotwo');
}
if (chosen == "3") {
selbox.options[selbox.options.length] = new Option('third choice - option one','threeone');
selbox.options[selbox.options.length] = new Option('third choice - option two','threetwo');
}
}

function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}
*/
