/***********************************************
* Ultimate Fade-In Slideshow (v1.51): © Dynamic Drive (http://www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
* Updated for better Safari and Opera 9+ Compliance plus optional captions
* by jscheuer1 in http://www.dynamicdrive.com/forums
* Modified for use on NIST by David Briggs 09-11-07 / Last updated 02-13-08
***********************************************/
<!-- 
var fadeimages1=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages1[0]=["images/chem1.jpg", "chemical.html", "Image of a molecule and link to Public Safety and Security Technologies", "MM_swapImage('blank','','images/chem2.jpg',1)"]
fadeimages1[1]=["images/pepper-1.jpg", "chemical.html", "Image of various pepper sprays and link to Public Safety and Security Technologies", "MM_swapImage('blank','','images/pepper-2.jpg',1)"] 
fadeimages1[2]=["images/peptest2.jpg", "chemical.html", "Image of pepper spray training and link to Public Safety and Security Technologies", "MM_swapImage('blank','','images/peptest1.jpg',1)"] 
fadeimages1[3]=["images/shields-1.jpg", "chemical.html", "Image of police officers in riot gear and link to Public Safety and Security Technologies", "MM_swapImage('blank','','images/shields-2.jpg',1)"]
fadeimages1[4]=["images/print4.jpg", "chemical.html", "Image of NIST explosives fingerprint system", "MM_swapImage('blank','','images/print2.jpg',1)"] 
 
var fadeimages2=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages2[0]=["images/swat2.jpg", "weapons.html", "Image of a SWAT team and link to Weapons and Protective Systems", "MM_swapImage('blank','','images/swat1.jpg',1)"] 
fadeimages2[1]=["images/cuffs3.jpg", "weapons.html", "Image of handcuffs and link to Weapons and Protective Systems", "MM_swapImage('blank','','images/cuffs4.jpg',1)"]
fadeimages2[2]=["images/vest4.jpg", "weapons.html", "Image of ballistic vest and link to Weapons and Protective Systems", "MM_swapImage('blank','','images/vest3.jpg',1)"]
fadeimages2[3]=["images/glass2.jpg", "weapons.html", "Image of ballistic resistent glass and link to Weapons and Protective Systems", "MM_swapImage('blank','','images/glass3.jpg',1)"]
fadeimages2[4]=["images/blades3.jpg", "weapons.html", "Image of blade standards and link to Weapons and Protective Systems", "MM_swapImage('blank','','images/blades4.jpg',1)"]
fadeimages2[5]=["images/safeglass2.jpg", "weapons.html", "Image of safety glasses and link to Weapons and Protective Systems", "MM_swapImage('blank','','images/safeglass3.jpg',1)"]
fadeimages2[6]=["images/knife2.jpg", "weapons.html", "Image of a knife and link to Weapons and Protective Systems", "MM_swapImage('blank','','images/knife3.jpg',1)"]
fadeimages2[7]=["images/locks3.jpg", "weapons.html", "Image of a locks and link to Weapons and Protective Systems", "MM_swapImage('blank','','images/locks4.jpg',1)"]

var fadeimages3=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages3[0]=["images/recog1.jpg", "detection.html", "Image of biometric facial recognition and link to Detection, Inspection, and Enforcement Technologies", "MM_swapImage('blank','','images/recog2.jpg',1)"] 
fadeimages3[1]=["images/laser1.jpg", "detection.html", "Image of police officer using LIDAR and link to Detection, Inspection, and Enforcement Technologies", "MM_swapImage('blank','','images/laser2.jpg',1)"]
fadeimages3[2]=["images/axsyscam-1.jpg", "detection.html", "Image of mounted surveillance cameras and link to Detection, Inspection, and Enforcement Technologies", "MM_swapImage('blank','','images/axsyscam-2.jpg',1)"]
fadeimages3[3]=["images/redlight4.jpg", "detection.html", "Image of red light camera warning sign and link to Detection, Inspection, and Enforcement Technologies", "MM_swapImage('blank','','images/redlight1.jpg',1)"]
fadeimages3[4]=["images/x261.jpg", "detection.html", "Image of a TASER gun and link to Detection, Inspection, and Enforcement Technologies", "MM_swapImage('blank','','images/x262.jpg',1)"]
fadeimages3[5]=["images/xray1.jpg", "detection.html", "X-ray image of person with concealed weapons and link to Detection, Inspection, and Enforcement Technologies", "MM_swapImage('blank','','images/xray2.jpg',1)"]
fadeimages3[6]=["images/fire2.jpg", "detection.html", "Image of thermal camera and link to Detection, Inspection, and Enforcement Technologies", "MM_swapImage('blank','','images/thermimager2.jpg',1)"]
fadeimages3[7]=["images/security2.jpg", "detection.html", "Image of use of handheld metal detector and link to Detection, Inspection, and Enforcement Technologies", "MM_swapImage('blank','','images/search2.jpg',1)"]
fadeimages3[8]=["images/scantrak-1.jpg", "detection.html", "Image of bomb dectection exercise and link to Detection, Inspection, and Enforcement Technologies", "MM_swapImage('blank','','images/scantrak6.jpg',1)"]

