// In this section we set up the content to be placed dynamically on the page.
// Customize movie tags and alternate html content below.

if (!useRedirect) {    // if dynamic embedding is turned on
  //just rigging it so it will display the altername menu for debugging.
  //hasRightVersion = false;
  if(hasRightVersion) {  // if we've detected an acceptable version

	// Okay, in here make sure you put in the code:
	// Every time you see a "sidemenu.swf", it needs to be changed to:
	// "/sidemenu.swf?section='+section+'"
	// A search and replace would probably be good for this.
	// That makes the correct menu open in Flash as well as the flash load when
	// you're out of the root directory.
    var oeTags = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
+	' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"'
+	' WIDTH="143" HEIGHT="340" id="sidemenu" ALIGN="">'
+	' <PARAM NAME=movie VALUE="/sidemenu.swf?section='+section+'"> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#003366> <EMBED src="/sidemenu.swf?section='+section+'" menu=false quality=high bgcolor=#003366  WIDTH="143" HEIGHT="340" NAME="sidemenu" ALIGN=""'
+	' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>'
+	'</OBJECT>';
    document.write(oeTags);   // embed the flash movie
  } else {  // flash is too old or we can't detect the plugin
	//Okay, this is the same menu that appears in sub1.adp in the <noscript> for backwards
	//compatibility.  We want the same thing if it can't detect the flash menus either.

    var alternateContent = ''
	+ '<strong>About USURF</strong>'
	+ '<ul>'
	+ '	<li><a href="http://www.usurf.org/about/overview">Overview</a></li>'
	+ '	<li><a href="http://www.usurf.org/about/mission">Mission</a></li>'
	+ '	<li><a href="http://www.usurf.org/about/contactinfo">Contact Information</a></li>'
	+ '	<li><a href="http://www.usurf.org/endowment">Endowment Campaign</a></li>'
//	+ '	<li><a href="/about/specialproj">Special Projects</a></li>'

	+ '</ul>'
	+ '<strong>Board</strong>'
	+ '<ul>'
	+ '	<li><a href="http://www.usurf.org/board/meet">Meet the Board</a></li>'
//	+ '	<li><a href="http://www.usurf.org/board/usu">Working with USU</a></li>'
//  + '	<li><a href="/board/stats">Research Foundation Statistics</a></li>'
//	+ '	<li><a href="/board/ceovision">Vision of the CEO</a></li>'
//	+ '	<li><a href="/board/annualreport">Annual Report</a></li>'
	+ '</ul>'

+ '<strong>Units</strong>'
	+ '<ul>'
	+ '	<li><a href="http://www.spacedynamics.org">Space Dynamics Laboratory</a></li>'
	+ ' <li><a href="http://www.energydynamicslab.com">Energy Dynamics Laboratory</a></li>'
	+ '</ul>'

+ '<strong>Doing Business With USURF</strong>'
	+ '<ul>'
	+ '	<li><a href="http://www.usurf.org/business/security/index">Security</a></li>'
	+ '	<li><a href="http://www.usurf.org/business/terms-conditions">Purchasing Terms and Conditions</a></li>'
	+ '</ul>'

+ '<strong>News &amp; Events</strong>'
	+ '<ul>'
	+ '	<li><a href="http://www.usurf.org/news/press/index">Press Releases</a></li>'
	+ '	<li><a href="http://www.usurf.org/news/events">Events</a></li>'
	+ '	<li><a href="http://www.usurf.org/news/contact-info">Media Contacts</a></li>'
	+ '</ul>'

+ '<strong>Employment</strong>'
	+ '<ul>'
	+ '	<li><a href="http://www.usurfjobs.org/">Employment Opportunities</a></li>'
	+ '	<li><a href="http://www.usurf.org/employment/logan">About Logan</a></li>'
//	+ '	<li><a href="http://www.usurf.org/employment/application">Application Procedures</a></li>'
	+ '	<li><a href="http://www.usurf.org/employment/benefits/index">Benefits</a></li>'
	+ '	<li><a href="http://www.usurf.org/employment/policies">Policies</a></li>'
	+ '	<li><a href="http://www.usurf.org/employment/contact">HR Contact</a></li>'
	+ '	<li><a href="http://www.usurf.org/employment/references">HR References</a></li>'
	+ '</ul>'
	+ '<br><br>';

    document.write(alternateContent);  // insert non-flash content
  }
}
