var IE4 = (document.all && !document.getElementById) ? true : false;
var IE5 = (document.all && document.getElementById) ? true : false;
var NS4 = (document.layers) ? true : false;
var NS6 = (document.getElementById && !document.all) ? true : false;

// 2009-01-14 kpwerner -- No longer necessary to write out different stylesheet based on browser
document.write('<link rel = "stylesheet" type = "text/css" href = "/stylesheets/rockwell.css">');
/*if(!IE4 && !IE5)
{
//alert('Netscape');
document.write('<link rel = "stylesheet" type = "text/css" href = "/stylesheets/rockwell_ns.css">');
}
else
{
//alert('IE');
document.write('<link rel = "stylesheet" type = "text/css" href = "/stylesheets/rockwell.css">');
}*/


// flashinstalled = 2 -> you have flash
// flashinstalled = 1 -> you don't have flash
// flashinstalled = 0 -> I couldn't figure out
// flashversion holds the version number

//this chunk detects Mozilla compatible browsers
var flashinstalled = 0;
var flashversion = 0;



//do we have a non mozilla browser?
nonMozilla = false;

//first look in the plugins array
nonMozilla = false;
if (navigator.plugins && navigator.plugins.length)
{
	x = navigator.plugins["Shockwave Flash"];
	if (x)
	{
		flashinstalled = 2;
		if (x.description)
		{
		    // 2009-01-12 kpwerner -- old version returns improper version number when version > 9;
		    // new version uses parseInt to get correct version
			y = x.description.replace("Shockwave Flash ", "");
			y = parseInt(y);
			//flashversion = y.charAt(y.indexOf('.')-1);
			//alert(y);
			flashversion = y;
		}
	}
	else
		flashinstalled = 1;
	//Flash 2.0 was a separate beast
	if (navigator.plugins["Shockwave Flash 2.0"])
	{
		flashinstalled = 2;
		flashversion = 2;
	}
}
//then look in the mime types (no flash version though)
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flashinstalled = 2;
	else
		flashinstalled = 1;

}
else
// the browser is not Mozilla compatible (IE6)
	nonMozilla = "true";


function flashredirect(flashlocation,nonflashlocation)
{



if (flashinstalled == 2 && flashversion > 2)
	{

	  location.href = flashlocation;

	}
else
 
	location.href = nonflashlocation;

}


function displayflash(flashlink,height,width,imglink,imgalt)
{

//flashlink = "http://rwebcots2dev01/Rhythmyx/rc_SharedBinary_cas/binary?sys_authtype=0&amp;sys_variantid=310&amp;sys_context=0&amp;sys_revision=3&amp;sys_contentid=6001";
//height = "30";
//width = "400";
//staticlink = "http://rwebcots2dev01/Rhythmyx/rc_SharedImage_cas/binaryimage?sys_authtype=0&amp;sys_variantid=403&amp;sys_context=0&amp;sys_revision=3&amp;sys_contentid=6001";
//imgalt = "Rockwell Collins Careers - Flash";


document.write('<object height="205" width="789" type="application/x-shockwave-flash" data="' + flashlink + '">');
document.write('<param name="quality" value="high">');
document.write('<param name="align" value="middle">');
document.write('<param name="play" value="true">');
document.write('<param name="loop" value="true">');
document.write('<param name="scale" value="showall">');
document.write('<param name="wmode" value="transparent">');
document.write('<param name="devicefont" value="false">');
document.write('<param name="bgcolor" value="#7b6e66">');
document.write('<param name="menu" value="true">');
document.write('<param name="allowFullScreen" value="false">');
document.write('<param name="allowScriptAccess" value="sameDomain">');
document.write('<param name="movie" value="' + flashlink + '"/>');
document.write('<embed src="' + flashlink + '" quality="high" bgcolor="#7b6e66" width="789" height="205"  align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');



}


function displayhardcodedflash()
{

flashlink = "http://rwebcots2dev01/Rhythmyx/rc_SharedBinary_cas/binary?sys_authtype=0&amp;sys_variantid=310&amp;sys_context=0&amp;sys_revision=3&amp;sys_contentid=6001";
height = "30";
width = "400";
staticlink = "http://rwebcots2dev01/Rhythmyx/rc_SharedImage_cas/binaryimage?sys_authtype=0&amp;sys_variantid=403&amp;sys_context=0&amp;sys_revision=3&amp;sys_contentid=6001";
imgalt = "Rockwell Collins Careers - Flash";


if (flashinstalled == 2 && flashversion > 2)
	{

	  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab #version=4,0,2,0 " width="' + width + '" height="' + height + '" >');
	  document.write('<param name="Movie"   value="' + flashlink + '" />');
	  document.write('<param name="Quality" value="high" />');
	  document.write('<embed quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '" src="' + flashlink + '" >');
	  document.write('</embed>');
	  document.write('</object>');

	}
else
  document.write('<img src="' + imglink + '" height="' + height + '" width="' + width + '" alt="' + imgalt + '" />');


}