var fadeimages4=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages4[0]=["images/commun4.jpg", "public_safety.html", "Image of police officer using communications equipment in his car and link to Public Safety Communication Systems", "MM_swapImage('blank','','images/commun1.jpg',1)"] 
fadeimages4[1]=["images/fireman3.jpg", "public_safety.html", "Image of a fireman sttanding next to firetruck and link to Public Safety Communication Systems", "MM_swapImage('blank','','images/fireman4.jpg',1)"]
fadeimages4[2]=["images/carfire3.jpg", "public_safety.html", "Image of fireman extinguishing a car fire and link to Public Safety Communication Systems", "MM_swapImage('blank','','images/carfire4.jpg',1)"]

var fadeimages5=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages5[0]=["images/fprint1.jpg", "forensics.html", "Image of a fingerprint and link to Forensic Sciences", "MM_swapImage('blank','','images/fprint2.jpg',1)"] 
fadeimages5[1]=["images/stdbullet-c.jpg", "forensics.html", "Image of a standard bullet and link to Forensic Sciences", "MM_swapImage('blank','','images/stdbullet-c1.jpg',1)"]
fadeimages5[2]=["images/outline2.jpg", "forensics.html", "Image of a chalk outline and link to Forensic Sciences", "MM_swapImage('blank','','images/outline3.jpg',1)"]
fadeimages5[3]=["images/blood-c1.jpg", "forensics.html", "Image of a blood spatter and link to Forensic Sciences", "MM_swapImage('blank','','images/blood-c.jpg',1)"]

var fadeimages6=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages6[0]=["images/bombing4.jpg", "critical_incident.html", "Image of invetigators at a bombing and link to Critical Incident Technologies", "MM_swapImage('blank','','images/bombing1.jpg',1)"] 
fadeimages6[1]=["images/bombsuit2.jpg", "critical_incident.html", "Image of a bombsuit and link to Critical Incident Technologies", "MM_swapImage('blank','','images/bombsuit4.jpg',1)"]

var fadeimages8=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages8[0]=["images/recog2.jpg", "", "Image of biometric facial recognition", ""] 
fadeimages8[1]=["images/laser2.jpg", "", "Image of police officer using LIDAR", ""]
fadeimages8[2]=["images/axsyscam-2.jpg", "", "Image of mounted surveillance cameras", ""]
fadeimages8[3]=["images/redlight1.jpg", "", "Image of a red light camera warning sign", ""]
fadeimages8[4]=["images/x262.jpg", "", "Image of a TASER gun", ""]
fadeimages8[5]=["images/xray2.jpg", "", "X-ray image of person with concealed weapons", ""]
fadeimages8[6]=["images/thermimager2.jpg", "", "Image of thermal camera being tested at a fire", ""]
fadeimages8[7]=["images/search2.jpg", "", "Image of use of handheld metal detector", ""]
fadeimages8[8]=["images/scantrak6.jpg", "", "Image of bomb dectection exercise", ""]

var fadeimages9=new Array()
//SET IMAGE PATHS. Extend or contract array as needed
fadeimages9[0]=["images/chem2.jpg", "", "Image of a molecule", ""] 
fadeimages9[1]=["images/pepper-2.jpg", "", "Image of various pepper sprays", ""]
fadeimages9[2]=["images/peptest1.jpg", "", "Image of pepper spray training", ""]
fadeimages9[3]=["images/shields-2.jpg", "", "Image of police officers in riot gear", ""]
fadeimages9[4]=["images/trace2.jpg", "", "Image of NISTIR and explosives kit", ""]
fadeimages9[5]=["images/print2.jpg", "", "Image of NIST explosives fingerprint system", ""]
fadeimages9[6]=["images/inkjet2.jpg", "", "Image of NIST inkjet print UV closeup", ""]

var fadebgcolor="white"
 
////NO need to edit beyond here/////////////
 
var fadearray=new Array() //array to cache fadeshow instances
var fadeclear=new Array() //array to cache corresponding clearinterval pointers
 
var dom=(document.getElementById) //modern dom browsers
var iebrowser=document.all
 
