// In this section we set up the content to be placed dynamically on the page.
// Customize movie tags and alternate html content below.

// Check the browser...we're looking for ie/mac
//var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;    // true if we're on ie
var isMac = (navigator.appVersion.indexOf("Mac") != -1) ? true : false; // true if we're on mac

// code to force a number or randomize
if(isIE && isMac){
		var randnum = Math.random();
		var inum = 3;  // Change this number to the number of images you are using.
		var rand1 = Math.round(randnum * (inum-1)) + 1;
		var header = '0' + rand1;
}
else {	// the variable 'show' is provided to force the selected flash movie
	var qs = location.search.substring(1);
	var nv = qs.split('&');
	var url = new Object();
	for(i = 0; i < nv.length; i++)
	{
  		eq = nv[i].indexOf('=');
  		url[nv[i].substring(0,eq).toLowerCase()] = unescape(nv[i].substring(eq + 1));
	}
	
	if (url['show'] != undefined) {
		var header = '0' + url['show'];
	}
	else {
		var randnum = Math.random();
		var inum = 3;  // Change this number to the number of images you are using.
		var rand1 = Math.round(randnum * (inum-1)) + 1;
		var header = '0' + rand1;
	}
}

// document.write(navigator.userAgent + '<br>');
// document.write(navigator.appVersion + '<br>');
// document.write(navigator.appName + '<br>');

if (!useRedirect) {    // if dynamic embedding is turned on
  if(hasRightVersion) {  // if we've detected an acceptable version
	var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="981" HEIGHT="514" CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"><PARAM NAME="MOVIE" VALUE="swf/intro.swf"><PARAM NAME="QUALITY" VALUE="high"><PARAM NAME="WMODE" VALUE="transparent"><EMBED SRC="swf/intro.swf" WIDTH="981" HEIGHT="514" WMODE="transparent" QUALITY="high" 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
    // NOTE: height, width are required!
    var alternateContent = '<img src="images/main.jpg" width="981" height="514" border="0" alt="" />';
    
	document.write(alternateContent);  // insert non-flash content
  }
}