var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
//alert(plugin);
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		//alert(words);
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
if (MM_FlashCanPlay ) {
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="778" height="128" id="topFlashV2" align="middle">');
	document.write(' <param name="allowScriptAccess" value="sameDomain" />'); 
	document.write('<param name="movie" value="templates/swf/topFlashV2.swf" /><param name="menu" value="false" />');
	document.write('<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');
	document.write('<embed src="templates/swf/topFlashV2.swf" menu="false" quality="high" bgcolor="#ffffff" width="778" height="128" name="topFlashV2" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');

	document.write('</object>');
} else{
	var variableslide=new Array()

//variableslide[x]=["path to image", "OPTIONAL link for image", "OPTIONAL text description (supports HTML tags)"]

	variableslide[0]=['images/randomHeader/TopFlash_1.jpg', '', '']
	variableslide[1]=['images/randomHeader/TopFlash_2.jpg', '', '']
	variableslide[2]=['images/randomHeader/TopFlash_3.jpg', '', '']
	variableslide[2]=['images/randomHeader/TopFlash_4.jpg', '', '']
	variableslide[2]=['images/randomHeader/TopFlash_5.jpg', '', '']
	//configure the below 3 variables to set the dimension/background color of the slideshow
	
	var slidewidth='778px' //set to width of LARGEST image in your slideshow
	var slideheight='128px' //set to height of LARGEST iamge in your slideshow, plus any text description
	var slidebgcolor=''
	
	//configure the below variable to determine the delay between image rotations (in miliseconds)
	var slidedelay=6000
	
	////Do not edit pass this line////////////////
	
	var ie=document.all
	var dom=document.getElementById
	
	for (i=0;i<variableslide.length;i++){
	var cacheimage=new Image()
	cacheimage.src=variableslide[i][0]
	}
	
	var currentslide=0
	
	function rotateimages(){
	contentcontainer='<center>'
	if (variableslide[currentslide][1]!="")
	contentcontainer+='<a href="'+variableslide[currentslide][1]+'">'
	contentcontainer+='<img src="'+variableslide[currentslide][0]+'" border="0" vspace="3">'
	if (variableslide[currentslide][1]!="")
	contentcontainer+='</a>'
	contentcontainer+='</center>'
	if (variableslide[currentslide][2]!="")
	contentcontainer+=variableslide[currentslide][2]
	
	if (document.layers){
	crossrotateobj.document.write(contentcontainer)
	crossrotateobj.document.close()
	}
	else if (ie||dom)
	crossrotateobj.innerHTML=contentcontainer
	if (currentslide==variableslide.length-1) currentslide=0
	else currentslide++
	setTimeout("rotateimages()",slidedelay)
	}
	
	if (ie||dom)
	document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')
	
	function start_slider(){
	crossrotateobj=dom? document.getElementById("slidedom") : ie? document.all.slidedom : document.slidensmain.document.slidenssub
	if (document.layers)
	document.slidensmain.visibility="show"
	rotateimages()
	}
	
	if (ie||dom)
	start_slider()
	else if (document.layers)
	window.onload=start_slider
	document.write('<ilayer id="slidensmain" width=&{slidewidth}; height=&{slideheight}; bgColor=&{slidebgcolor}; visibility=hide><layer id="slidenssub" width=&{slidewidth}; left=0 top=0></layer></ilayer>');

}