function fadeshow(theimages, fadewidth, fadeheight, borderwidth, delay, pause, displayorder){
this.pausecheck=pause
this.mouseovercheck=0
this.delay=delay
this.degree=10 //initial opacity degree (10%)
this.curimageindex=0
this.nextimageindex=1
fadearray[fadearray.length]=this
this.slideshowid=fadearray.length-1
this.canvasbase="canvas"+this.slideshowid
this.curcanvas=this.canvasbase+"_0"
if (typeof displayorder!="undefined")
theimages.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
this.theimages=theimages
this.imageborder=parseInt(borderwidth)
this.postimages=new Array() //preload images
for (p=0;p<theimages.length;p++){
this.postimages[p]=new Image()
this.postimages[p].src=theimages[p][0]
}
 
var fadewidth=fadewidth+this.imageborder*2
var fadeheight=fadeheight+this.imageborder*2
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers (ie: Firefox)
document.write('<div id="master'+this.slideshowid+'" style="position:relative;width:'+fadewidth+'px;height:'+fadeheight+'px;overflow:hidden;"><div id="'+this.canvasbase+'_0" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div><div id="'+this.canvasbase+'_1" style="position:absolute;width:'+fadewidth+'px;height:'+fadeheight+'px;top:0;left:0;filter:progid:DXImageTransform.Microsoft.alpha(opacity=10);opacity:0.1;-moz-opacity:0.1;-khtml-opacity:0.1;background-color:'+fadebgcolor+'"></div></div>')
else
document.write('<div><img name="defaultslide'+this.slideshowid+'" src="'+this.postimages[0].src+'"></div>')
 
if (iebrowser&&dom||dom) //if IE5+ or modern browsers such as Firefox
this.startit()
else{
this.curimageindex++
setInterval("fadearray["+this.slideshowid+"].rotateimage()", this.delay)
}
}

function fadepic(obj){
if (obj.degree<100){
obj.degree+=5
if (obj.tempobj.filters&&obj.tempobj.filters[0]){
if (typeof obj.tempobj.filters[0].opacity=="number") //if IE6+
obj.tempobj.filters[0].opacity=obj.degree
else //else if IE5.5-
obj.tempobj.style.filter="alpha(opacity="+obj.degree+")"
}
else if (obj.tempobj.style.MozOpacity)
obj.tempobj.style.MozOpacity=obj.degree/101
else if (obj.tempobj.style.KhtmlOpacity)
obj.tempobj.style.KhtmlOpacity=obj.degree/100
else if (obj.tempobj.style.opacity&&!obj.tempobj.filters)
obj.tempobj.style.opacity=obj.degree/101
}
else{
clearInterval(fadeclear[obj.slideshowid])
obj.nextcanvas=(obj.curcanvas==obj.canvasbase+"_0")? obj.canvasbase+"_0" : obj.canvasbase+"_1"
obj.tempobj=iebrowser? iebrowser[obj.nextcanvas] : document.getElementById(obj.nextcanvas)
obj.populateslide(obj.tempobj, obj.nextimageindex)
obj.nextimageindex=(obj.nextimageindex<obj.postimages.length-1)? obj.nextimageindex+1 : 0
setTimeout("fadearray["+obj.slideshowid+"].rotateimage()", obj.delay)
}
}
 
fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" onmouseout="MM_swapImgRestore()" onmouseover="'+this.theimages[picindex][3]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" alt="'+this.theimages[picindex][2]+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}
 
fadeshow.prototype.rotateimage=function(){
if (this.pausecheck==1) //if pause onMouseover enabled, cache object
var cacheobj=this
if (this.mouseovercheck==1)
setTimeout(function(){cacheobj.rotateimage()}, 100)
else if (iebrowser&&dom||dom){
this.resetit()
var crossobj=this.tempobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
crossobj.style.zIndex++
fadeclear[this.slideshowid]=setInterval("fadepic(fadearray["+this.slideshowid+"])",50)
this.curcanvas=(this.curcanvas==this.canvasbase+"_0")? this.canvasbase+"_1" : this.canvasbase+"_0"
}
else{
var ns4imgobj=document.images['defaultslide'+this.slideshowid]
ns4imgobj.src=this.postimages[this.curimageindex].src
}
this.curimageindex=(this.curimageindex<this.postimages.length-1)? this.curimageindex+1 : 0
}
 
fadeshow.prototype.resetit=function(){
this.degree=10
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
if (crossobj.filters&&crossobj.filters[0]){
if (typeof crossobj.filters[0].opacity=="number") //if IE6+
crossobj.filters(0).opacity=this.degree
else //else if IE5.5-
crossobj.style.filter="alpha(opacity="+this.degree+")"
}
else if (crossobj.style.MozOpacity)
crossobj.style.MozOpacity=this.degree/101
else if (crossobj.style.KhtmlOpacity)
crossobj.style.KhtmlOpacity=this.degree/100
else if (crossobj.style.opacity&&!crossobj.filters)
crossobj.style.opacity=this.degree/101
}
 
 
fadeshow.prototype.startit=function(){
var crossobj=iebrowser? iebrowser[this.curcanvas] : document.getElementById(this.curcanvas)
this.populateslide(crossobj, this.curimageindex)
if (this.pausecheck==1){ //IF SLIDESHOW SHOULD PAUSE ONMOUSEOVER
var cacheobj=this
var crossobjcontainer=iebrowser? iebrowser["master"+this.slideshowid] : document.getElementById("master"+this.slideshowid)
crossobjcontainer.onmouseover=function(){cacheobj.mouseovercheck=1}
crossobjcontainer.onmouseout=function(){cacheobj.mouseovercheck=0}
}
this.rotateimage()
}
//-->