//attach an event listener, with a specified function, to an element 
function jsfAttachEvent(obj,evt,fnc)
{
	if(window.addEventListener)
	{
		obj.addEventListener(evt, fnc, false);
	}
	else if(window.attachEvent)
	{
		obj.attachEvent('on'+evt, fnc);
	}
	else if (obj.getElementById && evt=='load')
	{
		obj.onload = fnc;
	}
}

function jsfOnLoad()
{
	if( document.getElementById )//only start the process if the browser supports the DOM
	{
		if( document.getElementById( "exit" ) )//make sure the right element is within the document to start with!
		{
			//create a new drop down
			myObjExit = document.getElementById( "exit" );
			myObjExit.style.display = "block";
			if (document.getElementById( "print" ))
				{
				myObjPrint = document.getElementById( "print" );
				myObjPrint.style.display = "block";
				}
		}
	}
}
		
//add the onload event
jsfAttachEvent(window,'load',jsfOnLoad);




/*******************************************************
FLASH DETECT 2.5
All code by Ryan Parman and mjac, unless otherwise noted.
(c) 1997-2004 Ryan Parman and mjac
http://www.skyzyx.com
*******************************************************/
// This script will test up to the following version.
flash_versions = 20;
// Initialize variables and arrays
var flash = new Object();
flash.installed=false;
flash.version='0.0';
// Dig through Netscape-compatible plug-ins first.
if (navigator.plugins && navigator.plugins.length)
{
 for (x=0; x < navigator.plugins.length; x++)
 {
  if (navigator.plugins[x].name.indexOf('Shockwave Flash') != -1)
  {
   flash.version = navigator.plugins[x].description.split('Shockwave Flash ')[1];
   flash.installed = true;
   break;
  }
 }
}
// Then, dig through ActiveX-style plug-ins afterwords
else if (window.ActiveXObject)
{
 for (x = 2; x <= flash_versions; x++)
 {
  try {
   oFlash = eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash." + x + "');");
   if(oFlash)
   {
    flash.installed = true;
    flash.version = x + '.0';
   }
  }
  catch(e) {}
 }
}
// Create sniffing variables in the following style: flash.ver[x]
// Modified by mjac
flash.ver = Array();
for(i = 4; i <= flash_versions; i++)
{
 eval("flash.ver[" + i + "] = (flash.installed && parseInt(flash.version) >= " + i + ") ? true :  false;");
}









function includeFlash(flashFilePath, width, height, alternativeImageFilePath ,flashId, alternativeLink)
{
 var flashDiv = document.getElementById(flashId);
 if(flash.installed)
 {
  flashDiv.innerHTML = "<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'   codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0'   WIDTH='"+width+"' HEIGHT='"+height+"'><PARAM NAME='movie' VALUE='"+flashFilePath+"'><PARAM   NAME='quality' VALUE='high'><EMBED src='"+flashFilePath+"' quality='high' WIDTH='"+width+"'   HEIGHT='"+height+"' ALIGN='' TYPE='application/x-shockwave-flash'   PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED></OBJECT>" ;
 }
 else
 {
  var imageObject = document.createElement("img");
  imageObject.setAttribute("src",alternativeImageFilePath);
  imageObject.setAttribute("width",width);
  imageObject.setAttribute("height",height);
  var linkObject=document.createElement('a');
  linkObject.setAttribute('href',alternativeLink);
  if (alternativeLink)
  {
	linkObject.appendChild(imageObject);
  	flashDiv.appendChild(linkObject);
  }
  else
  {
	flashDiv.appendChild(imageObject);
  }
 }
}

