// JavaScript Document
// Version check based upon the values entered above in "Globals"

var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

// Check to see if the version meets the requirements for playback
if (hasReqestedVersion) {  // if we've detected an acceptable version
    var oeTags = '<div id="menudiv"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="menu" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="780" height="284">'
    + '<param name="movie" value="swf/flash.swf?HomePage=true"><param name="quality" value="high"><param name="wmode" value="transparent" />'
    + '<embed src="swf/flash.swf" name="menu" swLiveConnect="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="780" height="284">'
    + '<\/embed>'
    + '<\/object></div>';
    document.write(oeTags);   // embed the Flash Content SWF when all tests are passed
  } else {  // flash is too old or we can't detect the plugin
    var alternateContent = '<img src="images/hero_backup.gif" width="743" height="153" border="0" usemap="#HeroMap"><map name="HeroMap"><area shape="rect" coords="20,47,237,139" href="../new_child.htm" alt="I have a child in my family who needs braces"><area shape="rect" coords="263,47,478,139" href="../new_school.htm" alt="I am still at school and want to learn more about braces"><area shape="rect" coords=505,47,721,139" href="../new_adult.htm" alt="I am an adult considering teeth correction"></map>';
    document.write(alternateContent);  // insert non-flash content
  }
