// JavaScript Document 

//faicontentnews[0]='<p align="center"><img src="http://www.aorn.org/docs/assets/BAA60E70-E9EF-47A8-176FD7E7132EFB35/AORNCongresslogosmall1.jpg" alt="First Assist AORN Booth #529" width="101" height="45" border="0" ></p><p align="center" ><span class="smalltext2"><strong>Visit us at </strong></span><span class="smalltext"><strong>Booth #529</strong></span> <span class="smalltext2"><strong>at the 57<sup>th</sup> AORN Congress in <br />Denver, CO!</strong></span><br /><span class="style2"><B>March 14<sup>th</sup>-17<sup>th</sup></B></span></p>'

//faicontentnews[0]='<p align="center"><strong><em><a href="../newsletters/2010 March 17 newsletter.pdf" style=" text-decoration:underline;">Check out our Quarterly Vacation Reward</a><br />A quarterly publication for the staff of First Assist</em></strong></p><p align="center"><em><strong>In this issues</strong></em>: Quarterly Vacation Reward &#8226; Hot Jobs &#8226; Free Money? &#8226; Corporate Update &#8226; Stress Relief Tips <a href="../newsletters/2010 March 17 newsletter.pdf">Click here to read more... </a></p>'

//faicontentnews[0]='<p align="center"><b>National Nurses Week</b><br /><em>May 6-12, 2010</em><br /><img src="http://www.firstassist.com/images2/or_notes.jpg" alt="First Assist Referral Bonus" width="223" height="75" border="0" ><br /><br /><b>Thanks for your hard work and dedication to us.</b></p>'

var faicontentnews=new Array()





faicontentnews[0]='<h1 align="center"><a href="../newsletters/2010 March 17 newsletter.pdf" style=" text-decoration:underline;">Check out our Quarterly Vacation Reward</a></h1><br /><p align="center"><a href="../newsletters/2010 March 17 newsletter.pdf">Click here to read more... </a><br /><img src="http://www.firstassist.com/images2/announcement_blank.gif" alt="First Assist Referral Bonus" width="223" height="85" border="0" ></p>'

faicontentnews[1]='<h1 align="center"><a href="http://www.firstassist.com/employment/referralbonus.html">Are you taking advantage of this opportunity to make extra money?</a></h1><br /><br /><p align="center"><a href="http://www.firstassist.com/employment/referralbonus.html">Click here for more details.</a></p>'

faicontentnews[2]='<a href="http://www.facebook.com/pages/First-Assist-Inc/198377441254" title="Find us on Facebook"><img src="images2/Facebook2.gif" alt="FAI facebook" width="223" height="27" align="center" border="0"><br/><B>Did you know First Assist is now on Facebook?</B></a><br/>Log on and check out our First Assist fan page. You can post pictures, videos, stay updated on the happenings at First Assist, and get connected with other nurses around the country. <a href="http://www.facebook.com/pages/First-Assist-Inc/198377441254" target="_blank">Click here to become a fan.</a>'
faicontentnews[3]='<img src="http://www.firstassist.com/images2/schedule.png" width="223" height="66" border="0"><a href="http://www.firstassist.com/resources/tss.html"><b>Clients/Temps TSS Login</b></a><br />For scheduling &amp; availability <a href="http://www.firstassist.com/resources/tss.html">click here!</a> <br/><p><b>Remember to check back often for job openings, news &amp; events!</b></p>'


//DO NOT EDIT ..........................

function faitextscroller_pause(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

faitextscroller_pause.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(faitextscroller_pause.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

faitextscroller_pause.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px"
setTimeout(function(){scrollerinstance.animateup()}, 60)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

faitextscroller_pause.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

faitextscroller_pause.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

faitextscroller_pause.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

faitextscroller_pause.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}